I'm trying to create a template ec2 related with vpc but fails when I try to create ec2 with networkinterface. The error says 'the request is not supported ec2...'
I have this template
AWSTemplateFormatVersion: 2010-09-09Resources: DevVpc: Type: AWS::EC2::VPC Properties: CidrBlock: 10.0.0.0/16 EnableDnsSupport: false EnableDnsHostnames: false Tags: - Key: Name Value: DevStackVpc DevSubnet: Type: AWS::EC2::Subnet Properties: VpcId: Ref: DevVpc CidrBlock: 10.0.0.0/24 AvailabilityZone: us-east-1a Tags: - Key: Name Value: DevSubnet WebApplicationServerSG: Type: AWS::EC2::SecurityGroup Properties: VpcId: Ref: DevVpc GroupDescription: Enable HTTP and SSH access Tags: - Key: Name Value: WebApplicationServer Service Group SecurityGroupIngress: - IpProtocol: tcp FromPort: 80 ToPort: 80 CidrIp: 0.0.0.0/0 - IpProtocol: tcp FromPort: 22 ToPort: 22 CidrIp: 0.0.0.0/0 SecurityGroupEgress: - IpProtocol: tcp FromPort: 80 ToPort: 80 CidrIp: 0.0.0.0/0 - IpProtocol: tcp FromPort: 22 ToPort: 22 CidrIp: 0.0.0.0/0 WebApplicationServer: Type: AWS::EC2::Instance Properties: ImageId: ami-0fc61db8544a617ed InstanceType: t2.micro Tags: - Key: Name Value: WebApplicationServer KeyName: myKeyName NetworkInterfaces: - GroupSet: - Ref: WebApplicationServerSG AssociatePublicIpAddress: 'true' DeviceIndex: '0' DeleteOnTermination: 'true' SubnetId: Ref: DevSubnet
which is the error? the vpc creates right, subnet, security group, the instance is fine but network interface is wrong.