Closed ChristophShyper closed 3 years ago
On a new hosted-zone and on attempting to enable the "override" settings for the first time - I have image_resizing off in TF (and it is certainly off in the web-ui) and I too, get the read-only error.
I have the same behavior with webp and http2
Cloudflare_zone_settings_override.settings: Creating...
Error: invalid zone setting "http2" (value: off) found - cannot be set as it is read only
TF try to destroy then create a new zone settings override but some parameters seems blocked as they're flagged as 'read only'. I also have the same error with webp.
I get this too, works on some zones but not others with different values
i've found an internal reference stating this has been addressed. @alxsbn can you please confirm if you're still seeing the issue?
I have this problem too. I'm on the Cloudflare free plan and I notice some of the read-only settings that error are only available on the Cloudflare enterprise plan or for a service I don't have enabled.
This is a fatal error because when trying to delete the resource, it tries to update settings at Cloudflare marked as read-only which causes the delete to fail. So, I can't update a read-only setting with the existing value or null and I can't delete the resource. It's essentially a zombie resource that will never update or go away.
My suggestion is to skip trying to update read-only settings.
I upgraded my Cloudflare zone to Enterprise and a whole slew of read-only settings went away except paid services like Image Resizing, DDOS and AST.
The provider should not be trying to update a Cloudflare service that the zone is not subscribed too. The request will be blocked. Need a workaround or a fix. Thanks.
No @kawikao, yours is not a bug. The resource is intended as an override to the defaults and if you do not have entitlements, the resource is not aware of it. It is not a resource intended to manage all resources irrespective of the entitlements.
From the docs.
Note that after destroying this resource Zone Settings will be reset to their initial values.
I took it to mean, the provider tries to reset the initial values at Cloudflare. Since, many settings are read-only, it doesn't appear to even try to reset the values and aborts destroying the resource. It's a catch-22. I just terraform rm
and won't use the resource until this issue is resolved.
Terraform version
Terraform v0.14.5
Affected resource(s)
cloudflare_zone_settings_override
Terraform configuration files
Debug output
Expected behavior
Image resizing option should be enabled.
Actual behavior
Image resizing is still off.
Steps to reproduce
cloudflare_zone_settings_override
to your terraform with current valuesterraform apply
worksimage_resizing
tooff
We have Enterprise plan, so it's possible to set it. Setting it manually in Cloudflare solves the error, but we want to control it from code.
References
Community note