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_policy_definition - expose role_definition_ids property if exists #18043

Merged
merged 3 commits into from
Sep 2, 2022

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Aug 19, 2022

for issue #18018 and will simplify customers with role assignment in policy_assigment.

fixes #18018

--- PASS: TestAccDataSourceAzureRMPolicyDefinition_builtIn (28.21s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_builtInLogAnalytics (9.91s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_builtInByName (11.97s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_builtIn_AtManagementGroup (26.63s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_customByDisplayName (126.06s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_customByName (106.59s)
--- PASS: TestAccAzureRMPolicyDefinition_basic (107.76s)
--- PASS: TestAccAzureRMPolicyDefinition_basicWithDetail (107.67s)
--- PASS: TestAccAzureRMPolicyDefinition_requiresImport (110.10s)
--- PASS: TestAccAzureRMPolicyDefinition_computedMetadata (106.50s)
--- PASS: TestAccAzureRMPolicyDefinition_metadata (107.92s)
--- PASS: TestAccAzureRMPolicyDefinition_modeUpdate (308.42s)
PASS

@wuxu92 wuxu92 changed the title azurerm_policy_definition - expose role_definition_ids azurerm_policy_definition - expose role_definition_ids property if exists Aug 19, 2022
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

test failure

------- Stdout: -------
=== RUN   TestAccAzureRMPolicyDefinition_computedMetadata
=== PAUSE TestAccAzureRMPolicyDefinition_computedMetadata
=== CONT  TestAccAzureRMPolicyDefinition_computedMetadata
    testcase.go:110: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # azurerm_policy_definition.test will be updated in-place
          ~ resource "azurerm_policy_definition" "test" {
                id                  = "/subscriptions/*******/providers/Microsoft.Authorization/policyDefinitions/acctest-220829192559906588"
                name                = "acctest-220829192559906588"
              + role_definition_ids = (known after apply)
                # (5 unchanged attributes hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccAzureRMPolicyDefinition_computedMetadata (154.89s)
FAIL

@wuxu92
Copy link
Contributor Author

wuxu92 commented Aug 31, 2022

all checks have passed now.

--- PASS: TestAccDataSourceAzureRMPolicyDefinition_builtIn (28.21s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_builtInLogAnalytics (9.91s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_builtInByName (11.97s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_builtIn_AtManagementGroup (26.63s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_customByDisplayName (126.06s)
--- PASS: TestAccDataSourceAzureRMPolicyDefinition_customByName (106.59s)
--- PASS: TestAccAzureRMPolicyDefinition_basic (107.76s)
--- PASS: TestAccAzureRMPolicyDefinition_basicWithDetail (107.67s)
--- PASS: TestAccAzureRMPolicyDefinition_requiresImport (110.10s)
--- PASS: TestAccAzureRMPolicyDefinition_computedMetadata (106.50s)
--- PASS: TestAccAzureRMPolicyDefinition_metadata (107.92s)
--- PASS: TestAccAzureRMPolicyDefinition_modeUpdate (308.42s)
PASS

@wuxu92
Copy link
Contributor Author

wuxu92 commented Aug 31, 2022

image

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM but it seems like we are missing the docs?

@wuxu92
Copy link
Contributor Author

wuxu92 commented Sep 2, 2022

doc updated

katbyte added a commit that referenced this pull request Sep 2, 2022
@katbyte katbyte merged commit 690e478 into hashicorp:main Sep 2, 2022
@github-actions github-actions bot added this to the v3.21.0 milestone Sep 2, 2022
@github-actions
Copy link

github-actions bot commented Sep 2, 2022

This functionality has been released in v3.21.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!

@github-actions
Copy link

github-actions bot commented Oct 5, 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 Oct 5, 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.

Support for role_definition_ids argument in azurerm_policy_definition
2 participants