Skip to content

Commit

Permalink
Set a region on the canary CDK stack to simplify deployment (#2954)
Browse files Browse the repository at this point in the history
Previously, if you forgot to set the region, the deployment would fail
with a confusing error about the OIDC provider already existing, which
can easily lead down a rabbit hole.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
jdisanti authored Aug 29, 2023
1 parent 0d44c68 commit 2653bf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tools/ci-cdk/bin/canary-only.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ import { App } from "aws-cdk-lib";
import { CanaryStack } from "../lib/aws-sdk-rust/canary-stack";

const app = new App();
const env = { region: "us-west-2" };

new CanaryStack(app, "aws-sdk-rust-canary-stack", {});
new CanaryStack(app, "aws-sdk-rust-canary-stack", { env });
9 changes: 7 additions & 2 deletions tools/ci-cdk/bin/ci-cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ import { PullRequestCdnStack } from "../lib/smithy-rs/pull-request-cdn-stack";
import { CanaryStack } from "../lib/aws-sdk-rust/canary-stack";
import { OidcProviderStack } from "../lib/oidc-provider-stack";

const app = new App();
const app = new App({});
const env = { region: "us-west-2" };

const oidcProviderStack = new OidcProviderStack(app, "oidc-provider-stack", {});
const oidcProviderStack = new OidcProviderStack(app, "oidc-provider-stack", {
env,
});

new PullRequestCdnStack(app, "smithy-rs-pull-request-cdn-stack", {
githubActionsOidcProvider: oidcProviderStack.githubActionsOidcProvider,
env,
});

new CanaryStack(app, "aws-sdk-rust-canary-stack", {
githubActionsOidcProvider: oidcProviderStack.githubActionsOidcProvider,
env,
});

0 comments on commit 2653bf8

Please sign in to comment.