Skip to content

Commit 5648199

Browse files
authored
fix(ecr): allow creating repository uri to use tokens like cfn params (#32053)
### Issue # (if applicable) Closes #31860. ### Reason for this change Currently customers can pass one property `tagOrDigest` and if the customers pass a CFN parameter, CDK could not know if it is a tag or digest, and so the generated URI is not correct. Now the same parameter can supports Tokens, and it will generate a CFN condition to check if the value of this token is digest or tag, and then update the uri based on the condition output. ### Description of changes Check if the input is a Token, and so instead of determining if its value is a tag or digest in synth time, we create a CFN condition to do this check in CFN, and then determine how to build the repo uri. ### Description of how you validated changes Added unit test cases, and integration test cases with assertions. ### Checklist - [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 2323877 commit 5648199

File tree

22 files changed

+33923
-52
lines changed

22 files changed

+33923
-52
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.image.js.snapshot/LambdaFunctionWithRepoImageUsingCfnParameterAssertionStack.assets.json

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)