Skip to content

Commit 4796b24

Browse files
hanwen-clusterhanwen-pcluste
authored andcommitted
Fix Cfn-lint W1028
Example failures https://github.com/aws/aws-parallelcluster/actions/runs/10185517412/job/28175271776?pr=6372 Analysis aws-cloudformation/cfn-lint#3551 (comment) Signed-off-by: Hanwen <hanwenli@amazon.com>
1 parent fac752f commit 4796b24

File tree

2 files changed

+4
-36
lines changed

2 files changed

+4
-36
lines changed

cloudformation/networking/public-private.cfn.json

+2-18
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,7 @@
119119
"Properties": {
120120
"DestinationCidrBlock": "0.0.0.0/0",
121121
"GatewayId": {
122-
"Fn::If": [
123-
"CreateInternetGateway",
124-
{
125-
"Ref": "InternetGateway"
126-
},
127-
{
128-
"Ref": "InternetGatewayId"
129-
}
130-
]
122+
"Ref": "InternetGateway"
131123
},
132124
"RouteTableId": {
133125
"Ref": "RouteTablePublic"
@@ -140,15 +132,7 @@
140132
"Properties": {
141133
"DestinationCidrBlock": "0.0.0.0/0",
142134
"GatewayId": {
143-
"Fn::If": [
144-
"CreateInternetGateway",
145-
{
146-
"Ref": "InternetGateway"
147-
},
148-
{
149-
"Ref": "InternetGatewayId"
150-
}
151-
]
135+
"Ref": "InternetGatewayId"
152136
},
153137
"RouteTableId": {
154138
"Ref": "RouteTablePublic"

cloudformation/networking/public.cfn.json

+2-18
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,7 @@
108108
"Properties": {
109109
"DestinationCidrBlock": "0.0.0.0/0",
110110
"GatewayId": {
111-
"Fn::If": [
112-
"CreateInternetGateway",
113-
{
114-
"Ref": "InternetGateway"
115-
},
116-
{
117-
"Ref": "InternetGatewayId"
118-
}
119-
]
111+
"Ref": "InternetGateway"
120112
},
121113
"RouteTableId": {
122114
"Ref": "RouteTablePublic"
@@ -129,15 +121,7 @@
129121
"Properties": {
130122
"DestinationCidrBlock": "0.0.0.0/0",
131123
"GatewayId": {
132-
"Fn::If": [
133-
"CreateInternetGateway",
134-
{
135-
"Ref": "InternetGateway"
136-
},
137-
{
138-
"Ref": "InternetGatewayId"
139-
}
140-
]
124+
"Ref": "InternetGatewayId"
141125
},
142126
"RouteTableId": {
143127
"Ref": "RouteTablePublic"

0 commit comments

Comments
 (0)