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

(aws-ec2): cfn-init includeRole is incomplete #16501

Closed
maafk opened this issue Sep 15, 2021 · 1 comment · Fixed by #16503
Closed

(aws-ec2): cfn-init includeRole is incomplete #16501

maafk opened this issue Sep 15, 2021 · 1 comment · Fixed by #16503
Labels
@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 p1

Comments

@maafk
Copy link
Contributor

maafk commented Sep 15, 2021

#16121 is incomplete and passes the incorrect role to the --role flag in the cfn-init command

Reproduction Steps

new autoscaling.AutoScalingGroup(this, 'ASG', {
  // ...

  init: ec2.CloudFormationInit.fromElements(
    ec2.InitFile.fromString('/etc/my_instance', 'This got written during instance startup'),
  ),
  initOptions: autoscaling. ApplyCloudFormationInitOptions(
    includeRole: true,
    includeUrl: true
  ) 
  signals: autoscaling.Signals.waitForAll({
    timeout: Duration.minutes(10),
  }),
});

What did you expect to happen?

EC2 instance in ASG bootstrapped with cfn-init fails to run

What actually happened?

The value generated for --role is incorrect, causing a 404 when running the cfn-init command

Environment

  • CDK CLI Version : 1.122.0
  • Framework Version:
  • Node.js Version: v14.16.1
  • OS : Darwin
  • Language (Version): all

Other

I have a PR ready


This is 🐛 Bug Report

@maafk maafk added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 15, 2021
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Sep 15, 2021
@njlynch njlynch added effort/small Small work item – less than a day of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Sep 21, 2021
@njlynch njlynch removed their assignment Sep 21, 2021
@mergify mergify bot closed this as completed in #16503 Sep 21, 2021
mergify bot pushed a commit that referenced this issue Sep 21, 2021
closes #16501 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@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 p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants