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

New resource azurerm_virtual_machine_configuration_policy_assignment #11334

Merged
merged 34 commits into from
Apr 24, 2021

Conversation

ArcturusZhang
Copy link
Contributor

This is a reopen of PR #10748
Guest Configuration is to audit settings inside a virtual machine, the validation can validate the settings such like:

@ArcturusZhang
Copy link
Contributor Author

Tests are passing on my local machine:

=== RUN   TestAccVirtualMachineConfigurationPolicyAssignment_basic
=== PAUSE TestAccVirtualMachineConfigurationPolicyAssignment_basic
=== CONT  TestAccVirtualMachineConfigurationPolicyAssignment_basic
--- PASS: TestAccVirtualMachineConfigurationPolicyAssignment_basic (436.20s)
=== RUN   TestAccVirtualMachineConfigurationPolicyAssignment_requiresImport
=== PAUSE TestAccVirtualMachineConfigurationPolicyAssignment_requiresImport
=== CONT  TestAccVirtualMachineConfigurationPolicyAssignment_requiresImport
--- PASS: TestAccVirtualMachineConfigurationPolicyAssignment_requiresImport (447.81s)
PASS

@ArcturusZhang
Copy link
Contributor Author

@katbyte katbyte added this to the v2.57.0 milestone Apr 21, 2021
"azurerm_policy_definition": resourceArmPolicyDefinition(),
"azurerm_policy_set_definition": resourceArmPolicySetDefinition(),
"azurerm_policy_remediation": resourceArmPolicyRemediation(),
"azurerm_virtual_machine_configuration_policy_assignment": resourceVirtualMachineConfigurationPolicyAssignment(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry if that was addressed in the old pr, i looked but did see it: there is assignment in the name yet the policy is inlined? does that mean this would make more sense as

Suggested change
"azurerm_virtual_machine_configuration_policy_assignment": resourceVirtualMachineConfigurationPolicyAssignment(),
"azurerm_virtual_machine_configuration_policy": resourceVirtualMachineConfigurationPolicyAssignment(),

Copy link
Contributor Author

@ArcturusZhang ArcturusZhang Apr 22, 2021

Choose a reason for hiding this comment

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

My thought on this resource name is that we need to emphasize that this is an assignment like azurerm_policy_assignment - creation of this resource will make the policy enabled on the target, therefore I kept the word "assignment" in the resource name. With the assignment, this resource reads like a policy definition
Therefore I suggest we keep the word assignment in the resource name, despite it might be long

@ArcturusZhang
Copy link
Contributor Author

Hey @katbyte I have resolved the comments, please take a look, thank you!

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 👍

@katbyte katbyte merged commit 537105d into hashicorp:master Apr 24, 2021
katbyte added a commit that referenced this pull request Apr 24, 2021
@ArcturusZhang ArcturusZhang deleted the guest-configuration branch April 26, 2021 05:21
@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 2.57.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.57.0"
}
# ... other configuration ...

@github-actions
Copy link

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 30, 2021
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