SharedImage

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/v3/go/azure/compute"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi/sdk/v2/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.Map{
                "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
    })
}
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={
        "publisher": "PublisherName",
        "offer": "OfferName",
        "sku": "ExampleSku",
    })
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",
    },
});

Create a SharedImage Resource

def SharedImage(resource_name, opts=None, description=None, eula=None, gallery_name=None, hyper_v_generation=None, identifier=None, location=None, name=None, os_type=None, privacy_statement_uri=None, release_note_uri=None, resource_group_name=None, tags=None, __props__=None);
func NewSharedImage(ctx *Context, name string, args SharedImageArgs, opts ...ResourceOption) (*SharedImage, error)
public SharedImage(string name, SharedImageArgs args, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

SharedImage Resource Properties

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

Inputs

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 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.

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.

ReleaseNoteUri string

The URI containing the Release Notes associated with this Shared Image.

Tags Dictionary<string, string>

A mapping of tags to assign to 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.

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.

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.

ReleaseNoteUri string

The URI containing the Release Notes associated with this Shared Image.

Tags map[string]string

A mapping of tags to assign to 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.

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.

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.

releaseNoteUri string

The URI containing the Release Notes associated with this Shared Image.

tags {[key: string]: string}

A mapping of tags to assign to 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.

identifier Dict[SharedImageIdentifier]

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.

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.

release_note_uri str

The URI containing the Release Notes associated with this Shared Image.

tags Dict[str, str]

A mapping of tags to assign to the Shared Image.

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 str
The provider-assigned unique ID for this managed resource.

Look up an 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
static get(resource_name, id, opts=None, description=None, eula=None, gallery_name=None, hyper_v_generation=None, identifier=None, location=None, name=None, os_type=None, privacy_statement_uri=None, release_note_uri=None, resource_group_name=None, tags=None, __props__=None);
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)
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.

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 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.

PrivacyStatementUri string

The URI containing the Privacy Statement associated with this Shared Image.

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.

Tags Dictionary<string, string>

A mapping of tags to assign to the Shared Image.

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.

PrivacyStatementUri string

The URI containing the Privacy Statement associated with this Shared Image.

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.

Tags map[string]string

A mapping of tags to assign to the Shared Image.

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.

privacyStatementUri string

The URI containing the Privacy Statement associated with this Shared Image.

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.

tags {[key: string]: string}

A mapping of tags to assign to the Shared Image.

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 Dict[SharedImageIdentifier]

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.

privacy_statement_uri str

The URI containing the Privacy Statement associated with this Shared Image.

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.

tags Dict[str, str]

A mapping of tags to assign to the Shared Image.

Supporting Types

SharedImageIdentifier

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.