-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Add the ability to encrypt root_block_device in aws_launch_configuration #7759
Add the ability to encrypt root_block_device in aws_launch_configuration #7759
Conversation
The API documentation for this parameter is pretty confusing 😅
Are we sure this actually does anything for unencrypted root block devices to encrypt them? It might be worth spinning this up in an autoscaling group and verifying. We've seen this a bunch with EC2 Launch Templates where the template will create but its actual usage will cause an error. |
It will definitely not do this. This only works if the instance type supports it. If you're using a snapshot, it must be encrypted. Also, like I said no KMS support so it'll be encrypted with your I'll run a more manual test and report back. I did verify in the console that |
https://aws.amazon.com/about-aws/whats-new/2019/05/launch-encrypted-ebs-backed-ec2-instances-from-unencrypted-amis-in-a-single-step/ may have changed that |
Yep - AWS now allows you to launch instances with encrypted root block devices from amis with unencrypted ones.Also supports adding a KMS key, i can add support for the latter once this is merged to master.We need this badly. More documentation here-: Edit-: |
Can we have this merged now and create a new PR for supporting KMS key ID once that feature is in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this, @joestump 🚀 Only change on merge was switching from Default: false
to Computed: true
just to prevent any oddities with existing Terraform configurations.
Output from acceptance testing:
--- PASS: TestAccAWSLaunchConfiguration_importBasic (15.77s)
--- PASS: TestAccAWSLaunchConfiguration_withSpotPrice (16.30s)
--- PASS: TestAccAWSLaunchConfiguration_withBlockDevices (18.98s)
--- PASS: TestAccAWSLaunchConfiguration_ebs_noDevice (19.10s)
--- PASS: TestAccAWSLaunchConfiguration_withEncryption (19.28s)
--- PASS: TestAccAWSLaunchConfiguration_withIAMProfile (30.49s)
--- PASS: TestAccAWSLaunchConfiguration_basic (31.32s)
--- PASS: TestAccAWSLaunchConfiguration_encryptedRootBlockDevice (31.67s)
--- PASS: TestAccAWSLaunchConfiguration_updateEbsBlockDevices (32.94s)
--- PASS: TestAccAWSLaunchConfiguration_updateRootBlockDevice (33.81s)
--- PASS: TestAccAWSLaunchConfiguration_userData (34.58s)
--- PASS: TestAccAWSLaunchConfiguration_withVpcClassicLink (42.25s)
This has been released in version 2.23.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
NOTE - this seems to have broken the instance store case. When creating an instance-store launch template, it fails with:
EDIT - full issue in #9775 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Refs #6246
Refs #8624
Changes proposed in this pull request:
encrypted
attribute to theroot_block_device
onaws_launch_configuration
.NOTE: It appears
KmsKeyId
is not supported by this API.Output from acceptance testing: