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

Cannot create EC2 tags containing "." #7079

Closed
justinsb opened this issue Jun 8, 2016 · 2 comments
Closed

Cannot create EC2 tags containing "." #7079

justinsb opened this issue Jun 8, 2016 · 2 comments

Comments

@justinsb
Copy link

justinsb commented Jun 8, 2016

I'm trying to create an EBS volume with a tag "a.b" = "c"

However, it looks like the value is not recognized when the key has a dot. A tag is created with the correct name but an empty value. I've tried escaping the dot but can't find the magic syntax.

Here's a short repro:

resource "aws_ebs_volume" "myvolume" {
  availability_zone = "us-east-1b"
  size = 20
  type = "gp2"

  tags = {
    "a.b" = "c"
  }
}
 ~/bin/terraform/terraform plan
...
+ aws_ebs_volume.myvolume
    availability_zone: "" => "us-east-1b"
    encrypted:         "" => "<computed>"
    iops:              "" => "<computed>"
    kms_key_id:        "" => "<computed>"
    size:              "" => "20"
    snapshot_id:       "" => "<computed>"
    tags.#:            "" => "1"
    tags.a.b:          "" => ""
    type:              "" => "gp2"


Plan: 1 to add, 0 to change, 0 to destroy.

After terraform apply, aws ec2 describe-volumes shows

    {
            "AvailabilityZone": "us-east-1b", 
            "Attachments": [], 
            "Tags": [
                {
                    "Value": "", 
                    "Key": "a.b"
                }
            ], 
            "Encrypted": false, 
            "VolumeType": "gp2", 
            "VolumeId": "vol-e9cdf967", 
            "State": "available", 
            "Iops": 60, 
            "SnapshotId": "", 
            "CreateTime": "2016-06-08T16:10:16.686Z", 
            "Size": 20
        }

The value should be c, but is empty.

Changing the key to ab (no dot) works correctly.

@justinsb justinsb changed the title Parsing problem prevents creation of AWS tags contains "." Parsing problem prevents creation of AWS tags containing "." Jun 8, 2016
@justinsb justinsb changed the title Parsing problem prevents creation of AWS tags containing "." Cannot create AWS tags containing "." Jun 8, 2016
@justinsb justinsb changed the title Cannot create AWS tags containing "." Cannot create EC2 tags containing "." Jun 8, 2016
@radeksimko
Copy link
Member

Thanks for the report, I'm closing as a duplicate of #2143
I think this may actually be fixed in master (& 0.7.0rc), but we'll need to verify before closing #2143

@ghost
Copy link

ghost commented Apr 25, 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 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.

@ghost ghost locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants