[aws-ec2] Asset based file fingerprint is not included in ec2 user data. #10206
Labels
@aws-cdk/aws-autoscaling
Related to Amazon EC2 Auto Scaling
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
needs-triage
This issue or PR still needs to be triaged.
p1
When using CFN init with an
ec2.Instance
, settinguserDataCausesReplacement
(not default) andinitOptions.embedFingerprint
(the default) normally means modifying the provided CloudFormationInit will replace the instance.However, with
InitFile
(added in #9664) usingInitFile.FromAsset
to specify a local file to be delivered as an asset, updating the local file does not update the fingerprint embedded in the user data, so instances are not replaced, even though the new asset is deployed.Reproduction Steps
ec2.Instance
withuserDataCausesReplacement
andinitOptions.embedFingerprint
and aCloudFormationInit
containing anInitFile.FromAsset
with a local file.What did you expect to happen?
The instance should be replaced.
What actually happened?
The instance is not replaced, even though the asset is.
Environment
Other
This might be intended and/or desirable behavior. Regardless, a flag like
includeFileAssetsInFingerprint
oninitOptions
orincludeInFingerprint
oninitFileOptions
would be prudent.This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: