From 4005e97a84c4f84828fb6abf17943363ce0d96dd Mon Sep 17 00:00:00 2001 From: Jeffrey Cline <20408400+WodansSon@users.noreply.github.com> Date: Wed, 13 May 2020 20:06:22 -0700 Subject: [PATCH 1/2] Add support for frontdoor_id computed attribute --- azurerm/internal/services/frontdoor/frontdoor_resource.go | 6 ++++++ website/docs/r/frontdoor.html.markdown | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/azurerm/internal/services/frontdoor/frontdoor_resource.go b/azurerm/internal/services/frontdoor/frontdoor_resource.go index 50bca0d686ea..fcc9aad8ba7c 100644 --- a/azurerm/internal/services/frontdoor/frontdoor_resource.go +++ b/azurerm/internal/services/frontdoor/frontdoor_resource.go @@ -51,6 +51,11 @@ func resourceArmFrontDoor() *schema.Resource { Computed: true, }, + "frontdoor_id": { + Type: schema.TypeString, + Computed: true, + }, + "friendly_name": { Type: schema.TypeString, Optional: true, @@ -705,6 +710,7 @@ func resourceArmFrontDoorRead(d *schema.ResourceData, meta interface{}) error { } d.Set("cname", properties.Cname) + d.Set("frontdoor_id", properties.FrontdoorID) d.Set("load_balancer_enabled", properties.EnabledState == frontdoor.EnabledStateEnabled) d.Set("friendly_name", properties.FriendlyName) diff --git a/website/docs/r/frontdoor.html.markdown b/website/docs/r/frontdoor.html.markdown index 99bf7a1a1105..87b8fab19258 100644 --- a/website/docs/r/frontdoor.html.markdown +++ b/website/docs/r/frontdoor.html.markdown @@ -294,12 +294,12 @@ The following attributes are exported: * `cname` - The host that each frontendEndpoint must CNAME to. +* `frontdoor_id` - The ID of the Front Door which can be used to filter on the incoming header `X-Azure-FDID` attribute which is sent by the Front Door to your backend. + * `id` - The ID of the FrontDoor. ## Timeouts - - The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: * `create` - (Defaults to 6 hours) Used when creating the FrontDoor. From 7617dbd7f385ec5b5c89130d024bbaa7ff958fac Mon Sep 17 00:00:00 2001 From: Jeffrey Cline <20408400+WodansSon@users.noreply.github.com> Date: Wed, 13 May 2020 20:31:15 -0700 Subject: [PATCH 2/2] Updated name of new attribute --- azurerm/internal/services/frontdoor/frontdoor_resource.go | 4 ++-- website/docs/r/frontdoor.html.markdown | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azurerm/internal/services/frontdoor/frontdoor_resource.go b/azurerm/internal/services/frontdoor/frontdoor_resource.go index fcc9aad8ba7c..5d3b63bdd458 100644 --- a/azurerm/internal/services/frontdoor/frontdoor_resource.go +++ b/azurerm/internal/services/frontdoor/frontdoor_resource.go @@ -51,7 +51,7 @@ func resourceArmFrontDoor() *schema.Resource { Computed: true, }, - "frontdoor_id": { + "header_frontdoor_id": { Type: schema.TypeString, Computed: true, }, @@ -710,7 +710,7 @@ func resourceArmFrontDoorRead(d *schema.ResourceData, meta interface{}) error { } d.Set("cname", properties.Cname) - d.Set("frontdoor_id", properties.FrontdoorID) + d.Set("header_frontdoor_id", properties.FrontdoorID) d.Set("load_balancer_enabled", properties.EnabledState == frontdoor.EnabledStateEnabled) d.Set("friendly_name", properties.FriendlyName) diff --git a/website/docs/r/frontdoor.html.markdown b/website/docs/r/frontdoor.html.markdown index 87b8fab19258..8043625a7c7c 100644 --- a/website/docs/r/frontdoor.html.markdown +++ b/website/docs/r/frontdoor.html.markdown @@ -294,7 +294,7 @@ The following attributes are exported: * `cname` - The host that each frontendEndpoint must CNAME to. -* `frontdoor_id` - The ID of the Front Door which can be used to filter on the incoming header `X-Azure-FDID` attribute which is sent by the Front Door to your backend. +* `header_frontdoor_id` - The unique ID of the Front Door which is embedded into the incoming headers `X-Azure-FDID` attribute and maybe used to filter traffic sent by the Front Door to your backend. * `id` - The ID of the FrontDoor.