cloudflare / terraform-provider-cloudflare

Cloudflare Terraform Provider
https://registry.terraform.io/providers/cloudflare/cloudflare
Mozilla Public License 2.0
761 stars 588 forks source link

cloudflare_zone_settings_override fails to be destroyed #3177

Closed alphabet5 closed 6 months ago

alphabet5 commented 6 months ago

Confirmation

Terraform and Cloudflare provider version

4.26

Affected resource(s)

cloudflare_zone_settings_override

Terraform configuration files

esource "cloudflare_zone_settings_override" "zonename" {
    zone_id = var.cloudflare_zone_id
    settings {
        universal_ssl = "on"
        always_use_https = "on"
        min_tls_version = "1.2"
    }
}

Link to debug output

http://www.supersimplestorageservice.com/API/S4.asmx?debug.log

Panic output

N/A

Expected output

Success!

Actual output

Error: Invalid value for zone setting early_hints (1007)

This repeats / all the "" values are invalid in this step

2024-03-12T11:44:29.614-0500 [DEBUG] provider.terraform-provider-cloudflare_v4.26.0: Reverting Cloudflare Zone Settings to initial settings with update configuration: []cloudflare.ZoneSetting{cloudflare.ZoneSetting{ID:"0rtt", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"email_obfuscation", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"opportunistic_encryption", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"privacy_pass", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"waf", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"tls_1_3", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"brotli", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"browser_check", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"proxy_read_timeout", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"browser_cache_ttl", Editable:false, ModifiedOn:"", Value:0, TimeRemaining:0}, cloudflare.ZoneSetting{ID:"origin_error_page_pass_thru", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"tls_client_auth", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"challenge_ttl", Editable:false, ModifiedOn:"", Value:0, TimeRemaining:0}, cloudflare.ZoneSetting{ID:"http3", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"pseudo_ipv4", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"max_upload", Editable:false, ModifiedOn:"", Value:0, TimeRemaining:0}, cloudflare.ZoneSetting{ID:"true_client_ip_header", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"opportunistic_onion", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"early_hints", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"always_online", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"mirage", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"security_level", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"automatic_https_rewrites", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"origin_max_http_version", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"min_tls_version", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"polish", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"server_side_exclude", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"universal_ssl", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"ip_geolocation", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"response_buffering", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"h2_prioritization", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"development_mode", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"websockets", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"fonts", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"prefetch_preload", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"always_use_https", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"log_to_cloudflare", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"visitor_ip", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"sort_query_string_for_cache", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"orange_to_orange", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"ipv6", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"rocket_loader", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"tls_1_2_only", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"cname_flattening", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"filter_logs_to_cloudflare", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"binary_ast", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"cache_level", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"hotlink_protection", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"ssl", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"http2", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}, cloudflare.ZoneSetting{ID:"image_resizing", Editable:false, ModifiedOn:"", Value:"", TimeRemaining:0}}: tf_provider_addr=registry.terraform.io/cloudflare/cloudflare tf_resource_type=cloudflare_zone_settings_override tf_rpc=ApplyResourceChange @caller=github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_zone_settings_override.go:392 @module=cloudflare tf_mux_provider=tf5to6server.v5tov6Server tf_req_id=454b023d-d7bf-e436-21da-b9c2ec7251a5 timestamp=2024-03-12T11:44:29.613-0500

Steps to reproduce

Try to recreate a cloudflare_zone_settings_override after importing a cloudflare_zone.

Additional factoids

You apparently can't import an existing cloudflare_zone_settings_override so destroying/recreating is required.

References

No

github-actions[bot] commented 6 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 6 months ago

Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key, X-Auth-Email and Authorization HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.

This issue has been marked with triage/needs-information and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.

Nmishin commented 6 months ago

this is known issue, for example https://github.com/cloudflare/terraform-provider-cloudflare/issues/1737 You should try to avoid using this resource, or you can use it only for change the switchers for example change universal_ssl from on to off and back.

jacobbednarz commented 6 months ago

duplicate of https://github.com/cloudflare/terraform-provider-cloudflare/issues/1737