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

support user assigned identity for azurerm_subscription_policy_assignment, azurerm_management_group_policy_assignment, azurerm_resource_group_policy_assignment and azurerm_resource_policy_assignment resources #15376

Merged

Conversation

sinbai
Copy link
Contributor

@sinbai sinbai commented Feb 11, 2022

The purpose of this PR:

Currently, the resources for azurerm_subscription_policy_assignment, azurerm_management_group_policy_assignment, azurerm_resource_group_policy_assignment and azurerm_resource_policy_assignment only support SystemAssigned identity in terraform. To support "UserAssigned" identity in terraform as a ad hot request to PG team.

Test Results:

PASS: TestAccSubscriptionPolicyAssignment_basicWithBuiltInPolicySet (548.38s)
PASS: TestAccSubscriptionPolicyAssignment_identity (582.87s)
PASS: TestAccSubscriptionPolicyAssignment_basicWithCustomPolicy (624.55s)
PASS: TestAccSubscriptionPolicyAssignment_basicWithBuiltInPolicySetNonComplianceMessage (660.37s)
PASS: TestAccSubscriptionPolicyAssignment_basicWithCustomPolicyComplete (736.98s)
PASS: TestAccSubscriptionPolicyAssignment_basicWithBuiltInPolicyNonComplianceMessage (854.23s)
PASS: TestAccSubscriptionPolicyAssignment_basicWithBuiltInPolicy (856.30s)
PASS: TestAccResourcePolicyAssignment_basicWithCustomPolicyRequiresImport (515.01s)
PASS: TestAccResourcePolicyAssignment_identity (665.29s)
PASS: TestAccResourcePolicyAssignment_basicWithBuiltInPolicySet (702.62s)
PASS: TestAccResourcePolicyAssignment_basicWithCustomPolicy (754.82s)
PASS: TestAccResourcePolicyAssignment_basicWithBuiltInPolicySetNonComplianceMessage (828.97s)
PASS: TestAccResourcePolicyAssignment_basicWithCustomPolicyComplete (841.58s)
PASS: TestAccResourcePolicyAssignment_basicWithBuiltInPolicyNonComplianceMessage (958.69s)
PASS: TestAccResourcePolicyAssignment_basicWithBuiltInPolicy (958.96s)
PASS: TestAccResourceGroupPolicyAssignment_basicWithCustomPolicyRequiresImport (503.99s)
PASS: TestAccResourceGroupPolicyAssignment_identity (594.68s)
PASS: TestAccResourceGroupPolicyAssignment_basicWithBuiltInPolicySet (649.31s)
PASS: TestAccResourceGroupPolicyAssignment_basicWithBuiltInPolicySetNonComplianceMessage (693.25s)
PASS: TestAccResourceGroupPolicyAssignment_basicWithCustomPolicy (716.77s)
PASS: TestAccResourceGroupPolicyAssignment_basicWithCustomPolicyComplete (814.09s)
PASS: TestAccResourceGroupPolicyAssignment_basicWithBuiltInPolicyNonComplianceMessage (945.63s)
PASS: TestAccResourceGroupPolicyAssignment_basicWithBuiltInPolicy (945.65s)
PASS: TestAccManagementGroupPolicyAssignment_basicWithBuiltInPolicy (899.77s)
PASS: TestAccManagementGroupPolicyAssignment_basicWithCustomPolicyRequiresImport (471.84s)
PASS: TestAccManagementGroupPolicyAssignment_basicWithBuiltInPolicySet (610.89s)
PASS: TestAccManagementGroupPolicyAssignment_identity (622.25s)
PASS: TestAccManagementGroupPolicyAssignment_basicWithCustomPolicyComplete (1283.53s)
PASS: TestAccManagementGroupPolicyAssignment_basicWithBuiltInPolicyNonComplianceMessage (699.33s)
PASS: TestAccManagementGroupPolicyAssignment_basicWithBuiltInPolicySetNonComplianceMessage (702.01s)
PASS: TestAccManagementGroupPolicyAssignment_basicWithCustomPolicy (662.29s)
PASS: TestAccManagementGroupPolicyAssignment_basicComplexWithCustomPolicy (772.52s)

@sinbai sinbai changed the title support user assigned identity for policy assignments for azurerm_subscription_policy_assignment, azurerm_management_group_policy_assignment, azurerm_resource_group_policy_assignment and azurerm_resource_policy_assignment resources support user assigned identity for azurerm_subscription_policy_assignment, azurerm_management_group_policy_assignment, azurerm_resource_group_policy_assignment and azurerm_resource_policy_assignment resources Feb 11, 2022
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests passed. Thanks @sinbai, LGTM 💯

@stephybun stephybun merged commit d6e6a4a into hashicorp:main Mar 15, 2022
@github-actions github-actions bot added this to the v3.0.0 milestone Mar 15, 2022
stephybun added a commit that referenced this pull request Mar 15, 2022
@github-actions
Copy link

This functionality has been released in v3.0.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@sinbai sinbai deleted the policy/support_user_assigned_identity branch April 6, 2022 02:18
@github-actions
Copy link

github-actions bot commented May 6, 2022

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants