From 62dabe8df4103d24abbd2ae83072cb7677dad2aa Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Fri, 15 Nov 2024 11:19:03 +0800 Subject: [PATCH] More env vars --- .github/workflows/ci.yml | 1 + infra/app/ddd.bicep | 26 ++++++++++++++++++++++++++ infra/main.bicep | 4 ++++ infra/main.parameters.json | 3 +++ website/.env.example | 1 + 5 files changed, 35 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 008ce19..6bdd04f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ jobs: EVENTS_AIR_CLIENT_SECRET: ${{ secrets.EVENTS_AIR_CLIENT_SECRET }} EVENTS_AIR_TENANT_ID: ${{ secrets.EVENTS_AIR_TENANT_ID }} EVENTS_AIR_EVENT_ID: ${{ secrets.EVENTS_AIR_EVENT_ID }} + TITO_SECURITY_TOKEN: ${{ secrets.TITO_SECURITY_TOKEN }} steps: - name: Checkout diff --git a/infra/app/ddd.bicep b/infra/app/ddd.bicep index 44c9327..8d1b5ae 100644 --- a/infra/app/ddd.bicep +++ b/infra/app/ddd.bicep @@ -22,6 +22,8 @@ param eventsAirClientId string param eventsAirClientSecret string param eventsAirTenantId string param eventsAirEventId string +@secure() +param titoSecurityToken string resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { name: identityName @@ -125,6 +127,10 @@ resource app 'Microsoft.App/containerApps@2024-03-01' = { name: 'events-air-event-id' value: eventsAirEventId } + { + name: 'tito-security-token' + value: titoSecurityToken + } ] } template: { @@ -165,6 +171,26 @@ resource app 'Microsoft.App/containerApps@2024-03-01' = { name: 'GOOGLE_FORMS_FILE_ID' secretRef: 'google-forms-file-id' } + { + name: 'TITO_SECURITY_TOKEN' + secretRef: 'tito-security-token' + } + { + name: 'EVENTS_AIR_CLIENT_ID' + secretRef: 'events-air-client-id' + } + { + name: 'EVENTS_AIR_CLIENT_SECRET' + secretRef: 'events-air-client-secret' + } + { + name: 'EVENTS_AIR_TENANT_ID' + secretRef: 'events-air-tenant-id' + } + { + name: 'EVENTS_AIR_EVENT_ID' + secretRef: 'events-air-event-id' + } ] resources: { diff --git a/infra/main.bicep b/infra/main.bicep index 37017db..5483f98 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -37,6 +37,9 @@ param eventsAirClientId string param eventsAirClientSecret string param eventsAirTenantId string param eventsAirEventId string +@secure() +param titoSecurityToken string + // Tags that should be applied to all resources. // @@ -135,6 +138,7 @@ module ddd './app/ddd.bicep' = { eventsAirClientSecret: eventsAirClientSecret eventsAirTenantId: eventsAirTenantId eventsAirEventId: eventsAirEventId + titoSecurityToken: titoSecurityToken } scope: rg } diff --git a/infra/main.parameters.json b/infra/main.parameters.json index 545cbb8..fd2232b 100644 --- a/infra/main.parameters.json +++ b/infra/main.parameters.json @@ -65,6 +65,9 @@ }, "eventsAirEventId": { "value": "${EVENTS_AIR_EVENT_ID}" + }, + "titoSecurityToken": { + "value": "${TITO_SECURITY_TOKEN}" } } } \ No newline at end of file diff --git a/website/.env.example b/website/.env.example index 4dd2a90..ec5f2ec 100644 --- a/website/.env.example +++ b/website/.env.example @@ -10,3 +10,4 @@ EVENTS_AIR_CLIENT_ID= EVENTS_AIR_CLIENT_SECRET= EVENTS_AIR_TENANT_ID= EVENTS_AIR_EVENT_ID= +TITO_SECURITY_TOKEN=