diff --git a/internal/sdkv2provider/resource_cloudflare_regional_hostname.go b/internal/sdkv2provider/resource_cloudflare_regional_hostname.go index af463bb89c..e79119b06d 100644 --- a/internal/sdkv2provider/resource_cloudflare_regional_hostname.go +++ b/internal/sdkv2provider/resource_cloudflare_regional_hostname.go @@ -44,6 +44,9 @@ func resourceCloudflareRegionalHostnameCreate(ctx context.Context, d *schema.Res d.SetId(r.Hostname) d.Set("hostname", r.Hostname) d.Set("region_key", r.RegionKey) + if r.Routing != "" { + d.Set("routing", r.Routing) + } d.Set("created_on", r.CreatedOn.Format(time.RFC3339Nano)) return nil } @@ -60,6 +63,9 @@ func resourceCloudflareRegionalHostnameRead(ctx context.Context, d *schema.Resou d.SetId(r.Hostname) d.Set("hostname", r.Hostname) d.Set("region_key", r.RegionKey) + if r.Routing != "" { + d.Set("routing", r.Routing) + } d.Set("created_on", r.CreatedOn.Format(time.RFC3339Nano)) return nil } @@ -88,6 +94,9 @@ func resourceCloudflareRegionalHostnameUpdate(ctx context.Context, d *schema.Res d.SetId(r.Hostname) d.Set("hostname", r.Hostname) d.Set("region_key", r.RegionKey) + if r.Routing != "" { + d.Set("routing", r.Routing) + } d.Set("created_on", r.CreatedOn.Format(time.RFC3339Nano)) return nil } diff --git a/internal/sdkv2provider/schema_cloudflare_regional_hostname.go b/internal/sdkv2provider/schema_cloudflare_regional_hostname.go index 629e664435..a623870d44 100644 --- a/internal/sdkv2provider/schema_cloudflare_regional_hostname.go +++ b/internal/sdkv2provider/schema_cloudflare_regional_hostname.go @@ -22,6 +22,11 @@ func resourceCloudflareRegionalHostnameSchema() map[string]*schema.Schema { Required: true, Description: "The region key. See [the full region list](https://developers.cloudflare.com/data-localization/regional-services/get-started/).", }, + "routing": { + Type: schema.TypeString, + Required: false, + Description: "Configure which routing method to use for the regional hostname.", + }, "created_on": { Type: schema.TypeString, Computed: true,