VirtualMachineScaleSetExtensionArgs

data class VirtualMachineScaleSetExtensionArgs(val autoUpgradeMinorVersion: Output<Boolean>? = null, val automaticUpgradeEnabled: Output<Boolean>? = null, val failureSuppressionEnabled: Output<Boolean>? = null, val forceUpdateTag: Output<String>? = null, val name: Output<String>? = null, val protectedSettings: Output<String>? = null, val protectedSettingsFromKeyVault: Output<VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs>? = null, val provisionAfterExtensions: Output<List<String>>? = null, val publisher: Output<String>? = null, val settings: Output<String>? = null, val type: Output<String>? = null, val typeHandlerVersion: Output<String>? = null, val virtualMachineScaleSetId: Output<String>? = null) : ConvertibleToJava<VirtualMachineScaleSetExtensionArgs>

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

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.compute.LinuxVirtualMachineScaleSet;
import com.pulumi.azure.compute.LinuxVirtualMachineScaleSetArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetSourceImageReferenceArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetNetworkInterfaceArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetOsDiskArgs;
import com.pulumi.azure.compute.VirtualMachineScaleSetExtension;
import com.pulumi.azure.compute.VirtualMachineScaleSetExtensionArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 exampleLinuxVirtualMachineScaleSet = new LinuxVirtualMachineScaleSet("exampleLinuxVirtualMachineScaleSet", LinuxVirtualMachineScaleSetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku("Standard_F2")
.adminUsername("adminuser")
.instances(1)
.sourceImageReference(LinuxVirtualMachineScaleSetSourceImageReferenceArgs.builder()
.publisher("Canonical")
.offer("0001-com-ubuntu-server-focal")
.sku("20_04-lts")
.version("latest")
.build())
.networkInterfaces(LinuxVirtualMachineScaleSetNetworkInterfaceArgs.builder()
.name("example")
.ipConfigurations(LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs.builder()
.name("internal")
.build())
.build())
.osDisk(LinuxVirtualMachineScaleSetOsDiskArgs.builder()
.storageAccountType("Standard_LRS")
.caching("ReadWrite")
.build())
.build());
var exampleVirtualMachineScaleSetExtension = new VirtualMachineScaleSetExtension("exampleVirtualMachineScaleSetExtension", VirtualMachineScaleSetExtensionArgs.builder()
.virtualMachineScaleSetId(exampleLinuxVirtualMachineScaleSet.id())
.publisher("Microsoft.Azure.Extensions")
.type("CustomScript")
.typeHandlerVersion("2.0")
.settings(serializeJson(
jsonObject(
jsonProperty("commandToExecute", "echo $HOSTNAME")
)))
.build());
}
}

Import

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

$ pulumi import azure:compute/virtualMachineScaleSetExtension:VirtualMachineScaleSetExtension test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleSet1/extensions/extension1

Constructors

Link copied to clipboard
fun VirtualMachineScaleSetExtensionArgs(autoUpgradeMinorVersion: Output<Boolean>? = null, automaticUpgradeEnabled: Output<Boolean>? = null, failureSuppressionEnabled: Output<Boolean>? = null, forceUpdateTag: Output<String>? = null, name: Output<String>? = null, protectedSettings: Output<String>? = null, protectedSettingsFromKeyVault: Output<VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs>? = null, provisionAfterExtensions: Output<List<String>>? = null, publisher: Output<String>? = null, settings: Output<String>? = null, type: Output<String>? = null, typeHandlerVersion: Output<String>? = null, virtualMachineScaleSetId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): VirtualMachineScaleSetExtensionArgs

Properties

Link copied to clipboard
val automaticUpgradeEnabled: Output<Boolean>? = null

Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension?

Link copied to clipboard
val autoUpgradeMinorVersion: Output<Boolean>? = null

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.

Link copied to clipboard
val failureSuppressionEnabled: Output<Boolean>? = null

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

Link copied to clipboard
val forceUpdateTag: Output<String>? = null

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.

Link copied to clipboard
val name: Output<String>? = null

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

Link copied to clipboard
val protectedSettings: Output<String>? = null

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

Link copied to clipboard

A protected_settings_from_key_vault block as defined below.

Link copied to clipboard
val provisionAfterExtensions: Output<List<String>>? = null

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

Link copied to clipboard
val publisher: Output<String>? = null

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

Link copied to clipboard
val settings: Output<String>? = null

A JSON String which specifies Settings for the Extension.

Link copied to clipboard
val type: Output<String>? = null

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

Link copied to clipboard
val typeHandlerVersion: Output<String>? = null

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

Link copied to clipboard
val virtualMachineScaleSetId: Output<String>? = null

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