Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: option to configure partition with env var #895

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

mbergkvist
Copy link
Contributor

Adds support for deployment to aws-cn partition by checking an optional environemt variable, CDK_AWS_PARTITION. The partition is currently not available to the pipeline in the jobForDeploy, adding the environment variable is a non-breaking change to get the pipeline to deploy to aws-cn.

This has been verified with stacks and nested stacks in multiple stages in aws-cn.

Fixes #820

@mbergkvist
Copy link
Contributor Author

#868

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, can we unit test this just for posterity? also, maybe a reference in the README would be helpful. doesn't have to be front and center, i don't imagine that many people in aws-cn are using this :)

@mbergkvist
Copy link
Contributor Author

looks good, can we unit test this just for posterity?

Absolutely. I'll see what I can do.

also, maybe a reference in the README would be helpful. doesn't have to be front and center, i don't imagine that many people in aws-cn are using this :)

Of course. I don't know why I didn't add it in the first place 🤦
Any suggestion under what section this would belong?

@mbergkvist mbergkvist force-pushed the add-aws-cn-support branch 2 times, most recently from 65ebea9 to 80a9e89 Compare March 6, 2024 05:33
@mbergkvist
Copy link
Contributor Author

@kaizencc I've updated the documentation, I'm not a technical writer though so feel free to update it.

I've also added test suites, I figured it would get good coverage by duplicating the current test suites that are relevant for the changes here, and tweaking them for the aws-cn case.

@mbergkvist mbergkvist requested a review from kaizencc March 7, 2024 08:27
@mbergkvist
Copy link
Contributor Author

@kaizencc Is this ok to be merged?

README.md Outdated Show resolved Hide resolved
@kaizencc kaizencc changed the title feat: option configure partition with env var feat: option to configure partition with env var Mar 18, 2024
Adds support for deployment to aws-cn partition by checking an optional
environemt variable, CDK_AWS_PARTITION. The partition is currently not
available to the pipeline in the jobForDeploy, adding the environment
variable is a non-breaking change to get the pipeline to deploy to aws-cn.
The github, runner-provided and stage-options tests are duplicated and
modified for using the aws-cn partition for the pipeline. The difference
between the snapshots for the test suites looks correct when reviewing.
@mergify mergify bot merged commit 678f05e into cdklabs:main Mar 19, 2024
12 checks passed
@mbergkvist mbergkvist deleted the add-aws-cn-support branch March 19, 2024 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for aws-cn partition
2 participants