Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcVelia committed Nov 6, 2024
1 parent 570892c commit b1793ae
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ on:
- main
types: [opened, reopened, synchronize, labeled]

permissions:
contents: write
deployments: write
packages: write
pull-requests: write

env:
TF_PATH: terraform/aks

Expand Down Expand Up @@ -54,20 +48,21 @@ jobs:
url: ${{ steps.deploy_review.outputs.environment_url }}

steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Checkout
# uses: actions/checkout@v4

- name: Deploy App to Review
id: deploy_review
uses: DFE-Digital/github-actions/deploy-to-aks@2088-create-github-workflow-templates
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS_REVIEW }}
environment: review
github-token: ${{ secrets.GITHUB_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
sha: ${{ needs.build.outputs.docker-image-tag }}
terraform-base: ${{ env.TF_PATH }}
healthcheck: 'healthcheck/all'
gcp-wip: ${{ vars.GCP_WIP }}
# db-seed: true

# deploy-before-production:
Expand Down
2 changes: 2 additions & 0 deletions terraform/aks/config/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
EXAMPLE_KEY: example.value.1
4 changes: 1 addition & 3 deletions terraform/aks/output.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
output "url" {
value = [
module.web_application.url,
module.web_application.url
]
}

output "external_urls" {
value = [
module.web_application.url,
module.web_application.url
"${local.external_url}"
]
}
4 changes: 4 additions & 0 deletions terraform/aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ locals {
infra_secrets = yamldecode(data.azurerm_key_vault_secret.infra_secrets.value)
app_config = yamldecode(file(var.app_config_file))[var.environment]

environment_variables = yamldecode(file("${path.module}/config/${var.environment}.yml"))
external_url = try(local.environment_variables["EXTERNAL_URL"], module.web_application.url)

app_env_values = merge(
local.app_config,
local.environment_variables,
# sslmode not defined in database.yml?
{ DB_SSLMODE = local.postgres_ssl_mode }
)
Expand Down

0 comments on commit b1793ae

Please sign in to comment.