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

TagSpecifications not being used in resource_aws_ebs_volume #1533

Closed
sbrinkmeyer opened this issue Aug 29, 2017 · 4 comments · Fixed by #6396
Closed

TagSpecifications not being used in resource_aws_ebs_volume #1533

sbrinkmeyer opened this issue Aug 29, 2017 · 4 comments · Fixed by #6396
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@sbrinkmeyer
Copy link

i have a use case of iam policies that restrict volume creation and usage by a shared tenant account at aws

aws has released tagspecifications for instances and volumes in march of 2017. part of this is the aws:requesttag and the ec2:resourcetag.

due to the implementation of the aws_ebs_volume. if i have a restricted policy using the condition of aws:requesttag/Name, terraform will fail to create the volume as the api first creates the volume then applies the tags.

Expected Behavior

terraform resource creation of a volume, if tags for volume are passed in should be sent as part of the tagspecification so that aws:requesttags are configured

Actual Behavior

the current code first creates the volume. Upon successful creation of the volume, tags are subsequently applied

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. create a policy that limits assumed role create volume with a condition of "aws:RequestTag/Name" to a known value
  2. create simple terraform file that creates a volume resource with requested tags one of which being Name set to known value
  3. assume the aws role
  4. terraform apply
  5. terraform run will fail

References

can not find any open github issues.
here is the code block i'm referencing

@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Oct 23, 2017
@Dogers
Copy link
Contributor

Dogers commented Nov 7, 2017

Just to chime in!
This is exactly what we're hitting now - our policies require certain tags to be in place on creation or the request is rejected. For the time being we're creating the volumes manually and running a terraform import on them.

@radeksimko radeksimko added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jan 28, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed bug Addresses a defect in current functionality. labels Nov 8, 2018
@bflad bflad added this to the v1.44.0 milestone Nov 12, 2018
@bflad
Copy link
Contributor

bflad commented Nov 12, 2018

In version 1.44.0 of the AWS provider releasing later this week, the tagging has been switched from a call after the creation to a parameter during creation which should resolve this situation. 👍

@bflad
Copy link
Contributor

bflad commented Nov 15, 2018

This has been released in version 1.44.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 1, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
4 participants