feat(proxy): use group name in dns for smart origins

This commit is contained in:
Iain Learmonth 2023-04-26 15:41:43 +01:00
parent 480b2b0d65
commit 42d6d0ee96
2 changed files with 3 additions and 2 deletions

View file

@ -14,6 +14,7 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
cloud_name = "aws"
template_parameters = [
"admin_email",
"aws_access_key",
"aws_secret_key",
"smart_zone"
@ -92,7 +93,7 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
module "cloudfront_{{ proxy.id }}" {
source = "{{ terraform_modules_path }}/terraform-aws-bc-proxy"
{% if proxy.origin.smart %}
origin_domain = "origin-{{ proxy.origin.id }}.smart.{{ smart_zone[:-1] }}"
origin_domain = "origin-{{ proxy.origin.id }}.{{ proxy.origin.group.group_name }}.smart.{{ smart_zone[:-1] }}"
{% else %}
origin_domain = "{{ proxy.origin.domain_name }}"
{% endif %}

@ -1 +1 @@
Subproject commit b3f386eeb1e9e6cc558509ab863d325b51d4ed18
Subproject commit 4f5cee28bb35a9698fe8949db383ca7239366b93