|
238 | 238 | {{ end }}
|
239 | 239 | "Properties": {
|
240 | 240 | "Actions": [ { "Type": "forward", "TargetGroupArn": { "Ref": "BalancerTargetGroup{{ if .Internal }}Internal{{ end }}" } } ],
|
241 |
| - "Conditions": [ { "Field": "host-header", "Values": [ { "Fn::Join": [ ".", [ "{{$.App}}-{{.Name}}", { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router .Name $.Manifest }}Host" } } ] ] } ] } ], |
| 241 | + "Conditions": [ { "Field": "host-header", "Values": [ { "Fn::Join": [ ".", [ "{{$.App}}-{{.Name}}", { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router .Name $.Manifest }}Host" } } ] ] } ] }, { "Field": "source-ip", "SourceIpConfig": { "Values": [ {{ range safeWhitelist .Whitelist }} "{{ . }}", {{ end }} ] } } ], |
242 | 242 | "ListenerArn": { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router .Name $.Manifest }}Listener80" } },
|
243 | 243 | "Priority": "{{ priority $.App .Name "default" -1 }}"
|
244 | 244 | }
|
|
250 | 250 | {{ end }}
|
251 | 251 | "Properties": {
|
252 | 252 | "Actions": [ { "Type": "forward", "TargetGroupArn": { "Ref": "BalancerTargetGroup{{ if .Internal }}Internal{{ end }}" } } ],
|
253 |
| - "Conditions": [ { "Field": "host-header", "Values": [ { "Fn::Join": [ ".", [ "{{$.App}}-{{.Name}}", { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router .Name $.Manifest }}Host" } } ] ] } ] } ], |
| 253 | + "Conditions": [ { "Field": "host-header", "Values": [ { "Fn::Join": [ ".", [ "{{$.App}}-{{.Name}}", { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router .Name $.Manifest }}Host" } } ] ] } ] }, { "Field": "source-ip", "SourceIpConfig": { "Values": [ {{ range safeWhitelist .Whitelist }} "{{ . }}", {{ end }} ] } } ], |
254 | 254 | "ListenerArn": { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router .Name $.Manifest }}Listener443" } },
|
255 | 255 | "Priority": "{{ priority $.App .Name "default" -1 }}"
|
256 | 256 | }
|
|
271 | 271 | "Condition": "InternalDomainsAndRouteHttp",
|
272 | 272 | "Properties": {
|
273 | 273 | "Actions": [ { "Type": "forward", "TargetGroupArn": { "Ref": "BalancerTargetGroup{{ if .Internal }}Internal{{ end }}" } } ],
|
274 |
| - "Conditions": [ { "Field": "host-header", "Values": [ { "Fn::Sub": "{{.Name}}.{{$.App}}.${Rack}.convox" } ] } ], |
| 274 | + "Conditions": [ { "Field": "host-header", "Values": [ { "Fn::Sub": "{{.Name}}.{{$.App}}.${Rack}.convox" } ] } , { "Field": "source-ip", "SourceIpConfig": { "Values": [ {{ range safeWhitelist .Whitelist }} "{{ . }}", {{ end }} ] } } ], |
275 | 275 | "ListenerArn": { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router .Name $.Manifest }}Listener80" } },
|
276 | 276 | "Priority": "{{ priority $.App .Name "internal" -1 }}"
|
277 | 277 | }
|
|
281 | 281 | "Condition": "InternalDomains",
|
282 | 282 | "Properties": {
|
283 | 283 | "Actions": [ { "Type": "forward", "TargetGroupArn": { "Ref": "BalancerTargetGroup{{ if .Internal }}Internal{{ end }}" } } ],
|
284 |
| - "Conditions": [ { "Field": "host-header", "Values": [ { "Fn::Sub": "{{.Name}}.{{$.App}}.${Rack}.convox" } ] } ], |
| 284 | + "Conditions": [ { "Field": "host-header", "Values": [ { "Fn::Sub": "{{.Name}}.{{$.App}}.${Rack}.convox" } ] } , { "Field": "source-ip", "SourceIpConfig": { "Values": [ {{ range safeWhitelist .Whitelist }} "{{ . }}", {{ end }} ] } } ], |
285 | 285 | "ListenerArn": { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router .Name $.Manifest }}Listener443" } },
|
286 | 286 | "Priority": "{{ priority $.App .Name "internal" -1 }}"
|
287 | 287 | }
|
|
303 | 303 | {{ end }}
|
304 | 304 | "Properties": {
|
305 | 305 | "Actions": [ { "Type": "forward", "TargetGroupArn": { "Ref": "BalancerTargetGroup{{ if $.Service.Internal }}Internal{{ end }}" } } ],
|
306 |
| - "Conditions": [ { "Field": "host-header", "Values": [ "{{$domain}}" ] } ], |
| 306 | + "Conditions": [ { "Field": "host-header", "Values": [ "{{$domain}}" ] } , { "Field": "source-ip", "SourceIpConfig": { "Values": [ {{ range safeWhitelist .Whitelist }} "{{ . }}", {{ end }} ] } } ], |
307 | 307 | "ListenerArn": { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router $.Service.Name $.Manifest }}Listener80" } },
|
308 | 308 | "Priority": "{{ priority $.App $.Service.Name $domain $i }}"
|
309 | 309 | }
|
|
315 | 315 | {{ end }}
|
316 | 316 | "Properties": {
|
317 | 317 | "Actions": [ { "Type": "forward", "TargetGroupArn": { "Ref": "BalancerTargetGroup{{ if $.Service.Internal }}Internal{{ end }}" } } ],
|
318 |
| - "Conditions": [ { "Field": "host-header", "Values": [ "{{$domain}}" ] } ], |
| 318 | + "Conditions": [ { "Field": "host-header", "Values": [ "{{$domain}}" ] } , { "Field": "source-ip", "SourceIpConfig": { "Values": [ {{ range safeWhitelist .Whitelist }} "{{ . }}", {{ end }} ] } } ], |
319 | 319 | "ListenerArn": { "Fn::ImportValue": { "Fn::Sub": "${Rack}:{{ router $.Service.Name $.Manifest }}Listener443" } },
|
320 | 320 | "Priority": "{{ priority $.App $.Service.Name $domain $i }}"
|
321 | 321 | }
|
|
0 commit comments