1. Packages
  2. Azure Classic
  3. API Docs
  4. arcmachine
  5. AutomanageConfigurationAssignment

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.arcmachine.AutomanageConfigurationAssignment

Explore with Pulumi AI

Manages an Arc Machine Automanage Configuration Profile Assignment.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const config = new pulumi.Config();
// The name of the Arc Machine.
const arcMachineName = config.requireObject("arcMachineName");
const exampleResourceGroup = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const example = exampleResourceGroup.name.apply(name => azure.arcmachine.getOutput({
    name: arcMachineName,
    resourceGroupName: name,
}));
const exampleConfiguration = new azure.automanage.Configuration("example", {
    name: "example-configuration",
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
});
const exampleAutomanageConfigurationAssignment = new azure.arcmachine.AutomanageConfigurationAssignment("example", {
    arcMachineId: example.apply(example => example.id),
    configurationId: exampleConfiguration.id,
});
Copy
import pulumi
import pulumi_azure as azure

config = pulumi.Config()
# The name of the Arc Machine.
arc_machine_name = config.require_object("arcMachineName")
example_resource_group = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example = example_resource_group.name.apply(lambda name: azure.arcmachine.get_output(name=arc_machine_name,
    resource_group_name=name))
example_configuration = azure.automanage.Configuration("example",
    name="example-configuration",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location)
example_automanage_configuration_assignment = azure.arcmachine.AutomanageConfigurationAssignment("example",
    arc_machine_id=example.id,
    configuration_id=example_configuration.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arcmachine"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automanage"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		// The name of the Arc Machine.
		arcMachineName := cfg.RequireObject("arcMachineName")
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		example := exampleResourceGroup.Name.ApplyT(func(name string) (arcmachine.GetResult, error) {
			return arcmachine.GetResult(interface{}(arcmachine.GetOutput(ctx, arcmachine.GetOutputArgs{
				Name:              arcMachineName,
				ResourceGroupName: name,
			}, nil))), nil
		}).(arcmachine.GetResultOutput)
		exampleConfiguration, err := automanage.NewConfiguration(ctx, "example", &automanage.ConfigurationArgs{
			Name:              pulumi.String("example-configuration"),
			ResourceGroupName: exampleResourceGroup.Name,
			Location:          exampleResourceGroup.Location,
		})
		if err != nil {
			return err
		}
		_, err = arcmachine.NewAutomanageConfigurationAssignment(ctx, "example", &arcmachine.AutomanageConfigurationAssignmentArgs{
			ArcMachineId: pulumi.String(example.ApplyT(func(example arcmachine.GetResult) (*string, error) {
				return &example.Id, nil
			}).(pulumi.StringPtrOutput)),
			ConfigurationId: exampleConfiguration.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    // The name of the Arc Machine.
    var arcMachineName = config.RequireObject<dynamic>("arcMachineName");
    var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var example = Azure.ArcMachine.Get.Invoke(new()
    {
        Name = arcMachineName,
        ResourceGroupName = exampleResourceGroup.Name,
    });

    var exampleConfiguration = new Azure.Automanage.Configuration("example", new()
    {
        Name = "example-configuration",
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
    });

    var exampleAutomanageConfigurationAssignment = new Azure.ArcMachine.AutomanageConfigurationAssignment("example", new()
    {
        ArcMachineId = example.Apply(getResult => getResult.Id),
        ConfigurationId = exampleConfiguration.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.arcmachine.ArcmachineFunctions;
import com.pulumi.azure.arcmachine.inputs.GetArgs;
import com.pulumi.azure.automanage.Configuration;
import com.pulumi.azure.automanage.ConfigurationArgs;
import com.pulumi.azure.arcmachine.AutomanageConfigurationAssignment;
import com.pulumi.azure.arcmachine.AutomanageConfigurationAssignmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var arcMachineName = config.get("arcMachineName");
        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        final var example = ArcmachineFunctions.get(GetArgs.builder()
            .name(arcMachineName)
            .resourceGroupName(exampleResourceGroup.name())
            .build());

        var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()
            .name("example-configuration")
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .build());

        var exampleAutomanageConfigurationAssignment = new AutomanageConfigurationAssignment("exampleAutomanageConfigurationAssignment", AutomanageConfigurationAssignmentArgs.builder()
            .arcMachineId(example.applyValue(getResult -> getResult).applyValue(example -> example.applyValue(getResult -> getResult.id())))
            .configurationId(exampleConfiguration.id())
            .build());

    }
}
Copy
configuration:
  arcMachineName:
    type: dynamic
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    name: example
    properties:
      name: example-resources
      location: West Europe
  exampleConfiguration:
    type: azure:automanage:Configuration
    name: example
    properties:
      name: example-configuration
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
  exampleAutomanageConfigurationAssignment:
    type: azure:arcmachine:AutomanageConfigurationAssignment
    name: example
    properties:
      arcMachineId: ${example.id}
      configurationId: ${exampleConfiguration.id}
variables:
  example:
    fn::invoke:
      function: azure:arcmachine:get
      arguments:
        name: ${arcMachineName}
        resourceGroupName: ${exampleResourceGroup.name}
Copy

Create AutomanageConfigurationAssignment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AutomanageConfigurationAssignment(name: string, args: AutomanageConfigurationAssignmentArgs, opts?: CustomResourceOptions);
@overload
def AutomanageConfigurationAssignment(resource_name: str,
                                      args: AutomanageConfigurationAssignmentArgs,
                                      opts: Optional[ResourceOptions] = None)

@overload
def AutomanageConfigurationAssignment(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      arc_machine_id: Optional[str] = None,
                                      configuration_id: Optional[str] = None)
func NewAutomanageConfigurationAssignment(ctx *Context, name string, args AutomanageConfigurationAssignmentArgs, opts ...ResourceOption) (*AutomanageConfigurationAssignment, error)
public AutomanageConfigurationAssignment(string name, AutomanageConfigurationAssignmentArgs args, CustomResourceOptions? opts = null)
public AutomanageConfigurationAssignment(String name, AutomanageConfigurationAssignmentArgs args)
public AutomanageConfigurationAssignment(String name, AutomanageConfigurationAssignmentArgs args, CustomResourceOptions options)
type: azure:arcmachine:AutomanageConfigurationAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AutomanageConfigurationAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AutomanageConfigurationAssignmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AutomanageConfigurationAssignmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AutomanageConfigurationAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AutomanageConfigurationAssignmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var automanageConfigurationAssignmentResource = new Azure.ArcMachine.AutomanageConfigurationAssignment("automanageConfigurationAssignmentResource", new()
{
    ArcMachineId = "string",
    ConfigurationId = "string",
});
Copy
example, err := arcmachine.NewAutomanageConfigurationAssignment(ctx, "automanageConfigurationAssignmentResource", &arcmachine.AutomanageConfigurationAssignmentArgs{
	ArcMachineId:    pulumi.String("string"),
	ConfigurationId: pulumi.String("string"),
})
Copy
var automanageConfigurationAssignmentResource = new AutomanageConfigurationAssignment("automanageConfigurationAssignmentResource", AutomanageConfigurationAssignmentArgs.builder()
    .arcMachineId("string")
    .configurationId("string")
    .build());
Copy
automanage_configuration_assignment_resource = azure.arcmachine.AutomanageConfigurationAssignment("automanageConfigurationAssignmentResource",
    arc_machine_id="string",
    configuration_id="string")
Copy
const automanageConfigurationAssignmentResource = new azure.arcmachine.AutomanageConfigurationAssignment("automanageConfigurationAssignmentResource", {
    arcMachineId: "string",
    configurationId: "string",
});
Copy
type: azure:arcmachine:AutomanageConfigurationAssignment
properties:
    arcMachineId: string
    configurationId: string
Copy

AutomanageConfigurationAssignment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AutomanageConfigurationAssignment resource accepts the following input properties:

ArcMachineId
This property is required.
Changes to this property will trigger replacement.
string
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ConfigurationId
This property is required.
Changes to this property will trigger replacement.
string

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

ArcMachineId
This property is required.
Changes to this property will trigger replacement.
string
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ConfigurationId
This property is required.
Changes to this property will trigger replacement.
string

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

arcMachineId
This property is required.
Changes to this property will trigger replacement.
String
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
configurationId
This property is required.
Changes to this property will trigger replacement.
String

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

arcMachineId
This property is required.
Changes to this property will trigger replacement.
string
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
configurationId
This property is required.
Changes to this property will trigger replacement.
string

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

arc_machine_id
This property is required.
Changes to this property will trigger replacement.
str
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
configuration_id
This property is required.
Changes to this property will trigger replacement.
str

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

arcMachineId
This property is required.
Changes to this property will trigger replacement.
String
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
configurationId
This property is required.
Changes to this property will trigger replacement.
String

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

Outputs

All input properties are implicitly available as output properties. Additionally, the AutomanageConfigurationAssignment resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing AutomanageConfigurationAssignment Resource

Get an existing AutomanageConfigurationAssignment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AutomanageConfigurationAssignmentState, opts?: CustomResourceOptions): AutomanageConfigurationAssignment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arc_machine_id: Optional[str] = None,
        configuration_id: Optional[str] = None) -> AutomanageConfigurationAssignment
func GetAutomanageConfigurationAssignment(ctx *Context, name string, id IDInput, state *AutomanageConfigurationAssignmentState, opts ...ResourceOption) (*AutomanageConfigurationAssignment, error)
public static AutomanageConfigurationAssignment Get(string name, Input<string> id, AutomanageConfigurationAssignmentState? state, CustomResourceOptions? opts = null)
public static AutomanageConfigurationAssignment get(String name, Output<String> id, AutomanageConfigurationAssignmentState state, CustomResourceOptions options)
resources:  _:    type: azure:arcmachine:AutomanageConfigurationAssignment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ArcMachineId Changes to this property will trigger replacement. string
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ConfigurationId Changes to this property will trigger replacement. string

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

ArcMachineId Changes to this property will trigger replacement. string
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ConfigurationId Changes to this property will trigger replacement. string

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

arcMachineId Changes to this property will trigger replacement. String
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
configurationId Changes to this property will trigger replacement. String

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

arcMachineId Changes to this property will trigger replacement. string
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
configurationId Changes to this property will trigger replacement. string

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

arc_machine_id Changes to this property will trigger replacement. str
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
configuration_id Changes to this property will trigger replacement. str

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

arcMachineId Changes to this property will trigger replacement. String
The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
configurationId Changes to this property will trigger replacement. String

The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.

NOTE: For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

Import

Virtual Machine Automanage Configuration Profile Assignment can be imported using the resource id, e.g.

$ pulumi import azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HybridCompute/machines/machine1/providers/Microsoft.AutoManage/configurationProfileAssignments/default
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.