-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
New Resource: azurerm_role_assignment_marketplace
#22178
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR!
I've taken a look through and left some comments inline. The main concern is that other than Marketplace
scope, does there any other un-regular scope exist need to be supported in the future?
internal/services/authorization/parse/role_assignment_marketplace_test.go
Show resolved
Hide resolved
internal/services/authorization/role_assignment_marketplace_resource.go
Outdated
Show resolved
Hide resolved
Hi @magodo, thank you for your review. I have resolved the comments. Kindly take another review. |
Thank you for all the updates! This now LGTM 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for splitting this out @ms-zhenhua.
Unfortunately I think some information was glossed over when we closed #18439. While it's correct to split this out - this should be refactored into a base resource (since the arguments are practically identical across the different role assignment types) - we reference the policy assignment resources in this comment as an example.
Does that make sense?
"fmt" | ||
"time" | ||
|
||
"github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization" // nolint: staticcheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use go-azure-sdk
here?
Hi @stephybun, thank you for clarifying. I think I misunderstood the meaning of this comment😭. For now, I think there are 2 ways to go on:
I prefer to the #1 way to first resolve this issue. WDYT? |
Close this PR and will create a new PR using go-azure-sdk |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Description
fix #18387
extract marketplace role assignment out from azurerm_role_assignment into azurerm_role_assignment_marketplace according to the comments in #18439
Test Result
--- PASS: TestAccRoleAssignmentMarketplace_roleName (67.14s)
--- PASS: TestAccRoleAssignmentMarketplace_requiresImport (59.19s)
--- PASS: TestAccRoleAssignmentMarketplace_emptyName (65.38s)
--- PASS: TestAccRoleAssignmentMarketplace_builtin (65.48s)
--- PASS: TestAccRoleAssignmentMarketplace_ServicePrincipalWithType (69.34s)
--- PASS: TestAccRoleAssignmentMarketplace_ServicePrincipalGroup (90.93s)
--- PASS: TestAccRoleAssignmentMarketplace_ServicePrincipal (93.24s)
PASS
ok github.com/hashicorp/terraform-provider-azurerm/internal/services/authorization 234.346s