Skip to content

Commit

Permalink
azurerm_cdn_endpoint - origin_host_header can now be set to empty (
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Ye committed Jun 2, 2020
1 parent f310c99 commit 4932b12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion azurerm/internal/services/cdn/cdn_endpoint_resource.go
Expand Up @@ -59,7 +59,6 @@ func resourceArmCdnEndpoint() *schema.Resource {
"origin_host_header": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},

"is_http_allowed": {
Expand Down
Expand Up @@ -88,6 +88,13 @@ func TestAccAzureRMCdnEndpoint_updateHostHeader(t *testing.T) {
resource.TestCheckResourceAttr(data.ResourceName, "origin_host_header", "www.example.com"),
),
},
{
Config: testAccAzureRMCdnEndpoint_hostHeader(data, ""),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMCdnEndpointExists(data.ResourceName),
resource.TestCheckResourceAttr(data.ResourceName, "origin_host_header", ""),
),
},
{
Config: testAccAzureRMCdnEndpoint_hostHeader(data, "www.example2.com"),
Check: resource.ComposeTestCheckFunc(
Expand Down

0 comments on commit 4932b12

Please sign in to comment.