From a71b15661c3fadcab269cf1adc069c1a24bb06d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Thu, 9 Jan 2025 22:37:28 +0000 Subject: [PATCH] feat: Read dbUrl from config file, not remote pulumi (#4129) --- infrastructure/application/Pulumi.production.yaml | 2 ++ infrastructure/application/Pulumi.staging.yaml | 2 ++ infrastructure/application/index.ts | 2 +- infrastructure/application/services/hasura.ts | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/infrastructure/application/Pulumi.production.yaml b/infrastructure/application/Pulumi.production.yaml index 1fe6f91808..34249c3929 100644 --- a/infrastructure/application/Pulumi.production.yaml +++ b/infrastructure/application/Pulumi.production.yaml @@ -4,6 +4,8 @@ config: application:airbrake-project-key: secure: AAABAPIGB+gWevPn0SzWnuSuV1RmdwpLOlWKnu8cM/kxLfslvdCIRcU0n0M0XNJ3jwj4EdFn7/llsL1Kg2XnDA== application:cloudflare-zone-id: a9b9933f28e786ec4cfd4bb596f5a519 + application:db-url: + secure: AAABAFMl4J25TQyb+dAVA/8g5KR1aIP7cOZrrLqYzv4ScF4AGIDWnp6zC9wV+Odja2LZyy10cbUojs1mybg1EV82UAZfEX+HCcaNixJvTuoC0h4swDMdLXX9vvs1QqsC6Q+7qp96hQCT8CW81TbdDSVIu2mLbV8dnjyuD2R8o4tt5pBmXKCVJJ4zWI5LuukolIj3nw== application:encryption-key: secure: AAABAGbTpoRtazwoNFNmaPCW0RdeTqjhEzQuYR1kl4ft7EWNxqswAu8Dc9T+YBxkYr3uaHbu5obzyo8I4QuVgg== application:file-api-key: diff --git a/infrastructure/application/Pulumi.staging.yaml b/infrastructure/application/Pulumi.staging.yaml index 97b43c592a..5fc4b5f352 100644 --- a/infrastructure/application/Pulumi.staging.yaml +++ b/infrastructure/application/Pulumi.staging.yaml @@ -5,6 +5,8 @@ config: secure: AAABABujxMHxU8Abj4QpyQTz7bLt3AP2wBFaypVkDZ2khzc6eh6lHLljTEkzpLUncno3gNNDXnrmxzXvqKnQdQ== application:cloudflare-zone-id: secure: AAABAPZz/bzFCZEZd+jzPpYP4HXAOLYQmLGf2YLQE2YPfMBUtDC83KCo2l2DJ4AL4OKL+jFFx8wrrJc6DDwXJQ== + application:db-url: + secure: AAABAHaVuHg4NkZjMQv7N8hpKRJL13IW721pPo/ou6+itPn2PLYr8s8YjTbaxDGZg9LiB5QAgbihA1fSnIolokoZ/wJ7VzkHOI59Icci0CEoOgQrUfzDFevpgt3HaTmyrxIzemMbOPl/dGcJCTW0K9NkRADWE4z2OERcFwQBRUZuRSwIbV7teXpbY15IAW24FLNM+g== application:encryption-key: secure: AAABAFTW2eRwQnXJq/IboPWtStOWXiF9WcsUKEiuosmp7TLZt52uKE3L+NrEGgsThOl3NkvFW2HhFa2XL6aB5w== application:file-api-key: diff --git a/infrastructure/application/index.ts b/infrastructure/application/index.ts index cc389339b6..af8523914e 100644 --- a/infrastructure/application/index.ts +++ b/infrastructure/application/index.ts @@ -114,7 +114,7 @@ export = async () => { vpc, }); - const dbRootUrl: string = await data.requireOutputValue("dbRootUrl"); + const dbRootUrl: string = config.requireSecret("db-url"); // ----------------------- Metabase const pgRoot = url.parse(dbRootUrl); diff --git a/infrastructure/application/services/hasura.ts b/infrastructure/application/services/hasura.ts index 894fd8d249..244bd566af 100644 --- a/infrastructure/application/services/hasura.ts +++ b/infrastructure/application/services/hasura.ts @@ -20,7 +20,7 @@ export const createHasuraService = async ({ }: CreateService) => { const config = new pulumi.Config(); - const dbRootUrl: string = await data.requireOutputValue("dbRootUrl"); + const dbRootUrl: string = config.requireSecret("db-url"); const DOMAIN: string = await certificates.requireOutputValue("domain"); const lbHasura = new awsx.lb.ApplicationLoadBalancer("hasura", {