Closed dolvany closed 1 year ago
Any chance you found a solution? @dolvany
I am also experiencing the above issue but with version 2.0.5
of the plugin and terraform version 1.4.6
, I thought it'd be helpful for me to comment and provide some sample code:
resource "ns1_record" "test1" {
zone = var.zone
domain = "test1.${var.zone}"
type = "A"
ttl = 3600
answers {
answer = "122.251.63.104"
meta = {
"latitude" = "23"
"longitude" = "-107"
}
region = "REGION1"
}
answers {
answer = "123.231.63.103"
meta = {
"latitude" = "55"
"longitude" = "-107"
}
region = "REGION2"
}
# filters {
# config = {}
# disabled = false
# filter = "geotarget_latlong"
# }
# filters {
# config = {}
# disabled = false
# filter = "select_first_region"
# }
# filters {
# config = {
# "sticky_by_network" = "0"
# }
# disabled = false
# filter = "sticky"
# }
# filters {
# config = {
# "N" = "1"
# }
# disabled = false
# filter = "select_first_n"
# }
regions {
meta = {}
name = "REGION1"
}
regions {
meta = {}
name = "REGION2"
}
}
Running a plan will show that it needs to remove the filter chain, applying will succeed. Rerun plan and it will show that it still needs to delete.
You can add as many filters as you like, however deleting them never works. You can see the filters are still there in the ns1 webstie.
@dolvany / @jmtx1020
Please try provider version 2.0.8
% tf142 -v Terraform v1.4.2 on darwin_amd64
The result is the filter chain state never becoming consistent and tf attempting to replay the filter chain removal on every subsequent plan. It seems like there is something amiss with the refresh functionality of the ns1 provider, as if the provider is incorporating part of the current state in the refresh operation, instead of generating all new state on refresh.