Describe the feature
Add an optional property to AwsCustomResource whose only purpose is to participate in CloudFormation change detection.
When the value of this property changes, CloudFormation would send an Update event to the custom resource, causing the configured onUpdate SDK call to run again.
The property would not be passed to the AWS SDK call itself.
For example:
new AwsCustomResource(this, 'Resource', {
onUpdate: {
service: 'SomeService',
action: 'someAction',
parameters: {
// ...
},
physicalResourceId: PhysicalResourceId.of('Resource'),
},
updateTrigger: someParameter.valueAsString,
policy: AwsCustomResourcePolicy.fromSdkCalls({
resources: AwsCustomResourcePolicy.ANY_RESOURCE,
}),
});
Use Case
There are cases where an AwsCustomResource needs to rerun its onUpdate call because some external deployment input changed, even though that input is not itself a parameter to the AWS SDK operation.
For example, an SSM parameter, configuration version, hash, or another resource attribute may determine when the SDK call should be refreshed.
Proposed Solution
No response
Other Information
Would be happy to make a pull request if the maintainers are happy with this feature.
Acknowledgements
AWS CDK Library version (aws-cdk-lib)
2.269.0
AWS CDK CLI version
2.1141.0
Environment details (OS name and version, etc.)
Not relevant
Describe the feature
Add an optional property to AwsCustomResource whose only purpose is to participate in CloudFormation change detection.
When the value of this property changes, CloudFormation would send an Update event to the custom resource, causing the configured onUpdate SDK call to run again.
The property would not be passed to the AWS SDK call itself.
For example:
Use Case
There are cases where an AwsCustomResource needs to rerun its onUpdate call because some external deployment input changed, even though that input is not itself a parameter to the AWS SDK operation.
For example, an SSM parameter, configuration version, hash, or another resource attribute may determine when the SDK call should be refreshed.
Proposed Solution
No response
Other Information
Would be happy to make a pull request if the maintainers are happy with this feature.
Acknowledgements
AWS CDK Library version (aws-cdk-lib)
2.269.0
AWS CDK CLI version
2.1141.0
Environment details (OS name and version, etc.)
Not relevant