-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
resource/aws_instance: Add tags
parameter to root_block_device
, ebs_block_device
blocks (#12225)
#15474
resource/aws_instance: Add tags
parameter to root_block_device
, ebs_block_device
blocks (#12225)
#15474
Conversation
383aba4
to
069f1e1
Compare
@klebediev I apologize if I was unclear. Please review #12225 (comment). Rather than "ebs_block_device": {
Type: schema.TypeSet,
Optional: true,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
// other existing code...
"snapshot_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"tags": tagsSchema(),
"volume_size": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
ForceNew: true,
},
// other existing code...
},
},
// other existing code...
},
// "ephemeral_block_device"... can these be tagged? may need tags here too
"root_block_device": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
// "You can only modify the volume size, volume type, and Delete on
// Termination flag on the block device mapping entry for the root
// device volume." - bit.ly/ec2bdmap
Schema: map[string]*schema.Schema{
// other existing code...
"iops": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
DiffSuppressFunc: iopsDiffSuppressFunc,
},
"tags": tagsSchema(),
"volume_size": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
},
// other existing code...
},
},
}, Hopefully, this example makes it more clear! Let me know if you have questions. |
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.
Instead of root_volume_tags
, please add tags
within the ebs_block_device
and root_block_device
blocks.
ohh.. my fault, you were clear, but for some reason I was reading wrong comment (right above that you referred to) |
@klebediev Thanks for your work on this! We look forward to your update. If anything changes on your end with your schedule, let us know! |
73bc62e
to
224bf72
Compare
649938c
to
f0cc4ab
Compare
|
Can't say I like how it's implemented (it's a bit tricky to deal with 2 or more parameters controlling the same functionality), but at least it works in all cases except importing when @YakDriver might you take a quick look at this and advise if this could be implemented better |
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.
--- PASS: TestAccAWSInstance_addSecondaryInterface (181.43s)
--- PASS: TestAccAWSInstance_addSecurityGroupNetworkInterface (190.56s)
--- PASS: TestAccAWSInstance_associatePublic_defaultPrivate (89.09s)
--- PASS: TestAccAWSInstance_associatePublic_defaultPublic (224.23s)
--- PASS: TestAccAWSInstance_associatePublic_explicitPrivate (100.27s)
--- PASS: TestAccAWSInstance_associatePublic_explicitPublic (214.61s)
--- PASS: TestAccAWSInstance_associatePublic_overridePrivate (99.56s)
--- PASS: TestAccAWSInstance_associatePublic_overridePublic (109.78s)
--- PASS: TestAccAWSInstance_associatePublicIPAndPrivateIP (114.88s)
--- PASS: TestAccAWSInstance_atLeastOneOtherEbsVolume (164.65s)
--- PASS: TestAccAWSInstance_basic (91.43s)
--- PASS: TestAccAWSInstance_blockDevices (93.37s)
--- PASS: TestAccAWSInstance_blockDeviceTags_ebsAndRoot (127.19s)
--- PASS: TestAccAWSInstance_blockDeviceTags_volumeTags (179.42s)
--- PASS: TestAccAWSInstance_blockDeviceTags_withAttachedVolume (173.43s)
--- PASS: TestAccAWSInstance_changeInstanceType (170.63s)
--- PASS: TestAccAWSInstance_CreditSpecification_Empty_NonBurstable (315.86s)
--- PASS: TestAccAWSInstance_creditSpecification_isNotAppliedToNonBurstable (114.38s)
--- PASS: TestAccAWSInstance_creditSpecification_standardCpuCredits (144.36s)
--- PASS: TestAccAWSInstance_creditSpecification_standardCpuCredits_t2Tot3Taint (454.12s)
--- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t2 (110.36s)
--- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t3 (338.63s)
--- PASS: TestAccAWSInstance_creditSpecification_unlimitedCpuCredits (138.75s)
--- PASS: TestAccAWSInstance_creditSpecification_unlimitedCpuCredits_t2Tot3Taint (225.89s)
--- PASS: TestAccAWSInstance_creditSpecification_unspecifiedDefaultsToStandard (122.18s)
--- PASS: TestAccAWSInstance_CreditSpecification_UnspecifiedToEmpty_NonBurstable (136.87s)
--- PASS: TestAccAWSInstance_creditSpecification_updateCpuCredits (176.97s)
--- PASS: TestAccAWSInstance_creditSpecificationT3_standardCpuCredits (122.82s)
--- PASS: TestAccAWSInstance_creditSpecificationT3_unlimitedCpuCredits (144.93s)
--- PASS: TestAccAWSInstance_creditSpecificationT3_unspecifiedDefaultsToUnlimited (324.56s)
--- PASS: TestAccAWSInstance_creditSpecificationT3_updateCpuCredits (136.49s)
--- PASS: TestAccAWSInstance_dedicatedInstance (111.88s)
--- PASS: TestAccAWSInstance_disableApiTermination (147.33s)
--- PASS: TestAccAWSInstance_disappears (68.70s)
--- PASS: TestAccAWSInstance_EbsBlockDevice_InvalidIopsForVolumeType (8.29s)
--- PASS: TestAccAWSInstance_EbsBlockDevice_InvalidThroughputForVolumeType (7.43s)
--- PASS: TestAccAWSInstance_EbsBlockDevice_KmsKeyArn (109.12s)
--- PASS: TestAccAWSInstance_EbsRootDevice_basic (138.20s)
--- PASS: TestAccAWSInstance_EbsRootDevice_ModifyAll (143.95s)
--- PASS: TestAccAWSInstance_EbsRootDevice_ModifyDeleteOnTermination (120.57s)
--- PASS: TestAccAWSInstance_EbsRootDevice_ModifyIOPS_Io1 (172.28s)
--- PASS: TestAccAWSInstance_EbsRootDevice_ModifyIOPS_Io2 (130.38s)
--- PASS: TestAccAWSInstance_EbsRootDevice_ModifySize (132.30s)
--- PASS: TestAccAWSInstance_EbsRootDevice_ModifyThroughput_Gp3 (152.25s)
--- PASS: TestAccAWSInstance_EbsRootDevice_ModifyType (141.72s)
--- PASS: TestAccAWSInstance_EbsRootDevice_MultipleBlockDevices_ModifyDeleteOnTermination (108.78s)
--- PASS: TestAccAWSInstance_EbsRootDevice_MultipleBlockDevices_ModifySize (172.46s)
--- PASS: TestAccAWSInstance_EbsRootDevice_MultipleDynamicEBSBlockDevices (213.17s)
--- PASS: TestAccAWSInstance_Empty_PrivateIP (104.27s)
--- PASS: TestAccAWSInstance_enclaveOptions (216.43s)
--- PASS: TestAccAWSInstance_forceNewAndTagsDrift (162.62s)
--- PASS: TestAccAWSInstance_getPasswordData_falseToTrue (153.69s)
--- PASS: TestAccAWSInstance_getPasswordData_trueToFalse (186.56s)
--- PASS: TestAccAWSInstance_GP2IopsDevice (156.85s)
--- PASS: TestAccAWSInstance_GP2WithIopsValue (7.61s)
--- PASS: TestAccAWSInstance_hibernation (199.64s)
--- PASS: TestAccAWSInstance_inDefaultVpcBySgId (92.83s)
--- PASS: TestAccAWSInstance_inDefaultVpcBySgName (103.11s)
--- PASS: TestAccAWSInstance_inEc2Classic (78.07s)
--- PASS: TestAccAWSInstance_instanceProfileChange (223.90s)
--- PASS: TestAccAWSInstance_ipv6_supportAddressCount (99.40s)
--- PASS: TestAccAWSInstance_ipv6_supportAddressCountWithIpv4 (100.63s)
--- PASS: TestAccAWSInstance_ipv6AddressCountAndSingleAddressCausesError (15.70s)
--- PASS: TestAccAWSInstance_keyPairCheck (101.77s)
--- PASS: TestAccAWSInstance_metadataOptions (178.23s)
--- PASS: TestAccAWSInstance_NetworkInstanceRemovingAllSecurityGroups (142.18s)
--- PASS: TestAccAWSInstance_NetworkInstanceSecurityGroups (119.27s)
--- PASS: TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs (119.96s)
--- PASS: TestAccAWSInstance_NewNetworkInterface_EmptyPrivateIPAndSecondaryPrivateIPs (100.96s)
--- PASS: TestAccAWSInstance_NewNetworkInterface_EmptyPrivateIPAndSecondaryPrivateIPsUpdate (165.49s)
--- PASS: TestAccAWSInstance_NewNetworkInterface_PrivateIPAndSecondaryPrivateIPs (319.49s)
--- PASS: TestAccAWSInstance_NewNetworkInterface_PrivateIPAndSecondaryPrivateIPsUpdate (166.89s)
--- PASS: TestAccAWSInstance_NewNetworkInterface_PublicIPAndSecondaryPrivateIPs (423.94s)
--- PASS: TestAccAWSInstance_noAMIEphemeralDevices (62.00s)
--- PASS: TestAccAWSInstance_placementGroup (323.68s)
--- PASS: TestAccAWSInstance_primaryNetworkInterface (154.91s)
--- PASS: TestAccAWSInstance_primaryNetworkInterfaceSourceDestCheck (156.34s)
--- PASS: TestAccAWSInstance_privateIP (209.27s)
--- PASS: TestAccAWSInstance_RootBlockDevice_KmsKeyArn (82.50s)
--- PASS: TestAccAWSInstance_rootBlockDeviceMismatch (83.04s)
--- PASS: TestAccAWSInstance_rootInstanceStore (100.11s)
--- PASS: TestAccAWSInstance_sourceDestCheck (169.24s)
--- PASS: TestAccAWSInstance_tags (111.91s)
--- PASS: TestAccAWSInstance_UserData_EmptyStringToUnspecified (130.54s)
--- PASS: TestAccAWSInstance_UserData_UnspecifiedToEmptyString (133.43s)
--- PASS: TestAccAWSInstance_userDataBase64 (113.53s)
--- PASS: TestAccAWSInstance_withIamInstanceProfile (114.62s)
--- SKIP: TestAccAWSInstance_outpost (1.13s)
@YakDriver thank you very much for all the work you've done! |
@klebediev Thank you for your work on this!! 🎉 There were no real changes with the functionality of your fixes - some minor variable name tweaks and test tweaks. I did some gardening with all the attributes/arguments but that was really secondary. Also, I saw what you were discussing with EBS volumes since the instance really isn't handling those. At some point, I think we should either add support to manage EBS volumes properly from |
This has been released in version 3.24.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! |
Causes: #17125 |
Did this PR cause the removal of
If it was indeed this PR what caused the change why wouldn't it worth to communicate this via CHANGELOG entry? UPD: the
|
This effectively removes the churn-ing that is happening when an ebs_volume is attached separately from the module Takes advantage of the new feature in the aws provider available as of 3.24.0. hashicorp/terraform-provider-aws#15474
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! |
Community Note
Closes #12225, closes #17074, closes #5878, closes #5609, closes #5080, closes #770, closes #729, closes #884, closes #9156, closes #12226, closes #9033
Similar PR #12226 #9156
Release note for CHANGELOG:
Output from acceptance testing: