SharedImage

class SharedImage : KotlinCustomResource

Manages a Shared Image within a Shared Image Gallery.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleSharedImageGallery = new azure.compute.SharedImageGallery("example", {
name: "example_image_gallery",
resourceGroupName: example.name,
location: example.location,
description: "Shared images and things.",
tags: {
Hello: "There",
World: "Example",
},
});
const exampleSharedImage = new azure.compute.SharedImage("example", {
name: "my-image",
galleryName: exampleSharedImageGallery.name,
resourceGroupName: example.name,
location: example.location,
osType: "Linux",
identifier: {
publisher: "PublisherName",
offer: "OfferName",
sku: "ExampleSku",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_shared_image_gallery = azure.compute.SharedImageGallery("example",
name="example_image_gallery",
resource_group_name=example.name,
location=example.location,
description="Shared images and things.",
tags={
"Hello": "There",
"World": "Example",
})
example_shared_image = azure.compute.SharedImage("example",
name="my-image",
gallery_name=example_shared_image_gallery.name,
resource_group_name=example.name,
location=example.location,
os_type="Linux",
identifier={
"publisher": "PublisherName",
"offer": "OfferName",
"sku": "ExampleSku",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleSharedImageGallery = new Azure.Compute.SharedImageGallery("example", new()
{
Name = "example_image_gallery",
ResourceGroupName = example.Name,
Location = example.Location,
Description = "Shared images and things.",
Tags =
{
{ "Hello", "There" },
{ "World", "Example" },
},
});
var exampleSharedImage = new Azure.Compute.SharedImage("example", new()
{
Name = "my-image",
GalleryName = exampleSharedImageGallery.Name,
ResourceGroupName = example.Name,
Location = example.Location,
OsType = "Linux",
Identifier = new Azure.Compute.Inputs.SharedImageIdentifierArgs
{
Publisher = "PublisherName",
Offer = "OfferName",
Sku = "ExampleSku",
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleSharedImageGallery, err := compute.NewSharedImageGallery(ctx, "example", &compute.SharedImageGalleryArgs{
Name: pulumi.String("example_image_gallery"),
ResourceGroupName: example.Name,
Location: example.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, "example", &compute.SharedImageArgs{
Name: pulumi.String("my-image"),
GalleryName: exampleSharedImageGallery.Name,
ResourceGroupName: example.Name,
Location: example.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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.compute.SharedImageGallery;
import com.pulumi.azure.compute.SharedImageGalleryArgs;
import com.pulumi.azure.compute.SharedImage;
import com.pulumi.azure.compute.SharedImageArgs;
import com.pulumi.azure.compute.inputs.SharedImageIdentifierArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleSharedImageGallery = new SharedImageGallery("exampleSharedImageGallery", SharedImageGalleryArgs.builder()
.name("example_image_gallery")
.resourceGroupName(example.name())
.location(example.location())
.description("Shared images and things.")
.tags(Map.ofEntries(
Map.entry("Hello", "There"),
Map.entry("World", "Example")
))
.build());
var exampleSharedImage = new SharedImage("exampleSharedImage", SharedImageArgs.builder()
.name("my-image")
.galleryName(exampleSharedImageGallery.name())
.resourceGroupName(example.name())
.location(example.location())
.osType("Linux")
.identifier(SharedImageIdentifierArgs.builder()
.publisher("PublisherName")
.offer("OfferName")
.sku("ExampleSku")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleSharedImageGallery:
type: azure:compute:SharedImageGallery
name: example
properties:
name: example_image_gallery
resourceGroupName: ${example.name}
location: ${example.location}
description: Shared images and things.
tags:
Hello: There
World: Example
exampleSharedImage:
type: azure:compute:SharedImage
name: example
properties:
name: my-image
galleryName: ${exampleSharedImageGallery.name}
resourceGroupName: ${example.name}
location: ${example.location}
osType: Linux
identifier:
publisher: PublisherName
offer: OfferName
sku: ExampleSku

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

Properties

Link copied to clipboard

Specifies if the Shared Image supports Accelerated Network. Changing this forces a new resource to be created.

Link copied to clipboard
val architecture: Output<String>?

CPU architecture supported by an OS. Possible values are x64 and Arm64. Defaults to x64. Changing this forces a new resource to be created.

Link copied to clipboard

Specifies if Confidential Virtual Machines enabled. It will enable all the features of trusted, with higher confidentiality features for isolate machines or encrypted data. Available for Gen2 machines. Changing this forces a new resource to be created.

Link copied to clipboard

Specifies if supports creation of both Confidential virtual machines and Gen2 virtual machines with standard security from a compatible Gen2 OS disk VHD or Gen2 Managed image. Changing this forces a new resource to be created.

Link copied to clipboard
val description: Output<String>?

A description of this Shared Image.

Link copied to clipboard

Specifies if the Shared Image supports NVMe disks. Changing this forces a new resource to be created.

Link copied to clipboard

One or more Disk Types not allowed for the Image. Possible values include Standard_LRS and Premium_LRS.

Link copied to clipboard
val endOfLifeDate: Output<String>?

The end of life date in RFC3339 format of the Image.

Link copied to clipboard
val eula: Output<String>?

The End User Licence Agreement for the Shared Image. Changing this forces a new resource to be created.

Link copied to clipboard
val galleryName: Output<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.

Link copied to clipboard

Specifies if the Shared Image supports hibernation. Changing this forces a new resource to be created.

Link copied to clipboard
val hyperVGeneration: Output<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.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

An identifier block as defined below.

Link copied to clipboard
val location: Output<String>

Specifies the supported Azure location where the Shared Image Gallery exists. Changing this forces a new resource to be created.

Link copied to clipboard

Maximum memory in GB recommended for the Image.

Link copied to clipboard

Maximum count of vCPUs recommended for the Image.

Link copied to clipboard

Minimum memory in GB recommended for the Image.

Link copied to clipboard

Minimum count of vCPUs recommended for the Image.

Link copied to clipboard
val name: Output<String>

Specifies the name of the Shared Image. Changing this forces a new resource to be created.

Link copied to clipboard
val osType: Output<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.

Link copied to clipboard

The URI containing the Privacy Statement associated with this Shared Image. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A purchase_plan block as defined below.

Link copied to clipboard
val releaseNoteUri: Output<String>?

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

Link copied to clipboard

The name of the resource group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.

Link copied to clipboard
val specialized: Output<Boolean>?

Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run). Changing this forces a new resource to be created. !>Note: It's recommended to Generalize images where possible - Specialized Images reuse the same UUID internally within each Virtual Machine, which can have unintended side-effects.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A mapping of tags to assign to the Shared Image.

Link copied to clipboard

Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Changing this forces a new resource to be created.

Link copied to clipboard

Specifies if supports creation of both Trusted Launch virtual machines and Gen2 virtual machines with standard security created from the Shared Image. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>