pulumi_wasm_providers_azure_mini::compute

Module virtual_machine_scale_set_extension

source
Expand description

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

resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example
      location: West Europe
  exampleLinuxVirtualMachineScaleSet:
    type: azure:compute:LinuxVirtualMachineScaleSet
    name: example
    properties:
      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
  exampleVirtualMachineScaleSetExtension:
    type: azure:compute:VirtualMachineScaleSetExtension
    name: example
    properties:
      name: example
      virtualMachineScaleSetId: ${exampleLinuxVirtualMachineScaleSet.id}
      publisher: Microsoft.Azure.Extensions
      type: CustomScript
      typeHandlerVersion: '2.0'
      settings:
        fn::toJSON:
          commandToExecute: echo $HOSTNAME

§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

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments