core(cli): hotswap to be more tolerant of the Fn::ImportValue
usage
#21320
Labels
@aws-cdk/core
Related to core CDK functionality
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
Describe the feature
The CDK CLI will refuse to hotswap a resource if its definition contains the intrinsic function
Fn::Import
.This is because the hotswap feature needs the template to be fully resolved in order to correctly determine the changes; and
Fn::ImportValue
is not supported by CDK's resolver function.The hotswap feature should be more tolerant of the
Fn::ImportValue
usage. It should accept the case whereFn::ImportValue
is use and the import name has not changed. This is the case where we can safely assume that the value will not change (thanks to CloudFormation's protection around exported/imported names). To be more specific on the expected behavior:Use Case
Fn::ImportValue
is commonly used by CDK applications. Some users may be using it without knowing it. But as soon as their template uses this intrinsic function, hotswap will stop working.Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.33.0 (build 859272d)
Environment details (OS name and version, etc.)
Darwin Kernel Version 21.6.0
The text was updated successfully, but these errors were encountered: