Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_role_assignment: Fix assignments to resources #12076

Merged
merged 5 commits into from
Jun 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Extra unit test on ResourceIDs
Aris van Ommeren committed Jun 6, 2021
commit 8960d472796dd62bd06fd1c6196095e452da1b4d
14 changes: 14 additions & 0 deletions azurerm/helpers/azure/resourceid_test.go
Original file line number Diff line number Diff line change
@@ -147,6 +147,20 @@ func TestParseAzureResourceID(t *testing.T) {
},
false,
},
{
"/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/example-resources/providers/Microsoft.Storage/storageAccounts/nameStorageAccount/providers/Microsoft.Authorization/roleAssignments/22222222-2222-2222-2222-222222222222",
&azure.ResourceID{
SubscriptionID: "11111111-1111-1111-1111-111111111111",
ResourceGroup: "example-resources",
Provider: "Microsoft.Storage",
SecondaryProvider: "Microsoft.Authorization",
Path: map[string]string{
"storageAccounts": "nameStorageAccount",
"roleAssignments": "22222222-2222-2222-2222-222222222222",
},
},
false,
},
{
// missing resource group
"/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.ApiManagement/service/service1/subscriptions/22222222-2222-2222-2222-222222222222",