Skip to content

Commit

Permalink
azurerm_storage_table - add attribute resource_manager_id (#28809)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattfry authored Feb 20, 2025
1 parent 031c146 commit 4e65664
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/services/storage/storage_table_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/client"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/helpers"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/migration"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
Expand Down Expand Up @@ -98,6 +99,12 @@ func resourceStorageTable() *pluginsdk.Resource {
},
},
},

"resource_manager_id": {
Type: pluginsdk.TypeString,
Computed: true,
Description: "The Resource Manager ID of this Storage Table.",
},
},
}
}
Expand Down Expand Up @@ -216,6 +223,7 @@ func resourceStorageTableRead(d *pluginsdk.ResourceData, meta interface{}) error

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

if err = d.Set("acl", flattenStorageTableACLs(acls)); err != nil {
return fmt.Errorf("setting `acl`: %v", err)
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/storage_table.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ In addition to the Arguments listed above - the following Attributes are exporte

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

* `resource_manager_id` - The Resource Manager ID of this Storage Table.

## Timeouts

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

0 comments on commit 4e65664

Please sign in to comment.