The first change is changing the repository_url of one of the applications. terraform apply shows:
# pact_application.fruit will be updated in-place
~ resource "pact_application" "fruit" {
id = "Fruit"
name = "Fruit"
~ repository_url = "https://github.com/company/admin" -> "https://github.dev.xero.com/Xero/QE-Pactflow-Management"
}
After reporting a successful apply command, the resource still has the old url. Looking at the audit events, I found that for some reason the PATCH request has the wrong path, looks like an escaped formatting sequence issue maybe (%25s)?
As a result, I get a new application created ("%25s") instead of updating the existing one. I don't really know when it goes wrong like that.
I also found a log that goes:
2022-01-10T11:55:37.780+1300 [WARN] Provider "registry.terraform.io/pactflow/pact" produced an unexpected new value for pact_application.fruit during refresh.
- .repository_url: was cty.StringVal("https://github.dev.xero.com/Xero/QE-Pactflow-Management"), but now cty.StringVal("https://github.com/company/admin")
Which to me confirms that TF was expecting the change to be applied when refreshing state but it wasn't.
Bug report via https://pact-foundation.slack.com/archives/C02NN7XSHDM/p1641776812008000
The first change is changing the repository_url of one of the applications. terraform apply shows:
After reporting a successful apply command, the resource still has the old url. Looking at the audit events, I found that for some reason the PATCH request has the wrong path, looks like an escaped formatting sequence issue maybe (%25s)?
As a result, I get a new application created ("%25s") instead of updating the existing one. I don't really know when it goes wrong like that.
I also found a log that goes:
Which to me confirms that TF was expecting the change to be applied when refreshing state but it wasn't.