From e62e956e1ae8c1cac030a602098532b9b488816c Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Mon, 14 Dec 2020 09:32:52 +0100 Subject: [PATCH] r/iot_time_series_insights_gen2_environment: exposing `data_access_fqdn` Fixes #9847 --- ..._time_series_insights_gen2_environment_resource.go | 11 ++++++++--- ...ime_series_insights_gen2_environment.html.markdown | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource.go b/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource.go index 8cb546f506fb..ace3d726a2aa 100644 --- a/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource.go +++ b/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_gen2_environment_resource.go @@ -12,6 +12,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" azValidate "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/location" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/iottimeseriesinsights/parse" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tags" azSchema "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tf/schema" @@ -96,6 +97,11 @@ func resourceIoTTimeSeriesInsightsGen2Environment() *schema.Resource { }, }, + "data_access_fqdn": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tags.Schema(), }, } @@ -207,9 +213,8 @@ func resourceIoTTimeSeriesInsightsGen2EnvironmentRead(d *schema.ResourceData, me d.Set("name", environment.Name) d.Set("resource_group_name", id.ResourceGroup) d.Set("sku_name", environment.Sku.Name) - if location := environment.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } + d.Set("location", location.NormalizeNilable(environment.Location)) + d.Set("data_access_fqdn", environment.DataAccessFqdn) if err := d.Set("id_properties", flattenIdProperties(environment.TimeSeriesIDProperties)); err != nil { return fmt.Errorf("setting `id_properties`: %+v", err) } diff --git a/website/docs/r/iot_time_series_insights_gen2_environment.html.markdown b/website/docs/r/iot_time_series_insights_gen2_environment.html.markdown index 84cb97e53e35..2b8f878a6acb 100644 --- a/website/docs/r/iot_time_series_insights_gen2_environment.html.markdown +++ b/website/docs/r/iot_time_series_insights_gen2_environment.html.markdown @@ -75,6 +75,8 @@ A `storage` block supports the following: * `id` - The ID of the IoT Time Series Insights Gen2 Environment. +* `data_access_fqdn` - The FQDN used to access the environment data. + ## Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: