diff --git a/.github/workflows/deploy-dev.yaml b/.github/workflows/deploy-dev.yaml index 6c71c27..5de32e4 100644 --- a/.github/workflows/deploy-dev.yaml +++ b/.github/workflows/deploy-dev.yaml @@ -115,8 +115,7 @@ jobs: ARTIFACT_NAME: dev ARTIFACT_REPO_REGION: europe-west1 WEB_HOSTNAME: graph.dev.pivotlabs.vc - DOMAIN: dev.pivotlabs.vc. - DNS_DOMAIN_DESCRIPTION: dev + MANAGED_ZONE: dev SPARQL_MIN_SCALE: "0" SPARQL_MAX_SCALE: "1" WEB_MIN_SCALE: "0" diff --git a/.github/workflows/deploy-prod.yaml b/.github/workflows/deploy-prod.yaml index ef29763..67eada7 100644 --- a/.github/workflows/deploy-prod.yaml +++ b/.github/workflows/deploy-prod.yaml @@ -117,8 +117,7 @@ jobs: ARTIFACT_NAME: pivot-labs ARTIFACT_REPO_REGION: europe-west1 WEB_HOSTNAME: graph.innovate.pivotlabs.vc - DOMAIN: innovate.pivotlabs.vc. - DNS_DOMAIN_DESCRIPTION: innovate + MANAGED_ZONE: innovate SPARQL_MIN_SCALE: "0" SPARQL_MAX_SCALE: "1" WEB_MIN_SCALE: "0" diff --git a/.github/workflows/deploy-staging.yaml b/.github/workflows/deploy-staging.yaml index ab80e2f..2c953f7 100644 --- a/.github/workflows/deploy-staging.yaml +++ b/.github/workflows/deploy-staging.yaml @@ -115,8 +115,7 @@ jobs: ARTIFACT_NAME: staging ARTIFACT_REPO_REGION: europe-west1 WEB_HOSTNAME: graph.staging.pivotlabs.vc - DOMAIN: staging.pivotlabs.vc. - DNS_DOMAIN_DESCRIPTION: staging + MANAGED_ZONE: staging SPARQL_MIN_SCALE: "0" SPARQL_MAX_SCALE: "1" WEB_MIN_SCALE: "0" diff --git a/pulumi/index.ts b/pulumi/index.ts index 5f888b6..63a0caf 100644 --- a/pulumi/index.ts +++ b/pulumi/index.ts @@ -24,6 +24,9 @@ if (!process.env.ARTIFACT_NAME) if (!process.env.WEB_HOSTNAME) throw Error("WEB_HOSTNAME not defined"); +if (!process.env.MANAGED_ZONE) + throw Error("MANAGED_ZONE not defined"); + if (!process.env.GCP_PROJECT) throw Error("GCP_PROJECT not defined"); @@ -36,12 +39,6 @@ if (!process.env.ENVIRONMENT) if (!process.env.CLOUD_RUN_REGION) throw Error("CLOUD_RUN_REGION not defined"); -if (!process.env.DNS_DOMAIN_DESCRIPTION) - throw Error("DNS_DOMAIN_DESCRIPTION not defined"); - -if (!process.env.DOMAIN) - throw Error("DOMAIN not defined"); - if (!process.env.WEB_MIN_SCALE) throw Error("WEB_MIN_SCALE not defined"); @@ -283,14 +280,9 @@ export const webhost = webDomainMapping.statuses.apply( x => x.rrdata ); -const zone = new gcp.dns.ManagedZone( - "zone", +const zone = gcp.dns.getManagedZoneOutput( { - name: process.env.DNS_DOMAIN_DESCRIPTION, - description: process.env.DOMAIN, - dnsName: process.env.DOMAIN, - labels: { - }, + name: process.env.MANAGED_ZONE, }, { provider: provider,