From 36bfc53475f71010a2b842096c13fbe9c45655e8 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 19 Mar 2020 09:49:29 +0100 Subject: [PATCH] r/storage_share: exposing the `resource_manager_id` field --- .../services/storage/resource_arm_storage_share.go | 8 ++++++++ website/docs/r/storage_share.html.markdown | 3 +++ 2 files changed, 11 insertions(+) diff --git a/azurerm/internal/services/storage/resource_arm_storage_share.go b/azurerm/internal/services/storage/resource_arm_storage_share.go index 9c4edd8c7a43..f3abe915794a 100644 --- a/azurerm/internal/services/storage/resource_arm_storage_share.go +++ b/azurerm/internal/services/storage/resource_arm_storage_share.go @@ -106,6 +106,11 @@ func resourceArmStorageShare() *schema.Resource { }, }, + "resource_manager_id": { + Type: schema.TypeString, + Computed: true, + }, + "url": { Type: schema.TypeString, Computed: true, @@ -227,6 +232,9 @@ func resourceArmStorageShareRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error flattening `acl`: %+v", err) } + resourceManagerId := client.GetResourceManagerResourceID(storageClient.SubscriptionId, account.ResourceGroup, id.AccountName, id.ShareName) + d.Set("resource_manager_id", resourceManagerId) + return nil } diff --git a/website/docs/r/storage_share.html.markdown b/website/docs/r/storage_share.html.markdown index fb8213835e31..10b9fdc7457a 100644 --- a/website/docs/r/storage_share.html.markdown +++ b/website/docs/r/storage_share.html.markdown @@ -71,6 +71,9 @@ A `access_policy` block supports the following: The following attributes are exported in addition to the arguments listed above: * `id` - The ID of the File Share. + +* `resource_manager_id` - The Resource Manager ID of this File Share. + * `url` - The URL of the File Share ## Timeouts