smart/aws: add 10s timeout for dns provider

handles errors where dns server may take a moment
to serve the new record
This commit is contained in:
Iain Learmonth 2022-07-04 15:29:21 +01:00
parent 3c94fc10f5
commit 51092865a2

View file

@ -49,10 +49,11 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
provider "dns" {
update {
server = local.rfc2136_nameserver
key_name = local.rfc2136_tsig_key
key_secret = local.rfc2136_tsig_secret
server = local.rfc2136_nameserver
key_name = local.rfc2136_tsig_key
key_secret = local.rfc2136_tsig_secret
key_algorithm = "hmac-sha512"
timeout = "10s"
}
}
@ -104,17 +105,17 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
resource "aws_s3_object" "smart_config_{{ group.id }}" {
bucket = module.smart_proxy_{{ group.id }}.config_bucket_name
key = "default"
key = "default"
source = "smart_proxy.{{ group.id }}.conf"
etag = filemd5("smart_proxy.{{ group.id }}.conf")
etag = filemd5("smart_proxy.{{ group.id }}.conf")
}
{% endif %}
resource "dns_a_record_set" "smart_dns_{{ origin.id }}" {
zone = "{{ smart_zone }}"
name = "origin-{{ origin.id }}.cloudfront.smart"
zone = "{{ smart_zone }}"
name = "origin-{{ origin.id }}.cloudfront.smart"
addresses = module.smart_proxy_{{ origin.group.id }}.ip_addresses
ttl = 60
ttl = 60
}
{% endfor %}
{% endfor %}