iann0036 / AWSConsoleRecorder

Records actions made in the AWS Management Console and outputs the equivalent CLI/SDK commands and CloudFormation/Terraform templates.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in CLI syntax: Tag -> Tags

PenelopeFudd opened this issue · comments

I created an EBS volume from a snapshot, and used the AWS CLI version:

aws ec2 create-volume --volume-type "gp2" --size 80 --availability-zone "us-west-2a" \
 --snapshot-id "snap-00000000000007" --no-encrypted \
 --tag-specifications '[{"ResourceType":"volume", \
  "Tag":[\
    {"Key":"Name","Value":"volume-from-snapshot-of-ec2-prod-buildserv"}\
    ] \
  }]' --region us-west-2

This failed, because "Tag" needed to be "Tags".

Also, the other language versions show the tags except TerraForm:

resource "aws_ebs_volume" "ec211111111" {
    type = "gp2"
    size = 80
    availability_zone = "us-west-2a"
    snapshot_id = "snap-000000000007"
    encrypted = false
    tags {
        
    }

}

Version 0.3.29

Love the program! Thanks!

Thanks for raising Penelope!

I've pushed a fix in version 0.3.31, which should be available shortly. Please let me know if the fix does not work correctly.