import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example", * location: "West Europe", * }); * const exampleLinuxVirtualMachineScaleSet = new azure.compute.LinuxVirtualMachineScaleSet("example", { * name: "example", * resourceGroupName: example.name, * location: example.location, * sku: "Standard_F2", * adminUsername: "adminuser", * instances: 1, * sourceImageReference: { * publisher: "Canonical", * offer: "0001-com-ubuntu-server-jammy", * sku: "22_04-lts", * version: "latest", * }, * networkInterfaces: [{ * name: "example", * ipConfigurations: [{ * name: "internal", * }], * }], * osDisk: { * storageAccountType: "Standard_LRS", * caching: "ReadWrite", * }, * }); * const exampleVirtualMachineScaleSetExtension = new azure.compute.VirtualMachineScaleSetExtension("example", { * name: "example", * virtualMachineScaleSetId: exampleLinuxVirtualMachineScaleSet.id, * publisher: "Microsoft.Azure.Extensions", * type: "CustomScript", * typeHandlerVersion: "2.0", * settings: JSON.stringify({ * commandToExecute: "echo $HOSTNAME", * }), * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Compute` - 2024-11-01, 2024-03-01 * * ## Import * * Virtual Machine Scale Set Extensions can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:compute/virtualMachineScaleSetExtension:VirtualMachineScaleSetExtension test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleSet1/extensions/extension1 * ``` */ export declare class VirtualMachineScaleSetExtension extends pulumi.CustomResource { /** * Get an existing VirtualMachineScaleSetExtension resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: VirtualMachineScaleSetExtensionState, opts?: pulumi.CustomResourceOptions): VirtualMachineScaleSetExtension; /** * Returns true if the given object is an instance of VirtualMachineScaleSetExtension. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is VirtualMachineScaleSetExtension; /** * 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`. */ readonly autoUpgradeMinorVersion: pulumi.Output; /** * Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? */ readonly automaticUpgradeEnabled: pulumi.Output; /** * 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 `failureSuppressionEnabled` value. */ readonly failureSuppressionEnabled: pulumi.Output; /** * 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. */ readonly forceUpdateTag: pulumi.Output; /** * The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. * * > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. */ readonly protectedSettings: pulumi.Output; /** * A `protectedSettingsFromKeyVault` block as defined below. * * > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` */ readonly protectedSettingsFromKeyVault: pulumi.Output; /** * An ordered list of Extension names which this should be provisioned after. */ readonly provisionAfterExtensions: pulumi.Output; /** * Specifies the Publisher of the Extension. Changing this forces a new resource to be created. */ readonly publisher: pulumi.Output; /** * A JSON String which specifies Settings for the Extension. * * > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. */ readonly settings: pulumi.Output; /** * Specifies the Type of the Extension. Changing this forces a new resource to be created. */ readonly type: pulumi.Output; /** * Specifies the version of the extension to use, available versions can be found using the Azure CLI. * * > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: * * ```shell * az vmss extension image list --location westus -o table * ``` */ readonly typeHandlerVersion: pulumi.Output; /** * The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. * * > **Note:** This should be the ID from the `azure.compute.LinuxVirtualMachineScaleSet` or `azure.compute.WindowsVirtualMachineScaleSet` resource - when using the older `azure.compute.ScaleSet` resource extensions should instead be defined inline. */ readonly virtualMachineScaleSetId: pulumi.Output; /** * Create a VirtualMachineScaleSetExtension resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: VirtualMachineScaleSetExtensionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VirtualMachineScaleSetExtension resources. */ export interface VirtualMachineScaleSetExtensionState { /** * 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`. */ autoUpgradeMinorVersion?: pulumi.Input; /** * Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? */ automaticUpgradeEnabled?: pulumi.Input; /** * 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 `failureSuppressionEnabled` value. */ failureSuppressionEnabled?: pulumi.Input; /** * 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. */ forceUpdateTag?: pulumi.Input; /** * The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. * * > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. */ protectedSettings?: pulumi.Input; /** * A `protectedSettingsFromKeyVault` block as defined below. * * > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` */ protectedSettingsFromKeyVault?: pulumi.Input; /** * An ordered list of Extension names which this should be provisioned after. */ provisionAfterExtensions?: pulumi.Input[]>; /** * Specifies the Publisher of the Extension. Changing this forces a new resource to be created. */ publisher?: pulumi.Input; /** * A JSON String which specifies Settings for the Extension. * * > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. */ settings?: pulumi.Input; /** * Specifies the Type of the Extension. Changing this forces a new resource to be created. */ type?: pulumi.Input; /** * Specifies the version of the extension to use, available versions can be found using the Azure CLI. * * > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: * * ```shell * az vmss extension image list --location westus -o table * ``` */ typeHandlerVersion?: pulumi.Input; /** * The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. * * > **Note:** This should be the ID from the `azure.compute.LinuxVirtualMachineScaleSet` or `azure.compute.WindowsVirtualMachineScaleSet` resource - when using the older `azure.compute.ScaleSet` resource extensions should instead be defined inline. */ virtualMachineScaleSetId?: pulumi.Input; } /** * The set of arguments for constructing a VirtualMachineScaleSetExtension resource. */ export interface VirtualMachineScaleSetExtensionArgs { /** * 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`. */ autoUpgradeMinorVersion?: pulumi.Input; /** * Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? */ automaticUpgradeEnabled?: pulumi.Input; /** * 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 `failureSuppressionEnabled` value. */ failureSuppressionEnabled?: pulumi.Input; /** * 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. */ forceUpdateTag?: pulumi.Input; /** * The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. * * > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. */ protectedSettings?: pulumi.Input; /** * A `protectedSettingsFromKeyVault` block as defined below. * * > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` */ protectedSettingsFromKeyVault?: pulumi.Input; /** * An ordered list of Extension names which this should be provisioned after. */ provisionAfterExtensions?: pulumi.Input[]>; /** * Specifies the Publisher of the Extension. Changing this forces a new resource to be created. */ publisher: pulumi.Input; /** * A JSON String which specifies Settings for the Extension. * * > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. */ settings?: pulumi.Input; /** * Specifies the Type of the Extension. Changing this forces a new resource to be created. */ type: pulumi.Input; /** * Specifies the version of the extension to use, available versions can be found using the Azure CLI. * * > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: * * ```shell * az vmss extension image list --location westus -o table * ``` */ typeHandlerVersion: pulumi.Input; /** * The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. * * > **Note:** This should be the ID from the `azure.compute.LinuxVirtualMachineScaleSet` or `azure.compute.WindowsVirtualMachineScaleSet` resource - when using the older `azure.compute.ScaleSet` resource extensions should instead be defined inline. */ virtualMachineScaleSetId: pulumi.Input; }