Skip to content

Commit

Permalink
terraform: updating the segments for User Assigned Identity ID
Browse files Browse the repository at this point in the history
Matching the behaviour introduced in #2011 which unblocks fixing https://github.com/hashicorp/pandora/actions/runs/4073772510

Dependent on hashicorp/go-azure-helpers#147 / being fixed in `terraform-provider-azurerm`
  • Loading branch information
tombuildsstuff committed Feb 2, 2023
1 parent 2d22f8d commit 1086fe1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/resources/managedidentity.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ service "ManagedIdentity" {
api "2022-01-31-preview" {
package "ManagedIdentities" {
definition "user_assigned_identity" {
id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}"
id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"
display_name = "User Assigned Identity"
website_subcategory = "Authorization"
description = "Manages a User Assigned Identity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (commonIdUserAssignedIdentity) id() models.ParsedResourceId {
models.StaticResourceIDSegment("providers", "providers"),
models.ResourceProviderResourceIDSegment("resourceProvider", "Microsoft.ManagedIdentity"),
models.StaticResourceIDSegment("userAssignedIdentities", "userAssignedIdentities"),
models.UserSpecifiedResourceIDSegment("resourceName"),
models.UserSpecifiedResourceIDSegment("userAssignedIdentityName"),
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestCommonResourceID_UserAssignedIdentity(t *testing.T) {
models.StaticResourceIDSegment("providers", "providers"),
models.ResourceProviderResourceIDSegment("resourceProvider", "Microsoft.ManagedIdentity"),
models.StaticResourceIDSegment("userAssignedIdentities", "userAssignedIdentities"),
models.UserSpecifiedResourceIDSegment("resourceName"),
models.UserSpecifiedResourceIDSegment("userAssignedIdentityName"),
},
}
invalid := models.ParsedResourceId{
Expand All @@ -31,7 +31,7 @@ func TestCommonResourceID_UserAssignedIdentity(t *testing.T) {
models.StaticResourceIDSegment("providers", "providers"),
models.ResourceProviderResourceIDSegment("resourceProvider", "Microsoft.ManagedIdentity"),
models.StaticResourceIDSegment("userAssignedIdentities", "userAssignedIdentities"),
models.UserSpecifiedResourceIDSegment("userIdentityName"),
models.UserSpecifiedResourceIDSegment("userAssignedIdentityName"),
models.StaticResourceIDSegment("someResource", "someResource"),
models.UserSpecifiedResourceIDSegment("resourceName"),
},
Expand Down

0 comments on commit 1086fe1

Please sign in to comment.