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:
parent
3c94fc10f5
commit
51092865a2
1 changed files with 9 additions and 8 deletions
|
@ -49,10 +49,11 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
|
||||||
|
|
||||||
provider "dns" {
|
provider "dns" {
|
||||||
update {
|
update {
|
||||||
server = local.rfc2136_nameserver
|
server = local.rfc2136_nameserver
|
||||||
key_name = local.rfc2136_tsig_key
|
key_name = local.rfc2136_tsig_key
|
||||||
key_secret = local.rfc2136_tsig_secret
|
key_secret = local.rfc2136_tsig_secret
|
||||||
key_algorithm = "hmac-sha512"
|
key_algorithm = "hmac-sha512"
|
||||||
|
timeout = "10s"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,17 +105,17 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
|
||||||
|
|
||||||
resource "aws_s3_object" "smart_config_{{ group.id }}" {
|
resource "aws_s3_object" "smart_config_{{ group.id }}" {
|
||||||
bucket = module.smart_proxy_{{ group.id }}.config_bucket_name
|
bucket = module.smart_proxy_{{ group.id }}.config_bucket_name
|
||||||
key = "default"
|
key = "default"
|
||||||
source = "smart_proxy.{{ group.id }}.conf"
|
source = "smart_proxy.{{ group.id }}.conf"
|
||||||
etag = filemd5("smart_proxy.{{ group.id }}.conf")
|
etag = filemd5("smart_proxy.{{ group.id }}.conf")
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
resource "dns_a_record_set" "smart_dns_{{ origin.id }}" {
|
resource "dns_a_record_set" "smart_dns_{{ origin.id }}" {
|
||||||
zone = "{{ smart_zone }}"
|
zone = "{{ smart_zone }}"
|
||||||
name = "origin-{{ origin.id }}.cloudfront.smart"
|
name = "origin-{{ origin.id }}.cloudfront.smart"
|
||||||
addresses = module.smart_proxy_{{ origin.group.id }}.ip_addresses
|
addresses = module.smart_proxy_{{ origin.group.id }}.ip_addresses
|
||||||
ttl = 60
|
ttl = 60
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue