cloudflare / cf-terraforming

A command line utility to facilitate terraforming your existing Cloudflare resources.
Mozilla Public License 2.0
953 stars 135 forks source link

Missing attributes with cloudflare_zone_settings_override #468

Open Arnall opened 2 years ago

Arnall commented 2 years ago

Confirmation

cf-terraforming version

cf-terraforming v0.8.7

Expected outcome

no missing attributes with: cf-terraforming generate -v --resource-type cloudflare_zone_settings_override --zone <zone_id>

Actual outcome

using cf-terraforming generate -v --resource-type cloudflare_zone_settings_override --zone <zone_id>

DEBU[0000] initializing cloudflare-go with API Token     account_Id= zone_id=<zone_id>
DEBU[0002] initializing Terraform in .                  
DEBU[0003] reading Terraform schema for Cloudflare provider 
DEBU[0003] beginning to read and build cloudflare_zone_settings_override resources 
DEBU[0004] unexpected attribute struct type <nil> for block mobile_redirect 
DEBU[0004] got unknown attribute configuration: key binary_ast, value <nil>, value type <nil> 
DEBU[0004] got unknown attribute configuration: key h2_prioritization, value <nil>, value type <nil> 
DEBU[0004] got unknown attribute configuration: key image_resizing, value <nil>, value type <nil> 
DEBU[0004] got unknown attribute configuration: key origin_max_http_version, value <nil>, value type <nil> 
DEBU[0004] got unknown attribute configuration: key tls_1_2_only, value <nil>, value type <nil> 
DEBU[0004] got unknown attribute configuration: key universal_ssl, value <nil>, value type <nil>

As you can see several attributes are not generated: binary_ast, h2_prioritization, image_resizing, origin_max_http_version, tls_1_2_only, universal_ssl.

They do not appear in the resource but do exist in the provider : https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zone_settings_override

Some (h2_prioritization, image_resizing, origin_max_http_version, tls_1_2_only) exist in the API : https://api.cloudflare.com/#zone-settings-properties

Steps to reproduce

cf-terraforming generate -v --resource-type cloudflare_zone_settings_override --zone

References

No response

miraries commented 1 year ago

Just ran into this, looks like some do exist in the API but not in the /settings endpoint, but as "single settings"?
The provider does handle it but not the terraformer.