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

fix(core): crossRegionReferences doesn't work when exporting to multiple regions #25190

Merged
merged 3 commits into from
Apr 21, 2023
Merged

fix(core): crossRegionReferences doesn't work when exporting to multiple regions #25190

merged 3 commits into from
Apr 21, 2023

Conversation

corymhall
Copy link
Contributor

The cross region export writer was only being given permissions to the first region it would export to. Fixing this by adding each consuming region to the IAM policy.

fixes #24464


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

multiple regions

The cross region export writer was only being given permissions to the
first region it would export to. Fixing this by adding each consuming
region to the IAM policy.

fixes #24464
@aws-cdk-automation aws-cdk-automation requested a review from a team April 19, 2023 14:18
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p1 labels Apr 19, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 19, 2023
@otaviomacedo otaviomacedo added the pr/do-not-merge This PR should not be merged at this time. label Apr 21, 2023
@gitpod-io
Copy link

gitpod-io bot commented Apr 21, 2023

@corymhall corymhall removed the pr/do-not-merge This PR should not be merged at this time. label Apr 21, 2023
@mergify
Copy link
Contributor

mergify bot commented Apr 21, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: f9d16f0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 89b26b8 into aws:main Apr 21, 2023
@mergify
Copy link
Contributor

mergify bot commented Apr 21, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

mergify bot pushed a commit that referenced this pull request May 4, 2023
…25384)

The first attempt to fix this in #25190 didn't work because it didn't account for the fact that when exporting to multiple regions, we create multiple `ExportWriter`s that all use the same provider (and provider role).

This PR fixes that by adding the policy cross region ARNs directly to the custom resource provider (1 per stack) rather than the `ExportWriter` (multiple per stack). I also updated the test case to better account for this scenario.

fixes #25377

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@renschler
Copy link

renschler commented Jul 5, 2023

is this fix live in the node aws-cdk library?

I ran into this bug but I'm still on aws-cdk 2.60.0 (build 2d40d77).

Does this PR being merged mean that it was released?

@corymhall
Copy link
Contributor Author

is this fix live in the node aws-cdk library?

yep, it was released in v2.77.0

@renschler
Copy link

@corymhall my hero! thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(core): crossRegionReference only works for first destination region
4 participants