diff --git a/internal/sdkv2provider/resource_cloudflare_zone_settings_override.go b/internal/sdkv2provider/resource_cloudflare_zone_settings_override.go index cff7233f7df..704ff24b338 100644 --- a/internal/sdkv2provider/resource_cloudflare_zone_settings_override.go +++ b/internal/sdkv2provider/resource_cloudflare_zone_settings_override.go @@ -51,6 +51,7 @@ var fetchAsSingleSetting = []string{ "nel", "replace_insecure_js", "speed_brain", + "ssl_automatic_mode", } func resourceCloudflareZoneSettingsOverrideCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { diff --git a/internal/sdkv2provider/resource_cloudflare_zone_settings_override_test.go b/internal/sdkv2provider/resource_cloudflare_zone_settings_override_test.go index 8b6deb17719..985347ec5e5 100644 --- a/internal/sdkv2provider/resource_cloudflare_zone_settings_override_test.go +++ b/internal/sdkv2provider/resource_cloudflare_zone_settings_override_test.go @@ -308,6 +308,36 @@ resource "cloudflare_zone_settings_override" "%[1]s" { }`, rnd, zoneID) } +func TestAccCloudflareZoneSettingsOverride_SSLAutomaticMode(t *testing.T) { + zoneID := os.Getenv("CLOUDFLARE_ZONE_ID") + rnd := generateRandomResourceName() + name := "cloudflare_zone_settings_override." + rnd + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProviderFactories: providerFactories, + Steps: []resource.TestStep{ + { + Config: testAccCheckCloudflareZoneSettingsOverrideSSLAutomaticMode(rnd, zoneID), + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudflareZoneSettings(name), + resource.TestCheckResourceAttr(name, "settings.0.ssl_automatic_mode", "auto"), + ), + }, + }, + }) +} + +func testAccCheckCloudflareZoneSettingsOverrideSSLAutomaticMode(rnd, zoneID string) string { + return fmt.Sprintf(` +resource "cloudflare_zone_settings_override" "%[1]s" { + zone_id = "%[2]s" + settings { + ssl_automatic_mode = "auto" + } +}`, rnd, zoneID) +} + func TestCloudflareZoneSettingsOverrideStateUpgradeV0(t *testing.T) { v0 := map[string]interface{}{ "settings": []interface{}{map[string]interface{}{ diff --git a/internal/sdkv2provider/schema_cloudflare_zone_settings_override.go b/internal/sdkv2provider/schema_cloudflare_zone_settings_override.go index 9cab4563c5e..73f0c567f22 100644 --- a/internal/sdkv2provider/schema_cloudflare_zone_settings_override.go +++ b/internal/sdkv2provider/schema_cloudflare_zone_settings_override.go @@ -377,6 +377,13 @@ var resourceCloudflareZoneSettingsSchema = map[string]*schema.Schema{ ValidateFunc: validation.StringInSlice([]string{"off", "flexible", "full", "strict", "origin_pull"}, false), // depends on plan }, + "ssl_automatic_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"auto", "custom"}, false), + }, + "universal_ssl": { Type: schema.TypeString, Optional: true,