-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the feature
We are using a custom resource to fetch an API Gateway integration parameter dynamically at deployment time and noticed that the API Gateway deployment logical ID does not change due to the logical ID being calculated as the hash of the cfn template. Since we are using customer resources, cdk does not detect a change during build time and hence does create a new Deployment resource with a new logical ID.
We noticed later on that we can using the addLogicalId method to force CDK to generate a new Deployment resource each time, however would it be possible to always update the Deployment logical ID if custom resource is used to to fetch any properties.
Use Case
Automatically update the API Gateway Deployment resource logical ID when there is a custom resource to fetch an API Gateway integration parameter, or other properties.
Proposed Solution
If any custom resource is detected in the RestApi or SpecRestApi cloudformation template, invoke addToLogicalId with an UUID so that a new hash would be generated.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
^2.158.0
Environment details (OS name and version, etc.)
MacOS 14.6.1 (23G93)