-
Notifications
You must be signed in to change notification settings - Fork 130
SecurityGroupIngress/Egress formatting with additional [] #109
Copy link
Copy link
Closed
Description
I have defined a SecurityGroup with an 'embedded' Ingress rule
EC2_SecurityGroup(:mySG) {
VpcId Ref(:VPC)
GroupDescription "my SG"
SecurityGroupIngress [
{
"CidrIp" => "10.0.0.0/8",
"IpProtocol" => "tcp",
"FromPort" => "22",
"ToPort" => "22"
}
]
} The generated JSON for the Ingress contains an additional [ .... ] which is rejected by CloudFormation. This also happens for Egress as well. Note that the similar format NetworkInterfaces (in EC2_Instance) seems to work OK.
Generated:
"SecurityGroupIngress" : [
[
{
"FromPort" : "22",
"IpProtocol" : "tcp",
"CidrIp" : "10.0.0.0/8",
"ToPort" : "22"
}
]
]
should be:
"SecurityGroupIngress" : [
{
"FromPort" : "22",
"IpProtocol" : "tcp",
"CidrIp" : "10.0.0.0/8",
"ToPort" : "22"
}
]
Removing the [ ...] from around
SecurityGroupIngress: [ EC2SecurityGroupRule ]
SecurityGroupEgress: [ EC2SecurityGroupRule ]in aws_types.yaml seems to fix the problem for me but I don't think that's the correct approach
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels