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

outdated CFN ENI properties

treaz opened this issue · comments

Describe the bug
When I record the creation of a EC2 instance and I try to create another instance via CFN, it fails because of incorrect attribute names.

Related Mapping
AWS::EC2::Instance

Related Language
CFN yml

To Reproduce
Steps to reproduce the behavior:

  1. Create EC2 instance with maximum possible defaults

Expected behavior
EC2 instance can be created via CFN template.
I'd be glad to submit a PR, but you need to create a contribute.md and give a short explanation of how to test the changes locally.

Additional context
The current ENI attribute names are very different nowadays: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html
Generated EC2 template is here:
ec21e273c3: Type: "AWS::EC2::Instance" Properties: ImageId: "ami-08935252a36e25f85" InstanceType: "t2.micro" Tenancy: "default" Monitoring: false DisableApiTermination: false InstanceInitiatedShutdownBehavior: "stop" CreditSpecification: CPUCredits: "standard" EbsOptimized: false UserData: "eXVtIHVwZGF0ZSAteQp5dW0gaW5zdGFsbCAteSBodHRwZDI0IHBocDcwIG15c3FsNTYtc2VydmVyIHBocDcwLW15c3FsbmQKc2VydmljZSBodHRwZCBzdGFydA==" NetworkInterfaces: - DeviceIndex: 0 Description: "Primary network interface" AssociatePublicIpAddress: true DeleteOnTermination: true SubnetId: "subnet-0878c5e4f8289df48" Groups: - "sg-073d0770cb507b308" Ipv6AddressCount: 0 BlockDeviceMappings: - DeviceName: "/dev/xvda" Ebs: VolumeSize: 8 DeleteOnTermination: true VolumeType: "gp2"

Thanks Horia,

It looks like the only mismatch for NetworkInterfaces is that Groups should be GroupSet. I've amended as such.

Regarding contributing, I'll add a contributions document soonish - but basically you should be able to add the root of the repository within Chrome extensions as an unpacked to check changes.

There are currently no tests 😈.