Skip to content

Commit

Permalink
Revert "CDN Endpoint: make origin_host_header required " (hashicorp#6583
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mbfrahry authored and neil-yechenwei committed Apr 24, 2020
1 parent 4223b99 commit 66f67d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
3 changes: 2 additions & 1 deletion azurerm/internal/services/cdn/resource_arm_cdn_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ func resourceArmCdnEndpoint() *schema.Resource {

"origin_host_header": {
Type: schema.TypeString,
Required: true,
Optional: true,
Computed: true,
},

"is_http_allowed": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,6 @@ resource "azurerm_cdn_endpoint" "test" {
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
origin_host_header = "www.example.com"
origin {
name = "acceptanceTestCdnOrigin1"
host_name = "www.example.com"
Expand All @@ -472,8 +470,6 @@ resource "azurerm_cdn_endpoint" "import" {
location = azurerm_cdn_endpoint.test.location
resource_group_name = azurerm_cdn_endpoint.test.resource_group_name
origin_host_header = "www.example.com"
origin {
name = "acceptanceTestCdnOrigin1"
host_name = "www.example.com"
Expand Down Expand Up @@ -548,8 +544,6 @@ resource "azurerm_cdn_endpoint" "test" {
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
origin_host_header = "www.example.com"
origin {
name = "acceptanceTestCdnOrigin2"
host_name = "www.example.com"
Expand Down Expand Up @@ -589,8 +583,6 @@ resource "azurerm_cdn_endpoint" "test" {
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
origin_host_header = "www.example.com"
origin {
name = "acceptanceTestCdnOrigin2"
host_name = "www.example.com"
Expand Down Expand Up @@ -633,8 +625,6 @@ resource "azurerm_cdn_endpoint" "test" {
origin_path = "/origin-path"
probe_path = "/origin-path/probe"
origin_host_header = "www.example.com"
origin {
name = "acceptanceTestCdnOrigin1"
host_name = "www.example.com"
Expand Down Expand Up @@ -684,8 +674,6 @@ resource "azurerm_cdn_endpoint" "test" {
is_https_allowed = true
optimization_type = "GeneralWebDelivery"
origin_host_header = "www.example.com"
origin {
name = "acceptanceTestCdnOrigin1"
host_name = "www.example.com"
Expand Down Expand Up @@ -775,8 +763,6 @@ resource "azurerm_cdn_endpoint" "test" {
is_http_allowed = %s
is_https_allowed = %s
origin_host_header = "www.example.com"
origin {
name = "acceptanceTestCdnOrigin1"
host_name = "www.example.com"
Expand Down
4 changes: 1 addition & 3 deletions website/docs/r/cdn_endpoint.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ resource "azurerm_cdn_endpoint" "example" {
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
origin_host_header = "www.example.com"
origin {
name = "example"
host_name = "www.example.com"
Expand Down Expand Up @@ -68,7 +66,7 @@ The following arguments are supported:

* `origin` - (Required) The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below.

* `origin_host_header` - (Required) The host header CDN provider will send along with content requests to origins. Defaults to the host name of the origin.
* `origin_host_header` - (Optional) The host header CDN provider will send along with content requests to origins. Defaults to the host name of the origin.

* `origin_path` - (Optional) The path used at for origin requests.

Expand Down

0 comments on commit 66f67d4

Please sign in to comment.