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: