Class VirtualMachineScaleSetExtension
Manages an Extension for a Virtual Machine Scale Set.
NOTE: This resource is not intended to be used with the
azure.compute.ScaleSetresource - instead it's intended for this to be used with theazure.compute.LinuxVirtualMachineScaleSetandazure.compute.WindowsVirtualMachineScaleSetresources.
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" },
}),
});
}
}
Inherited Members
Namespace: Pulumi.Azure.Compute
Assembly: Pulumi.Azure.dll
Syntax
public class VirtualMachineScaleSetExtension : CustomResource
Constructors
View SourceVirtualMachineScaleSetExtension(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 SourceAutoUpgradeMinorVersion
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>> |
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> |
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> |
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> |
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>> |
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> |
Settings
A JSON String which specifies Settings for the Extension.
Declaration
public Output<string> Settings { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
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 SourceGet(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 |