Skip to content

Commit ffae861

Browse files
authored
feat(core): add Fn::GetStackOutput for cross-region references (#37724)
By default, the CDK only allows references between resources if they are in the same environment (account and region). But users can opt in to an experimental feature that allows cross-region, same-account references, by setting the `crossRegionReference` flag to `true` in the consumer stack. With this feature on, when there is a cross-region reference, the CDK generates two custom resources that communicate with each other via SSM parameters. A writer resource is deployed to the producer stack, and a reader resource is deployed to the consumer stack. So far, this was the best mechanism to "export" a value in the producer and "import" it in the consumer. But CloudFormation has now released a new intrinsic function, `Fn::GetStackOutput`, which, as the name suggests, gets the value of a arbitrary output. This function works cross-region and cross-account. This PR introduces support for these two use cases. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent e207b76 commit ffae861

105 files changed

Lines changed: 23366 additions & 21988 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/asset.97484721f29e34bf38d7a459804dd2d2a8dea6f8c27d7531e215bf4274fbc895.bundle/index.js renamed to packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/asset.b5c2a7158e57582e84496b24c0499302cec1fd88624535b3dfb629311b3fdc2a.bundle/index.js

Lines changed: 19168 additions & 15893 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/asset.bbfb567dc956ce71e67ac1f96589821990e2ca48307b93a577bbb345d2de441b/__entrypoint__.js‎

Lines changed: 0 additions & 155 deletions
This file was deleted.

‎packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/asset.bbfb567dc956ce71e67ac1f96589821990e2ca48307b93a577bbb345d2de441b/index.js‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/cdk.out‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/cross-region-consumer.assets.json‎

Lines changed: 7 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)