-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
feature request: allow tags for ebs_block_device entities within an aws_instance resource #3531
Comments
My team relies on ebs volume tags heavily for identifying attachment information, and snapshot management. This would be very helpful for us to add into TF |
Yes I need this as well. |
This is very useful. There should also be the capability to automatically create tags for the volumes based on the instance tags. |
Good idea, its clearly a missing feature. |
👍 |
Would be a great feature. Without it every time we drop an instance with delete_on_termination=false on its root partition (we rely heavily on EBS for root volumes) we end up with a volume that is pretty hard to associate with a particular node... |
+1 |
1 similar comment
👍 |
I'm keen to have a go at this but would appreciate input from @phinze or @jen20 before starting, as this enhancement requires changing the behaviour of the The AWS API The most obvious way for me to implement this is to duplicate the behaviour from the I'm imagining a similar wait before a call to Thoughts? |
👍 |
+1 please add this feature! |
any update on this feature ? |
This would be very useful for me as well. Need to tag these volumes on an instance for billing. An additional feature that would be nice would maybe just be a flag at the instance level to use the same tags on the instance as on the volumes. |
@paultyng Global tags are better than nothing, but I'd still like to tag the instance with "hostname", but tag the volumes with "hostname:/mountpoint". |
+1 really need this as well |
+1 extremely important for us! |
+1 need this! |
+1 need this also. Rather than create a new enhancement, can i also request that this ability (being able to add tags) be added for the root_block_device type also. |
As far as I can see, setting tags in an "additional" EBS volume is possible by using a separate |
There should be an option to tag the block device like below irrespective of the global tag feature.
|
From a cost tracking perspective this is huge! I'd like the volumes created for an instance to inherit the tags from the instance. |
+1. Inherit tags from instance by default as first step and allow override at ebs_block_device as second step. |
+1 |
Hey there guys, is there any workaround to provide tags for the root volume currently? Cheers |
I haven't tried it, but it seems a possible workaround might be to:
|
Would this new AWS feature help with implementing this in terraform?
https://aws.amazon.com/blogs/aws/new-tag-ec2-instances-ebs-volumes-on-creation/ |
Yes I need this feature as well |
+1 I need this feature as well. |
+1 |
I think this was implemented in /pull/14007. |
It is related to /issues/14107 though, still having issues with the new behaviour |
@stumyp what is the issue you are facing? |
@stack72 I've linked it here for information, will try to replicate the issue with 0.9.5, we should discuss it there, I think. |
Currently we have 100 instances created without tags using terraform. our requirement is to update tags to ebs_block_device also along with EC2 e.t.c . When I update terraform to update tags for ebs_block_Device, its throwing error "ebs_block_device.0: invalid or unknown key: tags" Anyone has work around . |
We wrote a simple script using the AWS SDK that goes over all EBS volumes and if untagged with the tag we want, we look for the instance resource ID and we take the tag from there. for example - if we have a tag "Stack" on the instance and we need it on the EBS volume as well, we're taking the same value from the instance and creating a tag on the untagged EBS. |
DvirM, would you be able to share script in this forum as we are trying to do above step in us-east-2 region Appreciated... |
Sure - this is Ruby, You'll need to edit the script to make it suit your needs. I'm looking for "Business Unit" and the volume "Name".
|
https://www.terraform.io/docs/providers/aws/r/instance.html#volume_tags seems to work fine... but it would be nice to have unique tags per ebs_block_device. Would be better if "tags" was an argument to ebs_block_device mappings. |
Hi, Thank you guys for the fix. |
+1 to @Jonnymcc |
+1 to nick4fake Will be good to allow specifying volume_tags from autoscaling group configuration. |
Agree with @Jonnymcc and @anmiles - per the original issue description, having a tags block in the *_block_device block of an aws_instance would be much more useful than volume_tags for my use cases, since volume_tags scribbles on all of the attached volumes indiscriminately. What's the protocol for reopening issues on this project? Or should we file a new one? |
@mr-olson as this sounds like an enhancement to a resource in the AWS provider, please feel free to double check for an existing issue and open a new enhancement issue in its repository: https://github.com/terraform-providers/terraform-provider-aws/ -- thanks! |
@anmiles i agree, given that many of us have a dynamic infraestructure the use of AutoScaling Groups is pretty common. So we need a feature for setting tags to those volumes. Given that the EC2 on an ASG ar ephemeral is difficult to set tags to those volumes in terraform |
volume_tags is available only for aws_instance resource, is there any plan to add volume_tags to aws_opsworks_instance resource too? |
or a plan to add volume tags to launch configurations? |
This is a very good point given the concept of Idempotency in Terraform. When testing the The test case involved launching an Next time you run |
@trinitronx I'm having the same issue as you... Did you find a workaround? |
@e-moshaya : Unfortunately there seems to be no workaround other than to remove |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I would like to be able to tag the additional volumes that I create attached to new instances. Like this:
The text was updated successfully, but these errors were encountered: