Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcVelia committed Nov 4, 2024
1 parent 570892c commit c225612
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ 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 }}
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 c225612

Please sign in to comment.