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
new SharedImage(name: string, args: SharedImageArgs, opts?: CustomResourceOptions);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:
- Gallery
Name 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
Shared
Image Identifier Args An
identifierblock as defined below.- Os
Type string The type of Operating System present in this Shared Image. Possible values are
LinuxandWindows.- Resource
Group stringName 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.
- Hyper
VGeneration string The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are
V1andV2. Defaults toV1. 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.
- Privacy
Statement stringUri The URI containing the Privacy Statement associated with this Shared Image.
- Release
Note stringUri The URI containing the Release Notes associated with this Shared Image.
- Dictionary<string, string>
A mapping of tags to assign to the Shared Image.
- Gallery
Name 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
Shared
Image Identifier An
identifierblock as defined below.- Os
Type string The type of Operating System present in this Shared Image. Possible values are
LinuxandWindows.- Resource
Group stringName 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.
- Hyper
VGeneration string The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are
V1andV2. Defaults toV1. 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.
- Privacy
Statement stringUri The URI containing the Privacy Statement associated with this Shared Image.
- Release
Note stringUri The URI containing the Release Notes associated with this Shared Image.
- map[string]string
A mapping of tags to assign to the Shared Image.
- gallery
Name 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
Shared
Image Identifier An
identifierblock as defined below.- os
Type string The type of Operating System present in this Shared Image. Possible values are
LinuxandWindows.- resource
Group stringName 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.
- hyper
VGeneration string The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are
V1andV2. Defaults toV1. 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.
- privacy
Statement stringUri The URI containing the Privacy Statement associated with this Shared Image.
- release
Note stringUri The URI containing the Release Notes associated with this Shared Image.
- {[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[Shared
Image Identifier] An
identifierblock as defined below.- os_
type str The type of Operating System present in this Shared Image. Possible values are
LinuxandWindows.- resource_
group_ strname 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_ strgeneration The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are
V1andV2. Defaults toV1. 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_ struri The URI containing the Privacy Statement associated with this Shared Image.
- release_
note_ struri The URI containing the Release Notes associated with this Shared Image.
- 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:
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): SharedImagestatic 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.
- Gallery
Name 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.
- Hyper
VGeneration string The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are
V1andV2. Defaults toV1. Changing this forces a new resource to be created.- Identifier
Shared
Image Identifier Args An
identifierblock 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.
- Os
Type string The type of Operating System present in this Shared Image. Possible values are
LinuxandWindows.- Privacy
Statement stringUri The URI containing the Privacy Statement associated with this Shared Image.
- Release
Note stringUri The URI containing the Release Notes associated with this Shared Image.
- Resource
Group stringName The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
- 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.
- Gallery
Name 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.
- Hyper
VGeneration string The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are
V1andV2. Defaults toV1. Changing this forces a new resource to be created.- Identifier
Shared
Image Identifier An
identifierblock 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.
- Os
Type string The type of Operating System present in this Shared Image. Possible values are
LinuxandWindows.- Privacy
Statement stringUri The URI containing the Privacy Statement associated with this Shared Image.
- Release
Note stringUri The URI containing the Release Notes associated with this Shared Image.
- Resource
Group stringName The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
- 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.
- gallery
Name 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.
- hyper
VGeneration string The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are
V1andV2. Defaults toV1. Changing this forces a new resource to be created.- identifier
Shared
Image Identifier An
identifierblock 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.
- os
Type string The type of Operating System present in this Shared Image. Possible values are
LinuxandWindows.- privacy
Statement stringUri The URI containing the Privacy Statement associated with this Shared Image.
- release
Note stringUri The URI containing the Release Notes associated with this Shared Image.
- resource
Group stringName The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
- {[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_ strgeneration The generation of HyperV that the Virtual Machine used to create the Shared Image is based on. Possible values are
V1andV2. Defaults toV1. Changing this forces a new resource to be created.- identifier
Dict[Shared
Image Identifier] An
identifierblock 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
LinuxandWindows.- privacy_
statement_ struri The URI containing the Privacy Statement associated with this Shared Image.
- release_
note_ struri The URI containing the Release Notes associated with this Shared Image.
- resource_
group_ strname The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assign to the Shared Image.
Supporting Types
SharedImageIdentifier
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.