hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.64k forks source link

Azure China: Custom domain seems mandatory while creating cdn endpoint #17213

Open venkatadorisala opened 2 years ago

venkatadorisala commented 2 years ago

Is there an existing issue for this?

Community Note

Terraform Version

0.15.4 -> 1.2.1

AzureRM Provider Version

2.69.0 -> 3.10.0

Affected Resource(s)/Data Source(s)

azurerm_cdn_endpoint

Terraform Configuration Files

resource "azurerm_cdn_profile" "example" {
  name                = "example-cdn"
  location            = "china east 2"
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard_Verizon"
}

resource "azurerm_cdn_endpoint" "example" {
  name                = "example"
  profile_name        = azurerm_cdn_profile.example.name
  location            = "china east 2"
  resource_group_name = azurerm_resource_group.example.name

  origin {
    name      = "example"
    host_name = "www.contoso.com"
  }
}

Debug Output/Panic Output

creating Endpoint: (Name "<redacted>" / Profile Name "<redacted>" / Resource Group "<redacted>"): cdn.EndpointsClient#Create: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="Custom domain must be specified for endpoint creation."
│

Expected Behaviour

Custom domain should be optional for cdn endpoint.

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_endpoint

Abbott-fu commented 5 months ago

the issue still exists