We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to access information about an existing Guest Configuration Policy.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Policy.GetVirtualMachineConfigurationAssignment.InvokeAsync(new Azure.Policy.GetVirtualMachineConfigurationAssignmentArgs
{
Name = "AzureWindowsBaseline",
ResourceGroupName = "example-RG",
VirtualMachineName = "example-vm",
}));
this.ComplianceStatus = example.Apply(example => example.ComplianceStatus);
}
[Output("complianceStatus")]
public Output<string> ComplianceStatus { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/policy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := policy.LookupVirtualMachineConfigurationAssignment(ctx, &policy.LookupVirtualMachineConfigurationAssignmentArgs{
Name: "AzureWindowsBaseline",
ResourceGroupName: "example-RG",
VirtualMachineName: "example-vm",
}, nil)
if err != nil {
return err
}
ctx.Export("complianceStatus", example.ComplianceStatus)
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.policy.getVirtualMachineConfigurationAssignment({
name: "AzureWindowsBaseline",
resourceGroupName: "example-RG",
virtualMachineName: "example-vm",
});
export const complianceStatus = example.then(example => example.complianceStatus);
import pulumi
import pulumi_azure as azure
example = azure.policy.get_virtual_machine_configuration_assignment(name="AzureWindowsBaseline",
resource_group_name="example-RG",
virtual_machine_name="example-vm")
pulumi.export("complianceStatus", example.compliance_status)
Example coming soon!
Using getVirtualMachineConfigurationAssignment
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVirtualMachineConfigurationAssignment(args: GetVirtualMachineConfigurationAssignmentArgs, opts?: InvokeOptions): Promise<GetVirtualMachineConfigurationAssignmentResult>
function getVirtualMachineConfigurationAssignmentOutput(args: GetVirtualMachineConfigurationAssignmentOutputArgs, opts?: InvokeOptions): Output<GetVirtualMachineConfigurationAssignmentResult>def get_virtual_machine_configuration_assignment(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
virtual_machine_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVirtualMachineConfigurationAssignmentResult
def get_virtual_machine_configuration_assignment_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
virtual_machine_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVirtualMachineConfigurationAssignmentResult]func LookupVirtualMachineConfigurationAssignment(ctx *Context, args *LookupVirtualMachineConfigurationAssignmentArgs, opts ...InvokeOption) (*LookupVirtualMachineConfigurationAssignmentResult, error)
func LookupVirtualMachineConfigurationAssignmentOutput(ctx *Context, args *LookupVirtualMachineConfigurationAssignmentOutputArgs, opts ...InvokeOption) LookupVirtualMachineConfigurationAssignmentResultOutput> Note: This function is named LookupVirtualMachineConfigurationAssignment in the Go SDK.
public static class GetVirtualMachineConfigurationAssignment
{
public static Task<GetVirtualMachineConfigurationAssignmentResult> InvokeAsync(GetVirtualMachineConfigurationAssignmentArgs args, InvokeOptions? opts = null)
public static Output<GetVirtualMachineConfigurationAssignmentResult> Invoke(GetVirtualMachineConfigurationAssignmentInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVirtualMachineConfigurationAssignmentResult> getVirtualMachineConfigurationAssignment(GetVirtualMachineConfigurationAssignmentArgs args, InvokeOptions options)
public static Output<GetVirtualMachineConfigurationAssignmentResult> getVirtualMachineConfigurationAssignment(GetVirtualMachineConfigurationAssignmentArgs args, InvokeOptions options)
fn::invoke:
function: azure:policy/getVirtualMachineConfigurationAssignment:getVirtualMachineConfigurationAssignment
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- Specifies the name of the Guest Configuration Assignment.
- Resource
Group stringName - Specifies the Name of the Resource Group where the Guest Configuration Assignment exists.
- Virtual
Machine stringName - Only retrieve Policy Set Definitions from this Management Group.
- Name string
- Specifies the name of the Guest Configuration Assignment.
- Resource
Group stringName - Specifies the Name of the Resource Group where the Guest Configuration Assignment exists.
- Virtual
Machine stringName - Only retrieve Policy Set Definitions from this Management Group.
- name String
- Specifies the name of the Guest Configuration Assignment.
- resource
Group StringName - Specifies the Name of the Resource Group where the Guest Configuration Assignment exists.
- virtual
Machine StringName - Only retrieve Policy Set Definitions from this Management Group.
- name string
- Specifies the name of the Guest Configuration Assignment.
- resource
Group stringName - Specifies the Name of the Resource Group where the Guest Configuration Assignment exists.
- virtual
Machine stringName - Only retrieve Policy Set Definitions from this Management Group.
- name str
- Specifies the name of the Guest Configuration Assignment.
- resource_
group_ strname - Specifies the Name of the Resource Group where the Guest Configuration Assignment exists.
- virtual_
machine_ strname - Only retrieve Policy Set Definitions from this Management Group.
- name String
- Specifies the name of the Guest Configuration Assignment.
- resource
Group StringName - Specifies the Name of the Resource Group where the Guest Configuration Assignment exists.
- virtual
Machine StringName - Only retrieve Policy Set Definitions from this Management Group.
getVirtualMachineConfigurationAssignment Result
The following output properties are available:
- Assignment
Hash string - Combined hash of the configuration package and parameters.
- Compliance
Status string - A value indicating compliance status of the machine for the assigned guest configuration. Possible return values are
Compliant,NonCompliantandPending. - Content
Hash string - The content hash for the Guest Configuration package.
- Content
Uri string - The content URI where the Guest Configuration package is stored.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Compliance stringStatus Checked - Date and time, in RFC3339 format, when the machines compliance status was last checked.
- Latest
Report stringId - The ID of the latest report for the guest configuration assignment.
- Name string
- Resource
Group stringName - Virtual
Machine stringName
- Assignment
Hash string - Combined hash of the configuration package and parameters.
- Compliance
Status string - A value indicating compliance status of the machine for the assigned guest configuration. Possible return values are
Compliant,NonCompliantandPending. - Content
Hash string - The content hash for the Guest Configuration package.
- Content
Uri string - The content URI where the Guest Configuration package is stored.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Compliance stringStatus Checked - Date and time, in RFC3339 format, when the machines compliance status was last checked.
- Latest
Report stringId - The ID of the latest report for the guest configuration assignment.
- Name string
- Resource
Group stringName - Virtual
Machine stringName
- assignment
Hash String - Combined hash of the configuration package and parameters.
- compliance
Status String - A value indicating compliance status of the machine for the assigned guest configuration. Possible return values are
Compliant,NonCompliantandPending. - content
Hash String - The content hash for the Guest Configuration package.
- content
Uri String - The content URI where the Guest Configuration package is stored.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Compliance StringStatus Checked - Date and time, in RFC3339 format, when the machines compliance status was last checked.
- latest
Report StringId - The ID of the latest report for the guest configuration assignment.
- name String
- resource
Group StringName - virtual
Machine StringName
- assignment
Hash string - Combined hash of the configuration package and parameters.
- compliance
Status string - A value indicating compliance status of the machine for the assigned guest configuration. Possible return values are
Compliant,NonCompliantandPending. - content
Hash string - The content hash for the Guest Configuration package.
- content
Uri string - The content URI where the Guest Configuration package is stored.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Compliance stringStatus Checked - Date and time, in RFC3339 format, when the machines compliance status was last checked.
- latest
Report stringId - The ID of the latest report for the guest configuration assignment.
- name string
- resource
Group stringName - virtual
Machine stringName
- assignment_
hash str - Combined hash of the configuration package and parameters.
- compliance_
status str - A value indicating compliance status of the machine for the assigned guest configuration. Possible return values are
Compliant,NonCompliantandPending. - content_
hash str - The content hash for the Guest Configuration package.
- content_
uri str - The content URI where the Guest Configuration package is stored.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
compliance_ strstatus_ checked - Date and time, in RFC3339 format, when the machines compliance status was last checked.
- latest_
report_ strid - The ID of the latest report for the guest configuration assignment.
- name str
- resource_
group_ strname - virtual_
machine_ strname
- assignment
Hash String - Combined hash of the configuration package and parameters.
- compliance
Status String - A value indicating compliance status of the machine for the assigned guest configuration. Possible return values are
Compliant,NonCompliantandPending. - content
Hash String - The content hash for the Guest Configuration package.
- content
Uri String - The content URI where the Guest Configuration package is stored.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Compliance StringStatus Checked - Date and time, in RFC3339 format, when the machines compliance status was last checked.
- latest
Report StringId - The ID of the latest report for the guest configuration assignment.
- name String
- resource
Group StringName - virtual
Machine StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
