Skip to content
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

fix(ec2): cfn-init user data hash not updated if file asset changes #10216

Merged
merged 3 commits into from
Sep 7, 2020

Conversation

njlynch
Copy link
Contributor

@njlynch njlynch commented Sep 7, 2020

We fingerprint the cfn-init configuration to insert into the user data so
changes to the cfn-init config can trigger an instance replacement; however,
the fingerprint was being calculated on the raw config, including tokens,
so the asset hash was not being considered in the fingerprint.

This fix resolves the tokens so the fingerprint takes asset hashes into
consideration.

fixes #10206


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…r data

We fingerprint the cfn-init configuration to insert into the user data so
changes to the cfn-init config can trigger an instance replacement; however,
the fingerprint was being calculated on the raw config, including tokens,
so the asset hash was not being considered in the fingerprint.

This fix resolves the tokens so the fingerprint takes asset hashes into
consideration.

fixes #10206
@njlynch njlynch requested a review from a team September 7, 2020 11:44
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 7, 2020
@njlynch njlynch requested a review from rix0rrr September 7, 2020 14:52
@rix0rrr rix0rrr changed the title fix(ec2): cfn-init - asset-based file fingerprint not included in user data fix(ec2): cfn-init user data has not updated if file asset changes Sep 7, 2020
@rix0rrr rix0rrr changed the title fix(ec2): cfn-init user data has not updated if file asset changes fix(ec2): cfn-init user data hash not updated if file asset changes Sep 7, 2020
@mergify
Copy link
Contributor

mergify bot commented Sep 7, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 966f8de
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Sep 7, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 0d7ca63 into master Sep 7, 2020
@mergify mergify bot deleted the njlynch/cfn-init-asset-fingerprint branch September 7, 2020 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aws-ec2] Asset based file fingerprint is not included in ec2 user data.
3 participants