Skip to content

Commit

Permalink
remove fnsub to allow for FnImport for the VPC Cidr
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronwalker committed Jul 29, 2021
1 parent 5c3b1f5 commit ed94333
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fargate-v2.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
EC2_SecurityGroupIngress("IngressRule#{i+1}") do
Description ingress_rule['desc'] if ingress_rule.has_key?('desc')
if ingress_rule.has_key?('cidr')
CidrIp FnSub(ingress_rule['cidr'])
CidrIp ingress_rule['cidr']
else
SourceSecurityGroupId ingress_rule.has_key?('source_sg') ? ingress_rule['source_sg'] : Ref(:SecurityGroup)
end
Expand Down
3 changes: 2 additions & 1 deletion spec/security_groups_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
expect(ingress).to eq({
"Description"=>"allow inbound 22 access from cidr",
"FromPort"=>22,
"CidrIp"=>{"Fn::Sub"=>"10.0.0.1/32"},
"CidrIp"=>"10.0.0.1/32",
"GroupId" => {"Ref"=>"SecurityGroup"},
"IpProtocol"=>"tcp",
"ToPort"=>22
})
Expand Down

0 comments on commit ed94333

Please sign in to comment.