Virtual Machine Scale Set VMExtension
Describes a VMSS VM Extension. API Version: 2021-03-01.
Example Usage
Create VirtualMachineScaleSet VM extension.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSetVMExtension = new AzureNative.Compute.VirtualMachineScaleSetVMExtension("virtualMachineScaleSetVMExtension", new()
{
AutoUpgradeMinorVersion = true,
InstanceId = "0",
Publisher = "extPublisher",
ResourceGroupName = "myResourceGroup",
Settings =
{
{ "UserName", "xyz@microsoft.com" },
},
Type = "extType",
TypeHandlerVersion = "1.2",
VmExtensionName = "myVMExtension",
VmScaleSetName = "myvmScaleSet",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSetVMExtension(ctx, "virtualMachineScaleSetVMExtension", &compute.VirtualMachineScaleSetVMExtensionArgs{
AutoUpgradeMinorVersion: pulumi.Bool(true),
InstanceId: pulumi.String("0"),
Publisher: pulumi.String("extPublisher"),
ResourceGroupName: pulumi.String("myResourceGroup"),
Settings: pulumi.Any{
UserName: "xyz@microsoft.com",
},
Type: pulumi.String("extType"),
TypeHandlerVersion: pulumi.String("1.2"),
VmExtensionName: pulumi.String("myVMExtension"),
VmScaleSetName: pulumi.String("myvmScaleSet"),
})
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.azurenative.compute.VirtualMachineScaleSetVMExtension;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetVMExtensionArgs;
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 virtualMachineScaleSetVMExtension = new VirtualMachineScaleSetVMExtension("virtualMachineScaleSetVMExtension", VirtualMachineScaleSetVMExtensionArgs.builder()
.autoUpgradeMinorVersion(true)
.instanceId("0")
.publisher("extPublisher")
.resourceGroupName("myResourceGroup")
.settings(Map.of("UserName", "xyz@microsoft.com"))
.type("extType")
.typeHandlerVersion("1.2")
.vmExtensionName("myVMExtension")
.vmScaleSetName("myvmScaleSet")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:compute:VirtualMachineScaleSetVMExtension myVMExtension /subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension
Properties
Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
How the extension handler should be forced to update even if the extension configuration has not changed.
The virtual machine extension instance view.
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
The provisioning state, which only appears in the response.
Specifies the version of the script handler.