Skip to content

Commit 4e65664

Browse files
authored
azurerm_storage_table - add attribute resource_manager_id (hashicorp#28809)
1 parent 031c146 commit 4e65664

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

internal/services/storage/storage_table_resource.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/client"
1515
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/helpers"
1616
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/migration"
17+
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse"
1718
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate"
1819
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
1920
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
@@ -98,6 +99,12 @@ func resourceStorageTable() *pluginsdk.Resource {
9899
},
99100
},
100101
},
102+
103+
"resource_manager_id": {
104+
Type: pluginsdk.TypeString,
105+
Computed: true,
106+
Description: "The Resource Manager ID of this Storage Table.",
107+
},
101108
},
102109
}
103110
}
@@ -216,6 +223,7 @@ func resourceStorageTableRead(d *pluginsdk.ResourceData, meta interface{}) error
216223

217224
d.Set("name", id.TableName)
218225
d.Set("storage_account_name", id.AccountId.AccountName)
226+
d.Set("resource_manager_id", parse.NewStorageTableResourceManagerID(subscriptionId, account.StorageAccountId.ResourceGroupName, id.AccountId.AccountName, "default", id.TableName).ID())
219227

220228
if err = d.Set("acl", flattenStorageTableACLs(acls)); err != nil {
221229
return fmt.Errorf("setting `acl`: %v", err)

website/docs/r/storage_table.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ In addition to the Arguments listed above - the following Attributes are exporte
6868

6969
* `id` - The ID of the Table within the Storage Account.
7070

71+
* `resource_manager_id` - The Resource Manager ID of this Storage Table.
72+
7173
## Timeouts
7274

7375
The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions:

0 commit comments

Comments
 (0)