Azure Classic

v5.25.0 published on Thursday, Nov 24, 2022 by Pulumi

AssignmentVirtualMachine

Manages a maintenance assignment to virtual machine.

Example Usage

using System.Collections.Generic;
using System.IO;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
    {
        AddressSpaces = new[]
        {
            "10.0.0.0/16",
        },
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
    });

    var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        VirtualNetworkName = exampleVirtualNetwork.Name,
        AddressPrefixes = new[]
        {
            "10.0.2.0/24",
        },
    });

    var exampleNetworkInterface = new Azure.Network.NetworkInterface("exampleNetworkInterface", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        IpConfigurations = new[]
        {
            new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
            {
                Name = "internal",
                SubnetId = exampleSubnet.Id,
                PrivateIpAddressAllocation = "Dynamic",
            },
        },
    });

    var exampleLinuxVirtualMachine = new Azure.Compute.LinuxVirtualMachine("exampleLinuxVirtualMachine", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        Size = "Standard_F2",
        AdminUsername = "adminuser",
        NetworkInterfaceIds = new[]
        {
            exampleNetworkInterface.Id,
        },
        AdminSshKeys = new[]
        {
            new Azure.Compute.Inputs.LinuxVirtualMachineAdminSshKeyArgs
            {
                Username = "adminuser",
                PublicKey = File.ReadAllText("~/.ssh/id_rsa.pub"),
            },
        },
        OsDisk = new Azure.Compute.Inputs.LinuxVirtualMachineOsDiskArgs
        {
            Caching = "ReadWrite",
            StorageAccountType = "Standard_LRS",
        },
        SourceImageReference = new Azure.Compute.Inputs.LinuxVirtualMachineSourceImageReferenceArgs
        {
            Publisher = "Canonical",
            Offer = "UbuntuServer",
            Sku = "16.04-LTS",
            Version = "latest",
        },
    });

    var exampleConfiguration = new Azure.Maintenance.Configuration("exampleConfiguration", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        Scope = "All",
    });

    var exampleAssignmentVirtualMachine = new Azure.Maintenance.AssignmentVirtualMachine("exampleAssignmentVirtualMachine", new()
    {
        Location = exampleResourceGroup.Location,
        MaintenanceConfigurationId = exampleConfiguration.Id,
        VirtualMachineId = exampleLinuxVirtualMachine.Id,
    });

});
package main

import (
	"io/ioutil"

	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/maintenance"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
			AddressSpaces: pulumi.StringArray{
				pulumi.String("10.0.0.0/16"),
			},
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
		})
		if err != nil {
			return err
		}
		exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
			ResourceGroupName:  exampleResourceGroup.Name,
			VirtualNetworkName: exampleVirtualNetwork.Name,
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.0.2.0/24"),
			},
		})
		if err != nil {
			return err
		}
		exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "exampleNetworkInterface", &network.NetworkInterfaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
				&network.NetworkInterfaceIpConfigurationArgs{
					Name:                       pulumi.String("internal"),
					SubnetId:                   exampleSubnet.ID(),
					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
				},
			},
		})
		if err != nil {
			return err
		}
		exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "exampleLinuxVirtualMachine", &compute.LinuxVirtualMachineArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			Location:          exampleResourceGroup.Location,
			Size:              pulumi.String("Standard_F2"),
			AdminUsername:     pulumi.String("adminuser"),
			NetworkInterfaceIds: pulumi.StringArray{
				exampleNetworkInterface.ID(),
			},
			AdminSshKeys: compute.LinuxVirtualMachineAdminSshKeyArray{
				&compute.LinuxVirtualMachineAdminSshKeyArgs{
					Username:  pulumi.String("adminuser"),
					PublicKey: readFileOrPanic("~/.ssh/id_rsa.pub"),
				},
			},
			OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
				Caching:            pulumi.String("ReadWrite"),
				StorageAccountType: pulumi.String("Standard_LRS"),
			},
			SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
				Publisher: pulumi.String("Canonical"),
				Offer:     pulumi.String("UbuntuServer"),
				Sku:       pulumi.String("16.04-LTS"),
				Version:   pulumi.String("latest"),
			},
		})
		if err != nil {
			return err
		}
		exampleConfiguration, err := maintenance.NewConfiguration(ctx, "exampleConfiguration", &maintenance.ConfigurationArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			Location:          exampleResourceGroup.Location,
			Scope:             pulumi.String("All"),
		})
		if err != nil {
			return err
		}
		_, err = maintenance.NewAssignmentVirtualMachine(ctx, "exampleAssignmentVirtualMachine", &maintenance.AssignmentVirtualMachineArgs{
			Location:                   exampleResourceGroup.Location,
			MaintenanceConfigurationId: exampleConfiguration.ID(),
			VirtualMachineId:           exampleLinuxVirtualMachine.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.NetworkInterface;
import com.pulumi.azure.network.NetworkInterfaceArgs;
import com.pulumi.azure.network.inputs.NetworkInterfaceIpConfigurationArgs;
import com.pulumi.azure.compute.LinuxVirtualMachine;
import com.pulumi.azure.compute.LinuxVirtualMachineArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineAdminSshKeyArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineOsDiskArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineSourceImageReferenceArgs;
import com.pulumi.azure.maintenance.Configuration;
import com.pulumi.azure.maintenance.ConfigurationArgs;
import com.pulumi.azure.maintenance.AssignmentVirtualMachine;
import com.pulumi.azure.maintenance.AssignmentVirtualMachineArgs;
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) {
        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
            .addressSpaces("10.0.0.0/16")
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .build());

        var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .virtualNetworkName(exampleVirtualNetwork.name())
            .addressPrefixes("10.0.2.0/24")
            .build());

        var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
                .name("internal")
                .subnetId(exampleSubnet.id())
                .privateIpAddressAllocation("Dynamic")
                .build())
            .build());

        var exampleLinuxVirtualMachine = new LinuxVirtualMachine("exampleLinuxVirtualMachine", LinuxVirtualMachineArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .size("Standard_F2")
            .adminUsername("adminuser")
            .networkInterfaceIds(exampleNetworkInterface.id())
            .adminSshKeys(LinuxVirtualMachineAdminSshKeyArgs.builder()
                .username("adminuser")
                .publicKey(Files.readString(Paths.get("~/.ssh/id_rsa.pub")))
                .build())
            .osDisk(LinuxVirtualMachineOsDiskArgs.builder()
                .caching("ReadWrite")
                .storageAccountType("Standard_LRS")
                .build())
            .sourceImageReference(LinuxVirtualMachineSourceImageReferenceArgs.builder()
                .publisher("Canonical")
                .offer("UbuntuServer")
                .sku("16.04-LTS")
                .version("latest")
                .build())
            .build());

        var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .scope("All")
            .build());

        var exampleAssignmentVirtualMachine = new AssignmentVirtualMachine("exampleAssignmentVirtualMachine", AssignmentVirtualMachineArgs.builder()        
            .location(exampleResourceGroup.location())
            .maintenanceConfigurationId(exampleConfiguration.id())
            .virtualMachineId(exampleLinuxVirtualMachine.id())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
    address_spaces=["10.0.0.0/16"],
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name)
example_subnet = azure.network.Subnet("exampleSubnet",
    resource_group_name=example_resource_group.name,
    virtual_network_name=example_virtual_network.name,
    address_prefixes=["10.0.2.0/24"])
example_network_interface = azure.network.NetworkInterface("exampleNetworkInterface",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    ip_configurations=[azure.network.NetworkInterfaceIpConfigurationArgs(
        name="internal",
        subnet_id=example_subnet.id,
        private_ip_address_allocation="Dynamic",
    )])
example_linux_virtual_machine = azure.compute.LinuxVirtualMachine("exampleLinuxVirtualMachine",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    size="Standard_F2",
    admin_username="adminuser",
    network_interface_ids=[example_network_interface.id],
    admin_ssh_keys=[azure.compute.LinuxVirtualMachineAdminSshKeyArgs(
        username="adminuser",
        public_key=(lambda path: open(path).read())("~/.ssh/id_rsa.pub"),
    )],
    os_disk=azure.compute.LinuxVirtualMachineOsDiskArgs(
        caching="ReadWrite",
        storage_account_type="Standard_LRS",
    ),
    source_image_reference=azure.compute.LinuxVirtualMachineSourceImageReferenceArgs(
        publisher="Canonical",
        offer="UbuntuServer",
        sku="16.04-LTS",
        version="latest",
    ))
example_configuration = azure.maintenance.Configuration("exampleConfiguration",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    scope="All")
example_assignment_virtual_machine = azure.maintenance.AssignmentVirtualMachine("exampleAssignmentVirtualMachine",
    location=example_resource_group.location,
    maintenance_configuration_id=example_configuration.id,
    virtual_machine_id=example_linux_virtual_machine.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as fs from "fs";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
    addressSpaces: ["10.0.0.0/16"],
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
});
const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
    resourceGroupName: exampleResourceGroup.name,
    virtualNetworkName: exampleVirtualNetwork.name,
    addressPrefixes: ["10.0.2.0/24"],
});
const exampleNetworkInterface = new azure.network.NetworkInterface("exampleNetworkInterface", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    ipConfigurations: [{
        name: "internal",
        subnetId: exampleSubnet.id,
        privateIpAddressAllocation: "Dynamic",
    }],
});
const exampleLinuxVirtualMachine = new azure.compute.LinuxVirtualMachine("exampleLinuxVirtualMachine", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    size: "Standard_F2",
    adminUsername: "adminuser",
    networkInterfaceIds: [exampleNetworkInterface.id],
    adminSshKeys: [{
        username: "adminuser",
        publicKey: fs.readFileSync("~/.ssh/id_rsa.pub"),
    }],
    osDisk: {
        caching: "ReadWrite",
        storageAccountType: "Standard_LRS",
    },
    sourceImageReference: {
        publisher: "Canonical",
        offer: "UbuntuServer",
        sku: "16.04-LTS",
        version: "latest",
    },
});
const exampleConfiguration = new azure.maintenance.Configuration("exampleConfiguration", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    scope: "All",
});
const exampleAssignmentVirtualMachine = new azure.maintenance.AssignmentVirtualMachine("exampleAssignmentVirtualMachine", {
    location: exampleResourceGroup.location,
    maintenanceConfigurationId: exampleConfiguration.id,
    virtualMachineId: exampleLinuxVirtualMachine.id,
});

Coming soon!

Create AssignmentVirtualMachine Resource

new AssignmentVirtualMachine(name: string, args: AssignmentVirtualMachineArgs, opts?: CustomResourceOptions);
@overload
def AssignmentVirtualMachine(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             location: Optional[str] = None,
                             maintenance_configuration_id: Optional[str] = None,
                             virtual_machine_id: Optional[str] = None)
@overload
def AssignmentVirtualMachine(resource_name: str,
                             args: AssignmentVirtualMachineArgs,
                             opts: Optional[ResourceOptions] = None)
func NewAssignmentVirtualMachine(ctx *Context, name string, args AssignmentVirtualMachineArgs, opts ...ResourceOption) (*AssignmentVirtualMachine, error)
public AssignmentVirtualMachine(string name, AssignmentVirtualMachineArgs args, CustomResourceOptions? opts = null)
public AssignmentVirtualMachine(String name, AssignmentVirtualMachineArgs args)
public AssignmentVirtualMachine(String name, AssignmentVirtualMachineArgs args, CustomResourceOptions options)
type: azure:maintenance:AssignmentVirtualMachine
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

AssignmentVirtualMachine Resource Properties

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

Inputs

The AssignmentVirtualMachine resource accepts the following input properties:

MaintenanceConfigurationId string

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

VirtualMachineId string

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaintenanceConfigurationId string

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

VirtualMachineId string

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maintenanceConfigurationId String

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

virtualMachineId String

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maintenanceConfigurationId string

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

virtualMachineId string

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maintenance_configuration_id str

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

virtual_machine_id str

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maintenanceConfigurationId String

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

virtualMachineId String

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the AssignmentVirtualMachine 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 AssignmentVirtualMachine Resource

Get an existing AssignmentVirtualMachine 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?: AssignmentVirtualMachineState, opts?: CustomResourceOptions): AssignmentVirtualMachine
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        location: Optional[str] = None,
        maintenance_configuration_id: Optional[str] = None,
        virtual_machine_id: Optional[str] = None) -> AssignmentVirtualMachine
func GetAssignmentVirtualMachine(ctx *Context, name string, id IDInput, state *AssignmentVirtualMachineState, opts ...ResourceOption) (*AssignmentVirtualMachine, error)
public static AssignmentVirtualMachine Get(string name, Input<string> id, AssignmentVirtualMachineState? state, CustomResourceOptions? opts = null)
public static AssignmentVirtualMachine get(String name, Output<String> id, AssignmentVirtualMachineState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:
Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaintenanceConfigurationId string

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

VirtualMachineId string

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaintenanceConfigurationId string

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

VirtualMachineId string

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maintenanceConfigurationId String

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

virtualMachineId String

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maintenanceConfigurationId string

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

virtualMachineId string

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maintenance_configuration_id str

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

virtual_machine_id str

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maintenanceConfigurationId String

Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

virtualMachineId String

Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

Import

Maintenance Assignment can be imported using the resource id, e.g.

 $ pulumi import azure:maintenance/assignmentVirtualMachine:AssignmentVirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resGroup1/providers/microsoft.compute/virtualMachines/vm1/providers/Microsoft.Maintenance/configurationAssignments/assign1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.