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

Regression with aws_eip tags not being created #18847

Closed
mfilipiak-ccg opened this issue Apr 14, 2021 · 7 comments
Closed

Regression with aws_eip tags not being created #18847

mfilipiak-ccg opened this issue Apr 14, 2021 · 7 comments
Labels
service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@mfilipiak-ccg
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v0.14.3                                      
+ provider registry.terraform.io/hashicorp/aws v3.36.0 

Affected Resource(s)

  • aws_3.26.0

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
      version = "3.36.0"
    }
  }
}

resource "aws_eip" "elastic_ip" {
  tags = {
    Name = "test1"
  }
}

Expected Behavior

Tags defined in the resource section should be reflected in the tags on AWS. In this case, the name should also show up as the name in the EIP listing.

Actual Behavior

No tags are applied to the resource when created.

Steps to Reproduce

  1. terraform apply

Important Factoids

Reverting the provider version to 3.35.0 works fine.

References

Suspecting this issue is in play, but have not investigated further.

@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Apr 14, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 14, 2021
@bflad
Copy link
Contributor

bflad commented Apr 14, 2021

Related: #18756

@mfilipiak-ccg which AWS region is this configuration running in?

@mfilipiak-ccg
Copy link
Author

This was tested in us-east-2 and us-west-2 on Ubuntu 20.04

@mfilipiak-ccg
Copy link
Author

Without looking too closely, it appears the Ec2CreateTags call was removed and feels important. There may be alternative ways to accomplish this, but maybe just a mistake.

https://github.com/hashicorp/terraform-provider-aws/pull/17612/files#diff-5cc53a93a886b4b2474bd02b135f8aabd7f4aeb82d77e8ac0378386eaa01ae84L186

@YakDriver
Copy link
Member

YakDriver commented Apr 15, 2021

Without looking too closely, it appears the Ec2CreateTags call was removed and feels important. There may be alternative ways to accomplish this, but maybe just a mistake.

https://github.com/hashicorp/terraform-provider-aws/pull/17612/files#diff-5cc53a93a886b4b2474bd02b135f8aabd7f4aeb82d77e8ac0378386eaa01ae84L186

@mfilipiak-ccg At first glance, the old code and new should be equivalent:

  • Before, if tags were in the configuration and the domain was ec2.DomainTypeStandard, it would return an error. Otherwise, it would set the tags using keyvaluetags.Ec2CreateTags().
  • After Include tags in options for creating vpc EIPs. #17612, if the domain is ec2.DomainTypeVpc is sets the tags using ec2TagSpecificationsFromMap(). Later, if tags were in the configuration and the domain was ec2.DomainTypeStandard, it returns an error.

@YakDriver YakDriver removed the needs-triage Waiting for first response or review from a maintainer. label Apr 15, 2021
@rick-masters
Copy link
Contributor

You should be able to move forward by adding vpc = true to your eip configuration. This is the right setting and should fix the problem. However, it should not be required so this is a regression and a fix is forthcoming. Please see the discussion in #18756. I recommend this issue be marked as a duplicate of that one.

@YakDriver
Copy link
Member

Duplicate of #18756.

@ghost
Copy link

ghost commented May 16, 2021

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 as resolved and limited conversation to collaborators May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

4 participants