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
Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
Terraform v1.0.8
Affected Resource(s)
Please list the resources as a list, for example:
fastly_service_v1
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Run terraform plan, since you've just applied your changes there should be no diff, but unfortunately, because the format still has the default value we will be presented with the following diff:
Setting format to an empty string does not help either
logging_datadog {
name = "datadog"
placement = "none"
format_version = 2
format = ""
}
I can work around the issue by using any non empty string for format
logging_datadog {
name = "datadog"
placement = "none"
format_version = 2
format = "# PLEASE STORE THIS"
}
After applying the above format change running terraform plan will show no diff \o/
I suspect this is actually not an issue with terraform provider but with the underlying Fastly API as you can reproduce the same behavior with Fastly web UI which won't allow you to clear the default format for logging.
The text was updated successfully, but these errors were encountered:
You're correct that our API will inject default logging format if the format parameter is not set via POST request and hence this diff loop unless you explicitly specify your format in your TF file.
I patched a similar issue for other blocks before so I think we can do something similar for this as well. I'll look into this. Thanks
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Terraform v1.0.8
Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
When no format is defined the default format should be cleared and there should be no diff on future runs of
terraform apply
.Actual Behavior
terraform apply
will detect a diff on every run caused by the default format field not being cleared.Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
login_datadog
to yourfastly_service_v1
without a format fieldterraform apply
. The logging config will be added to your serviceterraform plan
, since you've just applied your changes there should be no diff, but unfortunately, because theformat
still has the default value we will be presented with the following diff:terraform plan
will show no diff \o/I suspect this is actually not an issue with terraform provider but with the underlying Fastly API as you can reproduce the same behavior with Fastly web UI which won't allow you to clear the default format for logging.
The text was updated successfully, but these errors were encountered: