You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated the weight from 99 to 9 in the file below:
resource"fastly_service_v1""fastly_service" {
name="${var.fastly_project_name}"domain {
name="${var.domain_name}"
}
backend="${var.backends}"// To fix the issue https://github.com/terraform-providers/terraform-provider-fastly/issues/109,// we only put the backends with weight greater than 0 in the director.director {
name="director"backends=[ "${compact(data.null_data_source.non_zero_weight_backends.*.outputs.name)}"]
quorum=1
}
}
data"null_data_source""non_zero_weight_backends" {
count="${length(var.backends)}"inputs={
name ="${lookup(var.backends[count.index], "weight") ==0?"":lookup(var.backends[count.index], "name")}"
}
}
backends = [
{
name = "xxxxx Public API (xxxxx)"
address = xxxxx
port = 443
ssl_cert_hostname = xxxxx
ssl_check_cert = true
use_ssl = true
min_tls_version = "1.2"
weight = 9
},
{
name = "xxxx Public API"
address = xxxxx
port = 443
ssl_cert_hostname = xxxxx
ssl_check_cert = true
use_ssl = true
min_tls_version = "1.2"
weight = 1
}
]
This seems to happen on any backend update, not just weights. The underlying problem is that there're no in-place updates of backends, all changes are done by deleting and adding them. After deletion the link between director and backend is lost.
Hi all, just a quick update to say this has now been fixed (#304) and released in version v0.20.1 of the provider. Feel free to reopen if you have further issues.
Terraform Version
0.11.13
Affected Resource(s)
fastly_service_v1
Terraform Configuration Files
I updated the weight from 99 to 9 in the file below:
Debug Output
Expected Behavior
The director should update the weight in the VCL
Actual Behavior
The API removed the backend with the updated weight from the director.
Steps to Reproduce
terraform apply
Important Factoids
Running apply again fixes the issue with the plan:
The text was updated successfully, but these errors were encountered: