1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. Extension

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.compute.Extension

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages a Virtual Machine Extension to provide post deployment configuration and run automated tasks.

    NOTE: Custom Script Extensions for Linux & Windows require that the commandToExecute returns a 0 exit code to be classified as successfully deployed. You can achieve this by appending exit 0 to the end of your commandToExecute.

    NOTE: Custom Script Extensions require that the Azure Virtual Machine Guest Agent is running on the Virtual Machine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as std from "@pulumi/std";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "acctvn",
        addressSpaces: ["10.0.0.0/16"],
        location: example.location,
        resourceGroupName: example.name,
    });
    const exampleSubnet = new azure.network.Subnet("example", {
        name: "acctsub",
        resourceGroupName: example.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
    });
    const exampleNetworkInterface = new azure.network.NetworkInterface("example", {
        name: "acctni",
        location: example.location,
        resourceGroupName: example.name,
        ipConfigurations: [{
            name: "testconfiguration1",
            subnetId: exampleSubnet.id,
            privateIpAddressAllocation: "Dynamic",
        }],
    });
    const exampleLinuxVirtualMachine = new azure.compute.LinuxVirtualMachine("example", {
        name: "example-machine",
        resourceGroupName: example.name,
        location: example.location,
        size: "Standard_F2",
        adminUsername: "adminuser",
        networkInterfaceIds: [exampleNetworkInterface.id],
        adminSshKeys: [{
            username: "adminuser",
            publicKey: std.file({
                input: "~/.ssh/id_rsa.pub",
            }).then(invoke => invoke.result),
        }],
        osDisk: {
            caching: "ReadWrite",
            storageAccountType: "Standard_LRS",
        },
        sourceImageReference: {
            publisher: "Canonical",
            offer: "0001-com-ubuntu-server-jammy",
            sku: "22_04-lts",
            version: "latest",
        },
    });
    const exampleExtension = new azure.compute.Extension("example", {
        name: "hostname",
        virtualMachineId: exampleLinuxVirtualMachine.id,
        publisher: "Microsoft.Azure.Extensions",
        type: "CustomScript",
        typeHandlerVersion: "2.0",
        settings: ` {
      "commandToExecute": "hostname && uptime"
     }
    `,
        tags: {
            environment: "Production",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_std as std
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="acctvn",
        address_spaces=["10.0.0.0/16"],
        location=example.location,
        resource_group_name=example.name)
    example_subnet = azure.network.Subnet("example",
        name="acctsub",
        resource_group_name=example.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"])
    example_network_interface = azure.network.NetworkInterface("example",
        name="acctni",
        location=example.location,
        resource_group_name=example.name,
        ip_configurations=[{
            "name": "testconfiguration1",
            "subnet_id": example_subnet.id,
            "private_ip_address_allocation": "Dynamic",
        }])
    example_linux_virtual_machine = azure.compute.LinuxVirtualMachine("example",
        name="example-machine",
        resource_group_name=example.name,
        location=example.location,
        size="Standard_F2",
        admin_username="adminuser",
        network_interface_ids=[example_network_interface.id],
        admin_ssh_keys=[{
            "username": "adminuser",
            "public_key": std.file(input="~/.ssh/id_rsa.pub").result,
        }],
        os_disk={
            "caching": "ReadWrite",
            "storage_account_type": "Standard_LRS",
        },
        source_image_reference={
            "publisher": "Canonical",
            "offer": "0001-com-ubuntu-server-jammy",
            "sku": "22_04-lts",
            "version": "latest",
        })
    example_extension = azure.compute.Extension("example",
        name="hostname",
        virtual_machine_id=example_linux_virtual_machine.id,
        publisher="Microsoft.Azure.Extensions",
        type="CustomScript",
        type_handler_version="2.0",
        settings=""" {
      "commandToExecute": "hostname && uptime"
     }
    """,
        tags={
            "environment": "Production",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name: pulumi.String("acctvn"),
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
    			Name:               pulumi.String("acctsub"),
    			ResourceGroupName:  example.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.2.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{
    			Name:              pulumi.String("acctni"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
    				&network.NetworkInterfaceIpConfigurationArgs{
    					Name:                       pulumi.String("testconfiguration1"),
    					SubnetId:                   exampleSubnet.ID(),
    					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		invokeFile, err := std.File(ctx, &std.FileArgs{
    			Input: "~/.ssh/id_rsa.pub",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{
    			Name:              pulumi.String("example-machine"),
    			ResourceGroupName: example.Name,
    			Location:          example.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: pulumi.String(invokeFile.Result),
    				},
    			},
    			OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
    				Caching:            pulumi.String("ReadWrite"),
    				StorageAccountType: pulumi.String("Standard_LRS"),
    			},
    			SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
    				Publisher: pulumi.String("Canonical"),
    				Offer:     pulumi.String("0001-com-ubuntu-server-jammy"),
    				Sku:       pulumi.String("22_04-lts"),
    				Version:   pulumi.String("latest"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewExtension(ctx, "example", &compute.ExtensionArgs{
    			Name:               pulumi.String("hostname"),
    			VirtualMachineId:   exampleLinuxVirtualMachine.ID(),
    			Publisher:          pulumi.String("Microsoft.Azure.Extensions"),
    			Type:               pulumi.String("CustomScript"),
    			TypeHandlerVersion: pulumi.String("2.0"),
    			Settings:           pulumi.String(" {\n  \"commandToExecute\": \"hostname && uptime\"\n }\n"),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("Production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "acctvn",
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var exampleSubnet = new Azure.Network.Subnet("example", new()
        {
            Name = "acctsub",
            ResourceGroupName = example.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.2.0/24",
            },
        });
    
        var exampleNetworkInterface = new Azure.Network.NetworkInterface("example", new()
        {
            Name = "acctni",
            Location = example.Location,
            ResourceGroupName = example.Name,
            IpConfigurations = new[]
            {
                new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
                {
                    Name = "testconfiguration1",
                    SubnetId = exampleSubnet.Id,
                    PrivateIpAddressAllocation = "Dynamic",
                },
            },
        });
    
        var exampleLinuxVirtualMachine = new Azure.Compute.LinuxVirtualMachine("example", new()
        {
            Name = "example-machine",
            ResourceGroupName = example.Name,
            Location = example.Location,
            Size = "Standard_F2",
            AdminUsername = "adminuser",
            NetworkInterfaceIds = new[]
            {
                exampleNetworkInterface.Id,
            },
            AdminSshKeys = new[]
            {
                new Azure.Compute.Inputs.LinuxVirtualMachineAdminSshKeyArgs
                {
                    Username = "adminuser",
                    PublicKey = Std.File.Invoke(new()
                    {
                        Input = "~/.ssh/id_rsa.pub",
                    }).Apply(invoke => invoke.Result),
                },
            },
            OsDisk = new Azure.Compute.Inputs.LinuxVirtualMachineOsDiskArgs
            {
                Caching = "ReadWrite",
                StorageAccountType = "Standard_LRS",
            },
            SourceImageReference = new Azure.Compute.Inputs.LinuxVirtualMachineSourceImageReferenceArgs
            {
                Publisher = "Canonical",
                Offer = "0001-com-ubuntu-server-jammy",
                Sku = "22_04-lts",
                Version = "latest",
            },
        });
    
        var exampleExtension = new Azure.Compute.Extension("example", new()
        {
            Name = "hostname",
            VirtualMachineId = exampleLinuxVirtualMachine.Id,
            Publisher = "Microsoft.Azure.Extensions",
            Type = "CustomScript",
            TypeHandlerVersion = "2.0",
            Settings = @" {
      ""commandToExecute"": ""hostname && uptime""
     }
    ",
            Tags = 
            {
                { "environment", "Production" },
            },
        });
    
    });
    
    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.compute.Extension;
    import com.pulumi.azure.compute.ExtensionArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
                .name("acctvn")
                .addressSpaces("10.0.0.0/16")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
                .name("acctsub")
                .resourceGroupName(example.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.2.0/24")
                .build());
    
            var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()
                .name("acctni")
                .location(example.location())
                .resourceGroupName(example.name())
                .ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
                    .name("testconfiguration1")
                    .subnetId(exampleSubnet.id())
                    .privateIpAddressAllocation("Dynamic")
                    .build())
                .build());
    
            var exampleLinuxVirtualMachine = new LinuxVirtualMachine("exampleLinuxVirtualMachine", LinuxVirtualMachineArgs.builder()
                .name("example-machine")
                .resourceGroupName(example.name())
                .location(example.location())
                .size("Standard_F2")
                .adminUsername("adminuser")
                .networkInterfaceIds(exampleNetworkInterface.id())
                .adminSshKeys(LinuxVirtualMachineAdminSshKeyArgs.builder()
                    .username("adminuser")
                    .publicKey(StdFunctions.file(FileArgs.builder()
                        .input("~/.ssh/id_rsa.pub")
                        .build()).result())
                    .build())
                .osDisk(LinuxVirtualMachineOsDiskArgs.builder()
                    .caching("ReadWrite")
                    .storageAccountType("Standard_LRS")
                    .build())
                .sourceImageReference(LinuxVirtualMachineSourceImageReferenceArgs.builder()
                    .publisher("Canonical")
                    .offer("0001-com-ubuntu-server-jammy")
                    .sku("22_04-lts")
                    .version("latest")
                    .build())
                .build());
    
            var exampleExtension = new Extension("exampleExtension", ExtensionArgs.builder()
                .name("hostname")
                .virtualMachineId(exampleLinuxVirtualMachine.id())
                .publisher("Microsoft.Azure.Extensions")
                .type("CustomScript")
                .typeHandlerVersion("2.0")
                .settings("""
     {
      "commandToExecute": "hostname && uptime"
     }
                """)
                .tags(Map.of("environment", "Production"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: acctvn
          addressSpaces:
            - 10.0.0.0/16
          location: ${example.location}
          resourceGroupName: ${example.name}
      exampleSubnet:
        type: azure:network:Subnet
        name: example
        properties:
          name: acctsub
          resourceGroupName: ${example.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.2.0/24
      exampleNetworkInterface:
        type: azure:network:NetworkInterface
        name: example
        properties:
          name: acctni
          location: ${example.location}
          resourceGroupName: ${example.name}
          ipConfigurations:
            - name: testconfiguration1
              subnetId: ${exampleSubnet.id}
              privateIpAddressAllocation: Dynamic
      exampleLinuxVirtualMachine:
        type: azure:compute:LinuxVirtualMachine
        name: example
        properties:
          name: example-machine
          resourceGroupName: ${example.name}
          location: ${example.location}
          size: Standard_F2
          adminUsername: adminuser
          networkInterfaceIds:
            - ${exampleNetworkInterface.id}
          adminSshKeys:
            - username: adminuser
              publicKey:
                fn::invoke:
                  Function: std:file
                  Arguments:
                    input: ~/.ssh/id_rsa.pub
                  Return: result
          osDisk:
            caching: ReadWrite
            storageAccountType: Standard_LRS
          sourceImageReference:
            publisher: Canonical
            offer: 0001-com-ubuntu-server-jammy
            sku: 22_04-lts
            version: latest
      exampleExtension:
        type: azure:compute:Extension
        name: example
        properties:
          name: hostname
          virtualMachineId: ${exampleLinuxVirtualMachine.id}
          publisher: Microsoft.Azure.Extensions
          type: CustomScript
          typeHandlerVersion: '2.0'
          settings: |2
             {
              "commandToExecute": "hostname && uptime"
             }
          tags:
            environment: Production
    

    Create Extension Resource

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

    Constructor syntax

    new Extension(name: string, args: ExtensionArgs, opts?: CustomResourceOptions);
    @overload
    def Extension(resource_name: str,
                  args: ExtensionArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Extension(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  publisher: Optional[str] = None,
                  virtual_machine_id: Optional[str] = None,
                  type_handler_version: Optional[str] = None,
                  type: Optional[str] = None,
                  provision_after_extensions: Optional[Sequence[str]] = None,
                  protected_settings_from_key_vault: Optional[ExtensionProtectedSettingsFromKeyVaultArgs] = None,
                  auto_upgrade_minor_version: Optional[bool] = None,
                  protected_settings: Optional[str] = None,
                  settings: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  name: Optional[str] = None,
                  failure_suppression_enabled: Optional[bool] = None,
                  automatic_upgrade_enabled: Optional[bool] = None)
    func NewExtension(ctx *Context, name string, args ExtensionArgs, opts ...ResourceOption) (*Extension, error)
    public Extension(string name, ExtensionArgs args, CustomResourceOptions? opts = null)
    public Extension(String name, ExtensionArgs args)
    public Extension(String name, ExtensionArgs args, CustomResourceOptions options)
    
    type: azure:compute:Extension
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ExtensionArgs
    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 ExtensionArgs
    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 ExtensionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ExtensionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ExtensionArgs
    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 azureExtensionResource = new Azure.Compute.Extension("azureExtensionResource", new()
    {
        Publisher = "string",
        VirtualMachineId = "string",
        TypeHandlerVersion = "string",
        Type = "string",
        ProvisionAfterExtensions = new[]
        {
            "string",
        },
        ProtectedSettingsFromKeyVault = new Azure.Compute.Inputs.ExtensionProtectedSettingsFromKeyVaultArgs
        {
            SecretUrl = "string",
            SourceVaultId = "string",
        },
        AutoUpgradeMinorVersion = false,
        ProtectedSettings = "string",
        Settings = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Name = "string",
        FailureSuppressionEnabled = false,
        AutomaticUpgradeEnabled = false,
    });
    
    example, err := compute.NewExtension(ctx, "azureExtensionResource", &compute.ExtensionArgs{
    	Publisher:          pulumi.String("string"),
    	VirtualMachineId:   pulumi.String("string"),
    	TypeHandlerVersion: pulumi.String("string"),
    	Type:               pulumi.String("string"),
    	ProvisionAfterExtensions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProtectedSettingsFromKeyVault: &compute.ExtensionProtectedSettingsFromKeyVaultArgs{
    		SecretUrl:     pulumi.String("string"),
    		SourceVaultId: pulumi.String("string"),
    	},
    	AutoUpgradeMinorVersion: pulumi.Bool(false),
    	ProtectedSettings:       pulumi.String("string"),
    	Settings:                pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:                      pulumi.String("string"),
    	FailureSuppressionEnabled: pulumi.Bool(false),
    	AutomaticUpgradeEnabled:   pulumi.Bool(false),
    })
    
    var azureExtensionResource = new Extension("azureExtensionResource", ExtensionArgs.builder()
        .publisher("string")
        .virtualMachineId("string")
        .typeHandlerVersion("string")
        .type("string")
        .provisionAfterExtensions("string")
        .protectedSettingsFromKeyVault(ExtensionProtectedSettingsFromKeyVaultArgs.builder()
            .secretUrl("string")
            .sourceVaultId("string")
            .build())
        .autoUpgradeMinorVersion(false)
        .protectedSettings("string")
        .settings("string")
        .tags(Map.of("string", "string"))
        .name("string")
        .failureSuppressionEnabled(false)
        .automaticUpgradeEnabled(false)
        .build());
    
    azure_extension_resource = azure.compute.Extension("azureExtensionResource",
        publisher="string",
        virtual_machine_id="string",
        type_handler_version="string",
        type="string",
        provision_after_extensions=["string"],
        protected_settings_from_key_vault={
            "secret_url": "string",
            "source_vault_id": "string",
        },
        auto_upgrade_minor_version=False,
        protected_settings="string",
        settings="string",
        tags={
            "string": "string",
        },
        name="string",
        failure_suppression_enabled=False,
        automatic_upgrade_enabled=False)
    
    const azureExtensionResource = new azure.compute.Extension("azureExtensionResource", {
        publisher: "string",
        virtualMachineId: "string",
        typeHandlerVersion: "string",
        type: "string",
        provisionAfterExtensions: ["string"],
        protectedSettingsFromKeyVault: {
            secretUrl: "string",
            sourceVaultId: "string",
        },
        autoUpgradeMinorVersion: false,
        protectedSettings: "string",
        settings: "string",
        tags: {
            string: "string",
        },
        name: "string",
        failureSuppressionEnabled: false,
        automaticUpgradeEnabled: false,
    });
    
    type: azure:compute:Extension
    properties:
        autoUpgradeMinorVersion: false
        automaticUpgradeEnabled: false
        failureSuppressionEnabled: false
        name: string
        protectedSettings: string
        protectedSettingsFromKeyVault:
            secretUrl: string
            sourceVaultId: string
        provisionAfterExtensions:
            - string
        publisher: string
        settings: string
        tags:
            string: string
        type: string
        typeHandlerVersion: string
        virtualMachineId: string
    

    Extension 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 Extension resource accepts the following input properties:

    Publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    Type string

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    TypeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    VirtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    AutoUpgradeMinorVersion bool
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    AutomaticUpgradeEnabled bool
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    FailureSuppressionEnabled bool

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    Name string
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    ProtectedSettings string

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    ProtectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVault

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    ProvisionAfterExtensions List<string>
    Specifies the collection of extension names after which this extension needs to be provisioned.
    Settings string

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    Type string

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    TypeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    VirtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    AutoUpgradeMinorVersion bool
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    AutomaticUpgradeEnabled bool
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    FailureSuppressionEnabled bool

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    Name string
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    ProtectedSettings string

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    ProtectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVaultArgs

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    ProvisionAfterExtensions []string
    Specifies the collection of extension names after which this extension needs to be provisioned.
    Settings string

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    Tags map[string]string
    A mapping of tags to assign to the resource.
    publisher String
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    type String

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    typeHandlerVersion String
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    virtualMachineId String
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    autoUpgradeMinorVersion Boolean
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    automaticUpgradeEnabled Boolean
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    failureSuppressionEnabled Boolean

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    name String
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    protectedSettings String

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    protectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVault

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    provisionAfterExtensions List<String>
    Specifies the collection of extension names after which this extension needs to be provisioned.
    settings String

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    tags Map<String,String>
    A mapping of tags to assign to the resource.
    publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    type string

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    typeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    virtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    autoUpgradeMinorVersion boolean
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    automaticUpgradeEnabled boolean
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    failureSuppressionEnabled boolean

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    name string
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    protectedSettings string

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    protectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVault

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    provisionAfterExtensions string[]
    Specifies the collection of extension names after which this extension needs to be provisioned.
    settings string

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    publisher str
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    type str

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    type_handler_version str
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    virtual_machine_id str
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    auto_upgrade_minor_version bool
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    automatic_upgrade_enabled bool
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    failure_suppression_enabled bool

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    name str
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    protected_settings str

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    protected_settings_from_key_vault ExtensionProtectedSettingsFromKeyVaultArgs

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    provision_after_extensions Sequence[str]
    Specifies the collection of extension names after which this extension needs to be provisioned.
    settings str

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    publisher String
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    type String

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    typeHandlerVersion String
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    virtualMachineId String
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    autoUpgradeMinorVersion Boolean
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    automaticUpgradeEnabled Boolean
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    failureSuppressionEnabled Boolean

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    name String
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    protectedSettings String

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    protectedSettingsFromKeyVault Property Map

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    provisionAfterExtensions List<String>
    Specifies the collection of extension names after which this extension needs to be provisioned.
    settings String

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

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

    Get an existing Extension 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?: ExtensionState, opts?: CustomResourceOptions): Extension
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_upgrade_minor_version: Optional[bool] = None,
            automatic_upgrade_enabled: Optional[bool] = None,
            failure_suppression_enabled: Optional[bool] = None,
            name: Optional[str] = None,
            protected_settings: Optional[str] = None,
            protected_settings_from_key_vault: Optional[ExtensionProtectedSettingsFromKeyVaultArgs] = None,
            provision_after_extensions: Optional[Sequence[str]] = None,
            publisher: Optional[str] = None,
            settings: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            type: Optional[str] = None,
            type_handler_version: Optional[str] = None,
            virtual_machine_id: Optional[str] = None) -> Extension
    func GetExtension(ctx *Context, name string, id IDInput, state *ExtensionState, opts ...ResourceOption) (*Extension, error)
    public static Extension Get(string name, Input<string> id, ExtensionState? state, CustomResourceOptions? opts = null)
    public static Extension get(String name, Output<String> id, ExtensionState 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:
    AutoUpgradeMinorVersion bool
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    AutomaticUpgradeEnabled bool
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    FailureSuppressionEnabled bool

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    Name string
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    ProtectedSettings string

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    ProtectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVault

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    ProvisionAfterExtensions List<string>
    Specifies the collection of extension names after which this extension needs to be provisioned.
    Publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    Settings string

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Type string

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    TypeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    VirtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    AutoUpgradeMinorVersion bool
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    AutomaticUpgradeEnabled bool
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    FailureSuppressionEnabled bool

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    Name string
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    ProtectedSettings string

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    ProtectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVaultArgs

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    ProvisionAfterExtensions []string
    Specifies the collection of extension names after which this extension needs to be provisioned.
    Publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    Settings string

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    Tags map[string]string
    A mapping of tags to assign to the resource.
    Type string

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    TypeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    VirtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    autoUpgradeMinorVersion Boolean
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    automaticUpgradeEnabled Boolean
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    failureSuppressionEnabled Boolean

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    name String
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    protectedSettings String

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    protectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVault

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    provisionAfterExtensions List<String>
    Specifies the collection of extension names after which this extension needs to be provisioned.
    publisher String
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    settings String

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    tags Map<String,String>
    A mapping of tags to assign to the resource.
    type String

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    typeHandlerVersion String
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    virtualMachineId String
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    autoUpgradeMinorVersion boolean
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    automaticUpgradeEnabled boolean
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    failureSuppressionEnabled boolean

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    name string
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    protectedSettings string

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    protectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVault

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    provisionAfterExtensions string[]
    Specifies the collection of extension names after which this extension needs to be provisioned.
    publisher string
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    settings string

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    type string

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    typeHandlerVersion string
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    virtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    auto_upgrade_minor_version bool
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    automatic_upgrade_enabled bool
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    failure_suppression_enabled bool

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    name str
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    protected_settings str

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    protected_settings_from_key_vault ExtensionProtectedSettingsFromKeyVaultArgs

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    provision_after_extensions Sequence[str]
    Specifies the collection of extension names after which this extension needs to be provisioned.
    publisher str
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    settings str

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    type str

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    type_handler_version str
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    virtual_machine_id str
    The ID of the Virtual Machine. Changing this forces a new resource to be created
    autoUpgradeMinorVersion Boolean
    Specifies if the platform deploys the latest minor version update to the type_handler_version specified.
    automaticUpgradeEnabled Boolean
    Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?
    failureSuppressionEnabled Boolean

    Should failures from the extension be suppressed? Possible values are true or false. Defaults to false.

    NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failure_suppression_enabled value.

    name String
    The name of the virtual machine extension peering. Changing this forces a new resource to be created.
    protectedSettings String

    The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the protected_settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    protectedSettingsFromKeyVault Property Map

    A protected_settings_from_key_vault block as defined below.

    Note: protected_settings_from_key_vault cannot be used with protected_settings

    provisionAfterExtensions List<String>
    Specifies the collection of extension names after which this extension needs to be provisioned.
    publisher String
    The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created.
    settings String

    The settings passed to the extension, these are specified as a JSON object in a string.

    Please Note: Certain VM Extensions require that the keys in the settings block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the JsonADDomainExtension extension, the keys are expected to be in TitleCase.)

    tags Map<String>
    A mapping of tags to assign to the resource.
    type String

    The type of extension, available types for a publisher can be found using the Azure CLI.

    Note: The Publisher and Type of Virtual Machine Extensions can be found using the Azure CLI, via:

    az vm extension image list --location westus -o table
    
    typeHandlerVersion String
    Specifies the version of the extension to use, available versions can be found using the Azure CLI.
    virtualMachineId String
    The ID of the Virtual Machine. Changing this forces a new resource to be created

    Supporting Types

    ExtensionProtectedSettingsFromKeyVault, ExtensionProtectedSettingsFromKeyVaultArgs

    SecretUrl string
    The URL to the Key Vault Secret which stores the protected settings.
    SourceVaultId string
    The ID of the source Key Vault.
    SecretUrl string
    The URL to the Key Vault Secret which stores the protected settings.
    SourceVaultId string
    The ID of the source Key Vault.
    secretUrl String
    The URL to the Key Vault Secret which stores the protected settings.
    sourceVaultId String
    The ID of the source Key Vault.
    secretUrl string
    The URL to the Key Vault Secret which stores the protected settings.
    sourceVaultId string
    The ID of the source Key Vault.
    secret_url str
    The URL to the Key Vault Secret which stores the protected settings.
    source_vault_id str
    The ID of the source Key Vault.
    secretUrl String
    The URL to the Key Vault Secret which stores the protected settings.
    sourceVaultId String
    The ID of the source Key Vault.

    Import

    Virtual Machine Extensions can be imported using the resource id, e.g.

    $ pulumi import azure:compute/extension:Extension example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachines/myVM/extensions/extensionName
    

    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.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi