1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. SharedImage

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Shared Image within a Shared Image Gallery.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleSharedImageGallery = new Azure.Compute.SharedImageGallery("exampleSharedImageGallery", new Azure.Compute.SharedImageGalleryArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                Description = "Shared images and things.",
                Tags = 
                {
                    { "Hello", "There" },
                    { "World", "Example" },
                },
            });
            var exampleSharedImage = new Azure.Compute.SharedImage("exampleSharedImage", new Azure.Compute.SharedImageArgs
            {
                GalleryName = exampleSharedImageGallery.Name,
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                OsType = "Linux",
                Identifier = new Azure.Compute.Inputs.SharedImageIdentifierArgs
                {
                    Publisher = "PublisherName",
                    Offer = "OfferName",
                    Sku = "ExampleSku",
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/compute"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSharedImageGallery, err := compute.NewSharedImageGallery(ctx, "exampleSharedImageGallery", &compute.SharedImageGalleryArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			Description:       pulumi.String("Shared images and things."),
    			Tags: pulumi.StringMap{
    				"Hello": pulumi.String("There"),
    				"World": pulumi.String("Example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewSharedImage(ctx, "exampleSharedImage", &compute.SharedImageArgs{
    			GalleryName:       exampleSharedImageGallery.Name,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			OsType:            pulumi.String("Linux"),
    			Identifier: &compute.SharedImageIdentifierArgs{
    				Publisher: pulumi.String("PublisherName"),
    				Offer:     pulumi.String("OfferName"),
    				Sku:       pulumi.String("ExampleSku"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleSharedImageGallery = new azure.compute.SharedImageGallery("exampleSharedImageGallery", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        description: "Shared images and things.",
        tags: {
            Hello: "There",
            World: "Example",
        },
    });
    const exampleSharedImage = new azure.compute.SharedImage("exampleSharedImage", {
        galleryName: exampleSharedImageGallery.name,
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        osType: "Linux",
        identifier: {
            publisher: "PublisherName",
            offer: "OfferName",
            sku: "ExampleSku",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_shared_image_gallery = azure.compute.SharedImageGallery("exampleSharedImageGallery",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        description="Shared images and things.",
        tags={
            "Hello": "There",
            "World": "Example",
        })
    example_shared_image = azure.compute.SharedImage("exampleSharedImage",
        gallery_name=example_shared_image_gallery.name,
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        os_type="Linux",
        identifier=azure.compute.SharedImageIdentifierArgs(
            publisher="PublisherName",
            offer="OfferName",
            sku="ExampleSku",
        ))
    

    Example coming soon!

    Create SharedImage Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SharedImage(name: string, args: SharedImageArgs, opts?: CustomResourceOptions);
    @overload
    def SharedImage(resource_name: str,
                    args: SharedImageArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def SharedImage(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    identifier: Optional[SharedImageIdentifierArgs] = None,
                    resource_group_name: Optional[str] = None,
                    gallery_name: Optional[str] = None,
                    os_type: Optional[str] = None,
                    name: Optional[str] = None,
                    location: Optional[str] = None,
                    description: Optional[str] = None,
                    hyper_v_generation: Optional[str] = None,
                    privacy_statement_uri: Optional[str] = None,
                    purchase_plan: Optional[SharedImagePurchasePlanArgs] = None,
                    release_note_uri: Optional[str] = None,
                    eula: Optional[str] = None,
                    specialized: Optional[bool] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    trusted_launch_enabled: Optional[bool] = None)
    func NewSharedImage(ctx *Context, name string, args SharedImageArgs, opts ...ResourceOption) (*SharedImage, error)
    public SharedImage(string name, SharedImageArgs args, CustomResourceOptions? opts = null)
    public SharedImage(String name, SharedImageArgs args)
    public SharedImage(String name, SharedImageArgs args, CustomResourceOptions options)
    
    type: azure:compute:SharedImage
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SharedImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SharedImageArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SharedImageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SharedImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SharedImageArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var sharedImageResource = new Azure.Compute.SharedImage("sharedImageResource", new()
    {
        Identifier = new Azure.Compute.Inputs.SharedImageIdentifierArgs
        {
            Offer = "string",
            Publisher = "string",
            Sku = "string",
        },
        ResourceGroupName = "string",
        GalleryName = "string",
        OsType = "string",
        Name = "string",
        Location = "string",
        Description = "string",
        HyperVGeneration = "string",
        PrivacyStatementUri = "string",
        PurchasePlan = new Azure.Compute.Inputs.SharedImagePurchasePlanArgs
        {
            Name = "string",
            Product = "string",
            Publisher = "string",
        },
        ReleaseNoteUri = "string",
        Eula = "string",
        Specialized = false,
        Tags = 
        {
            { "string", "string" },
        },
        TrustedLaunchEnabled = false,
    });
    
    example, err := compute.NewSharedImage(ctx, "sharedImageResource", &compute.SharedImageArgs{
    	Identifier: &compute.SharedImageIdentifierArgs{
    		Offer:     pulumi.String("string"),
    		Publisher: pulumi.String("string"),
    		Sku:       pulumi.String("string"),
    	},
    	ResourceGroupName:   pulumi.String("string"),
    	GalleryName:         pulumi.String("string"),
    	OsType:              pulumi.String("string"),
    	Name:                pulumi.String("string"),
    	Location:            pulumi.String("string"),
    	Description:         pulumi.String("string"),
    	HyperVGeneration:    pulumi.String("string"),
    	PrivacyStatementUri: pulumi.String("string"),
    	PurchasePlan: &compute.SharedImagePurchasePlanArgs{
    		Name:      pulumi.String("string"),
    		Product:   pulumi.String("string"),
    		Publisher: pulumi.String("string"),
    	},
    	ReleaseNoteUri: pulumi.String("string"),
    	Eula:           pulumi.String("string"),
    	Specialized:    pulumi.Bool(false),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TrustedLaunchEnabled: pulumi.Bool(false),
    })
    
    var sharedImageResource = new SharedImage("sharedImageResource", SharedImageArgs.builder()
        .identifier(SharedImageIdentifierArgs.builder()
            .offer("string")
            .publisher("string")
            .sku("string")
            .build())
        .resourceGroupName("string")
        .galleryName("string")
        .osType("string")
        .name("string")
        .location("string")
        .description("string")
        .hyperVGeneration("string")
        .privacyStatementUri("string")
        .purchasePlan(SharedImagePurchasePlanArgs.builder()
            .name("string")
            .product("string")
            .publisher("string")
            .build())
        .releaseNoteUri("string")
        .eula("string")
        .specialized(false)
        .tags(Map.of("string", "string"))
        .trustedLaunchEnabled(false)
        .build());
    
    shared_image_resource = azure.compute.SharedImage("sharedImageResource",
        identifier={
            "offer": "string",
            "publisher": "string",
            "sku": "string",
        },
        resource_group_name="string",
        gallery_name="string",
        os_type="string",
        name="string",
        location="string",
        description="string",
        hyper_v_generation="string",
        privacy_statement_uri="string",
        purchase_plan={
            "name": "string",
            "product": "string",
            "publisher": "string",
        },
        release_note_uri="string",
        eula="string",
        specialized=False,
        tags={
            "string": "string",
        },
        trusted_launch_enabled=False)
    
    const sharedImageResource = new azure.compute.SharedImage("sharedImageResource", {
        identifier: {
            offer: "string",
            publisher: "string",
            sku: "string",
        },
        resourceGroupName: "string",
        galleryName: "string",
        osType: "string",
        name: "string",
        location: "string",
        description: "string",
        hyperVGeneration: "string",
        privacyStatementUri: "string",
        purchasePlan: {
            name: "string",
            product: "string",
            publisher: "string",
        },
        releaseNoteUri: "string",
        eula: "string",
        specialized: false,
        tags: {
            string: "string",
        },
        trustedLaunchEnabled: false,
    });
    
    type: azure:compute:SharedImage
    properties:
        description: string
        eula: string
        galleryName: string
        hyperVGeneration: string
        identifier:
            offer: string
            publisher: string
            sku: string
        location: string
        name: string
        osType: string
        privacyStatementUri: string
        purchasePlan:
            name: string
            product: string
            publisher: string
        releaseNoteUri: string
        resourceGroupName: string
        specialized: false
        tags:
            string: string
        trustedLaunchEnabled: false
    

    SharedImage Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SharedImage resource accepts the following input properties:

    GalleryName string
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    Identifier SharedImageIdentifier
    An identifier block as defined below.
    OsType string
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    Description string
    A description of this Shared Image.
    Eula string
    The End User Licence Agreement for the Shared Image.
    HyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    PrivacyStatementUri string
    The URI containing the Privacy Statement associated with this Shared Image.
    PurchasePlan SharedImagePurchasePlan
    A purchase_plan block as defined below.
    ReleaseNoteUri string
    The URI containing the Release Notes associated with this Shared Image.
    Specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the Shared Image.
    TrustedLaunchEnabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    GalleryName string
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    Identifier SharedImageIdentifierArgs
    An identifier block as defined below.
    OsType string
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    Description string
    A description of this Shared Image.
    Eula string
    The End User Licence Agreement for the Shared Image.
    HyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    PrivacyStatementUri string
    The URI containing the Privacy Statement associated with this Shared Image.
    PurchasePlan SharedImagePurchasePlanArgs
    A purchase_plan block as defined below.
    ReleaseNoteUri string
    The URI containing the Release Notes associated with this Shared Image.
    Specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the Shared Image.
    TrustedLaunchEnabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    galleryName String
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    identifier SharedImageIdentifier
    An identifier block as defined below.
    osType String
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    description String
    A description of this Shared Image.
    eula String
    The End User Licence Agreement for the Shared Image.
    hyperVGeneration String
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    privacyStatementUri String
    The URI containing the Privacy Statement associated with this Shared Image.
    purchasePlan SharedImagePurchasePlan
    A purchase_plan block as defined below.
    releaseNoteUri String
    The URI containing the Release Notes associated with this Shared Image.
    specialized Boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the Shared Image.
    trustedLaunchEnabled Boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    galleryName string
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    identifier SharedImageIdentifier
    An identifier block as defined below.
    osType string
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    description string
    A description of this Shared Image.
    eula string
    The End User Licence Agreement for the Shared Image.
    hyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    location string
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    privacyStatementUri string
    The URI containing the Privacy Statement associated with this Shared Image.
    purchasePlan SharedImagePurchasePlan
    A purchase_plan block as defined below.
    releaseNoteUri string
    The URI containing the Release Notes associated with this Shared Image.
    specialized boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the Shared Image.
    trustedLaunchEnabled boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    gallery_name str
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    identifier SharedImageIdentifierArgs
    An identifier block as defined below.
    os_type str
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    description str
    A description of this Shared Image.
    eula str
    The End User Licence Agreement for the Shared Image.
    hyper_v_generation str
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    location str
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    privacy_statement_uri str
    The URI containing the Privacy Statement associated with this Shared Image.
    purchase_plan SharedImagePurchasePlanArgs
    A purchase_plan block as defined below.
    release_note_uri str
    The URI containing the Release Notes associated with this Shared Image.
    specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the Shared Image.
    trusted_launch_enabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    galleryName String
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    identifier Property Map
    An identifier block as defined below.
    osType String
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    description String
    A description of this Shared Image.
    eula String
    The End User Licence Agreement for the Shared Image.
    hyperVGeneration String
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    privacyStatementUri String
    The URI containing the Privacy Statement associated with this Shared Image.
    purchasePlan Property Map
    A purchase_plan block as defined below.
    releaseNoteUri String
    The URI containing the Release Notes associated with this Shared Image.
    specialized Boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the Shared Image.
    trustedLaunchEnabled Boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SharedImage resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SharedImage Resource

    Get an existing SharedImage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SharedImageState, opts?: CustomResourceOptions): SharedImage
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            eula: Optional[str] = None,
            gallery_name: Optional[str] = None,
            hyper_v_generation: Optional[str] = None,
            identifier: Optional[SharedImageIdentifierArgs] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            os_type: Optional[str] = None,
            privacy_statement_uri: Optional[str] = None,
            purchase_plan: Optional[SharedImagePurchasePlanArgs] = None,
            release_note_uri: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            specialized: Optional[bool] = None,
            tags: Optional[Mapping[str, str]] = None,
            trusted_launch_enabled: Optional[bool] = None) -> SharedImage
    func GetSharedImage(ctx *Context, name string, id IDInput, state *SharedImageState, opts ...ResourceOption) (*SharedImage, error)
    public static SharedImage Get(string name, Input<string> id, SharedImageState? state, CustomResourceOptions? opts = null)
    public static SharedImage get(String name, Output<String> id, SharedImageState state, CustomResourceOptions options)
    resources:  _:    type: azure:compute:SharedImage    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    A description of this Shared Image.
    Eula string
    The End User Licence Agreement for the Shared Image.
    GalleryName string
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    HyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    Identifier SharedImageIdentifier
    An identifier block as defined below.
    Location string
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    OsType string
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    PrivacyStatementUri string
    The URI containing the Privacy Statement associated with this Shared Image.
    PurchasePlan SharedImagePurchasePlan
    A purchase_plan block as defined below.
    ReleaseNoteUri string
    The URI containing the Release Notes associated with this Shared Image.
    ResourceGroupName string
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    Specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the Shared Image.
    TrustedLaunchEnabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    Description string
    A description of this Shared Image.
    Eula string
    The End User Licence Agreement for the Shared Image.
    GalleryName string
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    HyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    Identifier SharedImageIdentifierArgs
    An identifier block as defined below.
    Location string
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    OsType string
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    PrivacyStatementUri string
    The URI containing the Privacy Statement associated with this Shared Image.
    PurchasePlan SharedImagePurchasePlanArgs
    A purchase_plan block as defined below.
    ReleaseNoteUri string
    The URI containing the Release Notes associated with this Shared Image.
    ResourceGroupName string
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    Specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the Shared Image.
    TrustedLaunchEnabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    description String
    A description of this Shared Image.
    eula String
    The End User Licence Agreement for the Shared Image.
    galleryName String
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    hyperVGeneration String
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    identifier SharedImageIdentifier
    An identifier block as defined below.
    location String
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    osType String
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    privacyStatementUri String
    The URI containing the Privacy Statement associated with this Shared Image.
    purchasePlan SharedImagePurchasePlan
    A purchase_plan block as defined below.
    releaseNoteUri String
    The URI containing the Release Notes associated with this Shared Image.
    resourceGroupName String
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    specialized Boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the Shared Image.
    trustedLaunchEnabled Boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    description string
    A description of this Shared Image.
    eula string
    The End User Licence Agreement for the Shared Image.
    galleryName string
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    hyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    identifier SharedImageIdentifier
    An identifier block as defined below.
    location string
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    osType string
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    privacyStatementUri string
    The URI containing the Privacy Statement associated with this Shared Image.
    purchasePlan SharedImagePurchasePlan
    A purchase_plan block as defined below.
    releaseNoteUri string
    The URI containing the Release Notes associated with this Shared Image.
    resourceGroupName string
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    specialized boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the Shared Image.
    trustedLaunchEnabled boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    description str
    A description of this Shared Image.
    eula str
    The End User Licence Agreement for the Shared Image.
    gallery_name str
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    hyper_v_generation str
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    identifier SharedImageIdentifierArgs
    An identifier block as defined below.
    location str
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    os_type str
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    privacy_statement_uri str
    The URI containing the Privacy Statement associated with this Shared Image.
    purchase_plan SharedImagePurchasePlanArgs
    A purchase_plan block as defined below.
    release_note_uri str
    The URI containing the Release Notes associated with this Shared Image.
    resource_group_name str
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the Shared Image.
    trusted_launch_enabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.
    description String
    A description of this Shared Image.
    eula String
    The End User Licence Agreement for the Shared Image.
    galleryName String
    Specifies the name of the Shared Image Gallery in which this Shared Image should exist. Changing this forces a new resource to be created.
    hyperVGeneration String
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are V1 and V2. Defaults to V1. Changing this forces a new resource to be created.
    identifier Property Map
    An identifier block as defined below.
    location String
    Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Shared Image. Changing this forces a new resource to be created.
    osType String
    The type of Operating System present in this Shared Image. Possible values are Linux and Windows. Changing this forces a new resource to be created.
    privacyStatementUri String
    The URI containing the Privacy Statement associated with this Shared Image.
    purchasePlan Property Map
    A purchase_plan block as defined below.
    releaseNoteUri String
    The URI containing the Release Notes associated with this Shared Image.
    resourceGroupName String
    The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
    specialized Boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Defaults to false. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the Shared Image.
    trustedLaunchEnabled Boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Defaults to false. Changing this forces a new resource to be created.

    Supporting Types

    SharedImageIdentifier, SharedImageIdentifierArgs

    Offer string
    The Offer Name for this Shared Image.
    Publisher string
    The Publisher Name for this Gallery Image.
    Sku string
    The Name of the SKU for this Gallery Image.
    Offer string
    The Offer Name for this Shared Image.
    Publisher string
    The Publisher Name for this Gallery Image.
    Sku string
    The Name of the SKU for this Gallery Image.
    offer String
    The Offer Name for this Shared Image.
    publisher String
    The Publisher Name for this Gallery Image.
    sku String
    The Name of the SKU for this Gallery Image.
    offer string
    The Offer Name for this Shared Image.
    publisher string
    The Publisher Name for this Gallery Image.
    sku string
    The Name of the SKU for this Gallery Image.
    offer str
    The Offer Name for this Shared Image.
    publisher str
    The Publisher Name for this Gallery Image.
    sku str
    The Name of the SKU for this Gallery Image.
    offer String
    The Offer Name for this Shared Image.
    publisher String
    The Publisher Name for this Gallery Image.
    sku String
    The Name of the SKU for this Gallery Image.

    SharedImagePurchasePlan, SharedImagePurchasePlanArgs

    Name string
    The Purchase Plan Name for this Shared Image. Changing this forces a new resource to be created.
    Product string
    The Purchase Plan Product for this Gallery Image. Changing this forces a new resource to be created.
    Publisher string
    The Purchase Plan Publisher for this Gallery Image. Changing this forces a new resource to be created.
    Name string
    The Purchase Plan Name for this Shared Image. Changing this forces a new resource to be created.
    Product string
    The Purchase Plan Product for this Gallery Image. Changing this forces a new resource to be created.
    Publisher string
    The Purchase Plan Publisher for this Gallery Image. Changing this forces a new resource to be created.
    name String
    The Purchase Plan Name for this Shared Image. Changing this forces a new resource to be created.
    product String
    The Purchase Plan Product for this Gallery Image. Changing this forces a new resource to be created.
    publisher String
    The Purchase Plan Publisher for this Gallery Image. Changing this forces a new resource to be created.
    name string
    The Purchase Plan Name for this Shared Image. Changing this forces a new resource to be created.
    product string
    The Purchase Plan Product for this Gallery Image. Changing this forces a new resource to be created.
    publisher string
    The Purchase Plan Publisher for this Gallery Image. Changing this forces a new resource to be created.
    name str
    The Purchase Plan Name for this Shared Image. Changing this forces a new resource to be created.
    product str
    The Purchase Plan Product for this Gallery Image. Changing this forces a new resource to be created.
    publisher str
    The Purchase Plan Publisher for this Gallery Image. Changing this forces a new resource to be created.
    name String
    The Purchase Plan Name for this Shared Image. Changing this forces a new resource to be created.
    product String
    The Purchase Plan Product for this Gallery Image. Changing this forces a new resource to be created.
    publisher String
    The Purchase Plan Publisher for this Gallery Image. Changing this forces a new resource to be created.

    Import

    Shared Images can be imported using the resource id, e.g.

     $ pulumi import azure:compute/sharedImage:SharedImage image1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/images/image1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.