Skip to content

Commit

Permalink
Fix error when creating double internal route53 recordset
Browse files Browse the repository at this point in the history
  • Loading branch information
nightfury1204 committed Apr 22, 2024
1 parent d45b8fb commit c984151
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion provider/aws/formation/app.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"Condition": "InternalDomains",
"Properties": {
"HostedZoneId": { "Fn::ImportValue": { "Fn::Sub": "${Rack}:HostedZone" } },
"Name": { "Fn::Sub": "{{.Name}}.{{$.App}}.${Rack}.convox." },
"Name": { "Fn::Sub": "internal-{{.Name}}.{{$.App}}.${Rack}.convox." },
"Type": "CNAME",
"TTL": "3600",
"ResourceRecords": [ { "Fn::ImportValue": { "Fn::Sub": "${Rack}:Domain{{ if .Internal }}Internal{{ end }}" } } ]
Expand Down Expand Up @@ -361,6 +361,9 @@
{{ range .Manifest.Services }}
"Service{{ upper .Name }}": {
"Type": "AWS::CloudFormation::Stack",
{{ if .Port.Port }}
"DependsOn": "RecordSet{{ upper .Name }}Internal",
{{ end }}
"Properties": {
"NotificationARNs": [ "{{ $.Topic }}" ],
"Parameters": {
Expand Down
4 changes: 2 additions & 2 deletions provider/aws/formation/service.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,14 @@
}
},
{{ end }}
"RecordSetInternal": {
"RecordSetInternalDomain": {
"Type": "AWS::Route53::RecordSet",
"Condition": "InternalDomains",
"Properties": {
"HostedZoneId": { "Fn::ImportValue": { "Fn::Sub": "${Rack}:HostedZone" } },
"Name": { "Fn::Sub": "{{.Name}}.{{$.App}}.${Rack}.convox." },
"Type": "CNAME",
"TTL": "3600",
"TTL": "3611",
"ResourceRecords": [ { "Fn::ImportValue": { "Fn::Sub": "${Rack}:Domain{{ if .Internal }}Internal{{ end }}" } } ]
}
},
Expand Down

0 comments on commit c984151

Please sign in to comment.