iann0036 / AWSConsoleRecorder

Records actions made in the AWS Management Console and outputs the equivalent CLI/SDK commands and CloudFormation/Terraform templates.
MIT License
1.43k stars 86 forks source link

Error in CLI syntax: Tag -> Tags #47

Closed PenelopeFudd closed 4 years ago

PenelopeFudd commented 4 years ago

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!

iann0036 commented 4 years ago

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.