pulumi_wasm_providers_azure_mini::compute

Module gallery_application_assignment

source
Expand description

Manages a Virtual Machine Gallery Application Assignment.

Note: Gallery Application Assignments can be defined either directly on azure.compute.LinuxVirtualMachine and azure.compute.WindowsVirtualMachine resources, or using the azure.compute.GalleryApplicationAssignment resource - but the two approaches cannot be used together. If both are used with the same Virtual Machine, spurious changes will occur. It’s recommended to use ignore_changes for the gallery_application block on the associated virtual machine resources, to avoid a persistent diff when using this resource.

§Example Usage

resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    name: example
    properties:
      name: example-resources
      location: West Europe
  exampleSharedImageGallery:
    type: azure:compute:SharedImageGallery
    name: example
    properties:
      name: examplegallery
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
  exampleGalleryApplication:
    type: azure:compute:GalleryApplication
    name: example
    properties:
      name: example-app
      galleryId: ${exampleSharedImageGallery.id}
      location: ${exampleResourceGroup.location}
      supportedOsType: Linux
  exampleAccount:
    type: azure:storage:Account
    name: example
    properties:
      name: examplestorage
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountReplicationType: LRS
  exampleContainer:
    type: azure:storage:Container
    name: example
    properties:
      name: example-container
      storageAccountName: ${exampleAccount.name}
      containerAccessType: blob
  exampleBlob:
    type: azure:storage:Blob
    name: example
    properties:
      name: scripts
      storageAccountName: ${exampleAccount.name}
      storageContainerName: ${exampleContainer.name}
      type: Block
      sourceContent: '[scripts file content]'
  exampleGalleryApplicationVersion:
    type: azure:compute:GalleryApplicationVersion
    name: example
    properties:
      name: 0.0.1
      galleryApplicationId: ${exampleGalleryApplication.id}
      location: ${exampleGalleryApplication.location}
      manageAction:
        install: '[install command]'
        remove: '[remove command]'
      source:
        mediaLink: ${exampleBlob.id}
      targetRegions:
        - name: ${exampleGalleryApplication.location}
          regionalReplicaCount: 1
  exampleGalleryApplicationAssignment:
    type: azure:compute:GalleryApplicationAssignment
    name: example
    properties:
      galleryApplicationVersionId: ${exampleGalleryApplicationVersion.id}
      virtualMachineId: ${example.id}
variables:
  example:
    fn::invoke:
      function: azure:compute:getVirtualMachine
      arguments:
        name: example-vm
        resourceGroupName: example-resources-vm

§Import

Virtual Machine Gallery Application Assignments can be imported using the resource id, e.g.

$ pulumi import azure:compute/galleryApplicationAssignment:GalleryApplicationAssignment example subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachines/machine1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/galleries/gallery1/applications/galleryApplication1/versions/galleryApplicationVersion1

Structs§

Functions§

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