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: allow multi region stackset deployments with file assets #325

Merged
merged 7 commits into from
Feb 6, 2024

Conversation

josh-demuth
Copy link
Contributor

Fixes #159

Added support to use file assets across multiple regions in one stackset. This still requires to pass the asset bucket(s) to the construct. It also uses a bucket "prefix" which the stackset construct will append "-${region}" to the end of the bucket name. For example, all asset buckets across each region will need to have the same prefix like "assetbucket" and will need the region appended at the end "assetbucket-us-east-1" "assetbucket-us-west-2". it is out of scope of the construct to create these buckets at this time.

Copy link

@madeline-k madeline-k left a comment

Choose a reason for hiding this comment

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

  • update projenrc
  • update example - prefix should not have a region at the end

mbergkvist added a commit to mbergkvist/stacksetsandassets that referenced this pull request Jan 22, 2024
@josh-demuth josh-demuth reopened this Jan 23, 2024
@gshpychka
Copy link

Worth calling out that you are only talking about file assets when you say "assets". i.e. Docker image assets are not supported

@josh-demuth
Copy link
Contributor Author

josh-demuth commented Feb 4, 2024

Worth calling out that you are only talking about file assets when you say "assets". i.e. Docker image assets are not supported

good point. unfortunately docker assets would need a stable upstream construct similar to https://github.com/cdklabs/cdk-ecr-deployment. it is out of scope of this construct to build this at this time. similar to how the Service Catalog L2 does not support docker assets at this time.

@josh-demuth josh-demuth changed the title feat: allow multi region stackset deployments with assets feat: allow multi region stackset deployments with file assets Feb 4, 2024
@mergify mergify bot merged commit 497227d into cdklabs:main Feb 6, 2024
12 checks passed
@jwestbrook
Copy link

Of note this merge breaks the previous bucket asset setup. If you have an asset bucket that does not have a region name in the bucket name, you need to deprecate that bucket, and add a new bucket that contains the region in the name.

For anyone else, note assetBucketPrefix does not refer to the traditional AWS S3 object prefixes, it's referring to the bucket name only. The Readme uses the string 'prefix' which is a little vague. So as an example, if you pass the string 'my-org-stackset-assets' to assetBucketPrefix then you should have a bucket named my-org-stackset-assets-us-east-1 for any stacksets that deploy to us-east-1, and a bucket named my-org-stackset-assets-us-west-2 for any stacksets that deploy to us-west-2, etc.

IMO, a sanity check against the array of IBucket objects to check the bucket name ends with any region value string or the specific region value string this stackset is deploying to would be helpful.

mbergkvist added a commit to mbergkvist/stacksetsandassets that referenced this pull request Apr 4, 2024
Actually, all dependencies are updated, but
cdklabs/cdk-stacksets#325 has been merged and
released with 0.0.150 and this tests if it solved the issue here.
Sadly it did not.
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.

File Assets Error: The bucket is in this region:
4 participants