Show / Hide Table of Contents

Class VirtualMachineScaleSetExtension

Manages an Extension for a Virtual Machine Scale Set.

NOTE: This resource is not intended to be used with the azure.compute.ScaleSet resource - instead it's intended for this to be used with the azure.compute.LinuxVirtualMachineScaleSet and azure.compute.WindowsVirtualMachineScaleSet resources.

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var exampleLinuxVirtualMachineScaleSet = new Azure.Compute.LinuxVirtualMachineScaleSet("exampleLinuxVirtualMachineScaleSet", new Azure.Compute.LinuxVirtualMachineScaleSetArgs
    {
    });
    //...
    var exampleVirtualMachineScaleSetExtension = new Azure.Compute.VirtualMachineScaleSetExtension("exampleVirtualMachineScaleSetExtension", new Azure.Compute.VirtualMachineScaleSetExtensionArgs
    {
        VirtualMachineScaleSetId = exampleLinuxVirtualMachineScaleSet.Id,
        Publisher = "Microsoft.Azure.Extensions",
        Type = "CustomScript",
        TypeHandlerVersion = "2.0",
        Settings = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            { "commandToExecute", "echo $HOSTNAME" },
        }),
    });
}

}
Inheritance
System.Object
Resource
CustomResource
VirtualMachineScaleSetExtension
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.Compute
Assembly: Pulumi.Azure.dll
Syntax
public class VirtualMachineScaleSetExtension : CustomResource

Constructors

View Source

VirtualMachineScaleSetExtension(String, VirtualMachineScaleSetExtensionArgs, CustomResourceOptions)

Create a VirtualMachineScaleSetExtension resource with the given unique name, arguments, and options.

Declaration
public VirtualMachineScaleSetExtension(string name, VirtualMachineScaleSetExtensionArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

VirtualMachineScaleSetExtensionArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AutoUpgradeMinorVersion

Should the latest version of the Extension be used at Deployment Time, if one is available? This won't auto-update the extension on existing installation. Defaults to true.

Declaration
public Output<bool?> AutoUpgradeMinorVersion { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

ForceUpdateTag

A value which, when different to the previous value can be used to force-run the Extension even if the Extension Configuration hasn't changed.

Declaration
public Output<string> ForceUpdateTag { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

ProtectedSettings

A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension.

Declaration
public Output<string> ProtectedSettings { get; }
Property Value
Type Description
Output<System.String>
View Source

ProvisionAfterExtensions

An ordered list of Extension names which this should be provisioned after.

Declaration
public Output<ImmutableArray<string>> ProvisionAfterExtensions { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Publisher

Specifies the Publisher of the Extension. Changing this forces a new resource to be created.

Declaration
public Output<string> Publisher { get; }
Property Value
Type Description
Output<System.String>
View Source

Settings

A JSON String which specifies Settings for the Extension.

Declaration
public Output<string> Settings { get; }
Property Value
Type Description
Output<System.String>
View Source

Type

Specifies the Type of the Extension. Changing this forces a new resource to be created.

Declaration
public Output<string> Type { get; }
Property Value
Type Description
Output<System.String>
View Source

TypeHandlerVersion

Specifies the version of the extension to use, available versions can be found using the Azure CLI.

Declaration
public Output<string> TypeHandlerVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

VirtualMachineScaleSetId

The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created.

Declaration
public Output<string> VirtualMachineScaleSetId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, VirtualMachineScaleSetExtensionState, CustomResourceOptions)

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

Declaration
public static VirtualMachineScaleSetExtension Get(string name, Input<string> id, VirtualMachineScaleSetExtensionState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

VirtualMachineScaleSetExtensionState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
VirtualMachineScaleSetExtension
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.