terraform-provider-fastly
terraform-provider-fastly copied to clipboard
request_setting imports incorrectly
When I imported a request_setting and then ran a plan against it, it showed that parts of the request_setting started as false when they actually were unset / blank on Fastly ( "" ). Wasn't exactly sure where / what caused this problem so couldn't PR it myself
Terraform Version
v0.10.7
Affected Resource(s)
fastly_service_v1.request_setting, more specifically it would seem to be a problem importing (or updating?):
bypass_busy_waitforce_missforce_sslgeo_headerstimer_support
Expected Behavior
I terraform import a request_setting that has those 5 unset / blank. I run a terraform plan and it says they began as "".
Actual Behavior
I terraform imported a request_setting that had those 5 unset / blank. When I ran a terraform plan it said they began instead as false, which is incorrect. Below is a part of the plan output that demonstrates this:
request_setting.xxx.action: "" => ""
request_setting.xxx.bypass_busy_wait: "false" => ""
request_setting.xxx.default_host: "foo.com" => "foo.com"
request_setting.xxx.force_miss: "false" => ""
request_setting.xxx.force_ssl: "false" => ""
request_setting.xxx.geo_headers: "false" => ""
request_setting.xxx.hash_keys: "" => ""
request_setting.xxx.max_stale_age: "0" => "60"
request_setting.xxx.name: "foo" => "foo"
request_setting.xxx.request_condition: "conditional foo" => "conditional foo"
request_setting.xxx.timer_support: "false" => ""
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform importwith those 5 unset / blankterraform planwith those 5
Not sure if this is just an import or an update problem, might be a bug in the Go SDK or perhaps even more likely the API itself. After applying the plan (which has each of the 5 set to ""), Fastly gives me a very different result: it set all 5 to '0'... which is neither the correct unset / blank value nor the incorrect false value...
See below screenshot for diff from Fastly UI
The code uses the CBool / Compatibool type from the Go SDK correctly and the settings seem to be correct, so I'm summarily confused now
I have same issue (version 0.10.8 and 0.11.3), do we have any update from HashiCorp?
Closing as stale. Please open a new issue after testing with the latest Terraform provider if this is still an issue. Thanks.