Skip to content
This repository was archived by the owner on Jun 22, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ http:
- name: example.com
hosted_zone: mockHostedZone2
- name: foobar.com
- name: v1.foobar.com
- name: "*.foobar.com"
hosted_zone: mockHostedZone1

image:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ Resources:
HostedZoneId: mockHostedZone1
Comment: !Sub "LoadBalancer aliases for service ${WorkloadName} in hosted zone mockHostedZone1"
RecordSets:
- Name: foobar.com
- Name: "foobar.com"
Type: A
AliasTarget:
HostedZoneId: !GetAtt EnvControllerAction.InternalLoadBalancerHostedZone
DNSName: !GetAtt EnvControllerAction.InternalLoadBalancerDNSName
- Name: v1.foobar.com
- Name: "*.foobar.com"
Type: A
AliasTarget:
HostedZoneId: !GetAtt EnvControllerAction.InternalLoadBalancerHostedZone
Expand All @@ -296,7 +296,7 @@ Resources:
HostedZoneId: mockHostedZone2
Comment: !Sub "LoadBalancer aliases for service ${WorkloadName} in hosted zone mockHostedZone2"
RecordSets:
- Name: example.com
- Name: "example.com"
Type: A
AliasTarget:
HostedZoneId: !GetAtt EnvControllerAction.InternalLoadBalancerHostedZone
Expand Down Expand Up @@ -326,7 +326,7 @@ Resources:
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com, foobar.com, v1.foobar.com]
Values: ["example.com", "foobar.com", "*.foobar.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand All @@ -347,7 +347,7 @@ Resources:
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com, foobar.com, v1.foobar.com]
Values: ["example.com", "foobar.com", "*.foobar.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com]
Values: ["example.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand All @@ -545,7 +545,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com]
Values: ["example.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com]
Values: ["example.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand All @@ -632,7 +632,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com]
Values: ["example.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
HostedZoneId: mockHostedZone
Comment: !Sub "LoadBalancer aliases for service ${WorkloadName} in hosted zone mockHostedZone"
RecordSets:
- Name: example.com
- Name: "example.com"
Type: A
AliasTarget:
HostedZoneId: !GetAtt EnvControllerAction.PublicLoadBalancerHostedZone
Expand Down Expand Up @@ -427,7 +427,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com]
Values: ["example.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand All @@ -448,7 +448,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com]
Values: ["example.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com]
Values: ["example.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand All @@ -544,7 +544,7 @@ Resources: # If a bucket URL is specified, that means the template exists.
Conditions:
- Field: 'host-header'
HostHeaderConfig:
Values: [example.com]
Values: ["example.com"]
- Field: 'path-pattern'
PathPatternConfig:
Values: !If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EnvControllerAction:
ServiceToken: !GetAtt EnvControllerFunction.Arn
Workload: !Ref WorkloadName
{{- if and (not .UseImportedCerts) (.Aliases)}}
Aliases: {{ fmtSlice .Aliases }}
Aliases: {{ fmtSlice (quoteSlice .Aliases) }}
{{- end}}
EnvStack: !Sub '${AppName}-${EnvName}'
Parameters: {{ envControllerParams . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LoadBalancerDNSAlias{{$hostedZoneID}}:
Comment: !Sub "LoadBalancer aliases for service ${WorkloadName} in hosted zone {{$hostedZoneID}}"
RecordSets:
{{- range $alias := $aliases}}
- Name: {{$alias}}
- Name: {{quote $alias}}
Type: A
AliasTarget:
{{- if eq $.WorkloadType "Backend Service"}}
Expand Down Expand Up @@ -76,7 +76,7 @@ HTTPListenerRuleWithDomain:
{{- if .Aliases }}
- Field: 'host-header'
HostHeaderConfig:
Values: {{ fmtSlice .Aliases }}
Values: {{ fmtSlice (quoteSlice .Aliases) }}
{{- else }}
- Field: 'host-header'
HostHeaderConfig:
Expand Down Expand Up @@ -124,7 +124,7 @@ HTTPSListenerRule:
{{- if .Aliases }}
- Field: 'host-header'
HostHeaderConfig:
Values: {{ fmtSlice .Aliases }}
Values: {{ fmtSlice (quoteSlice .Aliases) }}
{{- else }}
- Field: 'host-header'
HostHeaderConfig:
Expand Down
2 changes: 2 additions & 0 deletions internal/pkg/template/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package template
import (
"bytes"
"fmt"
"strconv"
"text/template"

"github.com/aws/aws-sdk-go/service/secretsmanager"
Expand Down Expand Up @@ -611,6 +612,7 @@ func withSvcParsingFuncs() ParseOption {
"hasSecrets": hasSecrets,
"fmtSlice": FmtSliceFunc,
"quoteSlice": QuoteSliceFunc,
"quote": strconv.Quote,
"randomUUID": randomUUIDFunc,
"jsonMountPoints": generateMountPointJSON,
"jsonSNSTopics": generateSNSJSON,
Expand Down