Skip to content

Commit

Permalink
Tweak DNS invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
cybermaggedon committed Aug 8, 2023
1 parent 049f789 commit 73d7844
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 5 additions & 13 deletions pulumi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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");

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 73d7844

Please sign in to comment.