-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
CDK Hotswap Feature : AWS::CloudFront::Distribution Attribute Support #29224
Comments
I guess your CDK application might contain the cloudfront distribution and you are referencing the distribution ID in the container env var. The hotswap would not be able to resolve the |
Thanks for taking a look! That's right - the CDK code creates a cloudfront distribution and exports the DomainName. Later, the DomainName is added to the environment variables for the ECS container. I'll see if I can get together a code snippet - it might take a while to put something together since I can't publish the code directly. |
Created a public Github repo that you can use to reproduce the issue: https://github.com/bellomal/HelloWorldCDKApp/tree/main Steps to reproduce are in the README. I'll paste them here just in case:
|
Side question - is there some way I can least pull the value of EDIT: |
Describe the bug
When doing a hotswap deployment of an ECS instance, the following error was thrown:
Looking at the
cdk synth
output (check current behavior), we can see that one of the ECS instance environment variables is a Distribution DomainName.Opening this ticket as instructed by the error message. If this isn't the correct place for this ticket, let me know and I can reroute it to the appropriate location.
Expected Behavior
The hotswap deployment to succeed, since the Distribution DomainName has not changed.
Current Behavior
The hotswap deployment fails. As far as I can tel, this is because the DomainName attribute of the Distribution resource is not supported. See the below snippet of the
cdk synth
result for more context.Reproduction Steps
Run a hotswap deployment for an ECS instance that contains a Distribution attribute in it's definition.
Possible Solution
Similar to #21320, allow hotswap to tolerate the use of this attribute if it's value hasn't been changed.
Additional Information/Context
No response
CDK CLI Version
2.127.0
Framework Version
No response
Node.js Version
14.x
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: