From e1840a46ee228a8b8ae2bc41d3c16e3c3de528b3 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 19 Mar 2020 09:49:14 +0100 Subject: [PATCH] r/storage_container: exposing the resource_manager_id field --- .../services/storage/resource_arm_storage_container.go | 8 ++++++++ website/docs/r/storage_container.html.markdown | 2 ++ 2 files changed, 10 insertions(+) diff --git a/azurerm/internal/services/storage/resource_arm_storage_container.go b/azurerm/internal/services/storage/resource_arm_storage_container.go index 2efbdf815469..d4713ea075c7 100644 --- a/azurerm/internal/services/storage/resource_arm_storage_container.go +++ b/azurerm/internal/services/storage/resource_arm_storage_container.go @@ -74,6 +74,11 @@ func resourceArmStorageContainer() *schema.Resource { Type: schema.TypeBool, Computed: true, }, + + "resource_manager_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -227,6 +232,9 @@ func resourceArmStorageContainerRead(d *schema.ResourceData, meta interface{}) e d.Set("has_immutability_policy", props.HasImmutabilityPolicy) d.Set("has_legal_hold", props.HasLegalHold) + resourceManagerId := client.GetResourceManagerResourceID(storageClient.SubscriptionId, account.ResourceGroup, id.AccountName, id.ContainerName) + d.Set("resource_manager_id", resourceManagerId) + return nil } diff --git a/website/docs/r/storage_container.html.markdown b/website/docs/r/storage_container.html.markdown index 3600e019e173..8a7f249a238b 100644 --- a/website/docs/r/storage_container.html.markdown +++ b/website/docs/r/storage_container.html.markdown @@ -59,6 +59,8 @@ The following attributes are exported in addition to the arguments listed above: * `has_legal_hold` - Is there a Legal Hold configured on this Storage Container? +* `resource_manager_id` - The Resource Manager ID of this Storage Container. + ## Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: