SharedImageVersionArgs

data class SharedImageVersionArgs(val blobUri: Output<String>? = null, val deletionOfReplicatedLocationsEnabled: Output<Boolean>? = null, val endOfLifeDate: Output<String>? = null, val excludeFromLatest: Output<Boolean>? = null, val galleryName: Output<String>? = null, val imageName: Output<String>? = null, val location: Output<String>? = null, val managedImageId: Output<String>? = null, val name: Output<String>? = null, val osDiskSnapshotId: Output<String>? = null, val replicationMode: Output<String>? = null, val resourceGroupName: Output<String>? = null, val storageAccountId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val targetRegions: Output<List<SharedImageVersionTargetRegionArgs>>? = null) : ConvertibleToJava<SharedImageVersionArgs>

Manages a Version of a Shared Image within a Shared Image Gallery.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const existing = azure.compute.getImage({
name: "search-api",
resourceGroupName: "packerimages",
});
const existingGetSharedImage = azure.compute.getSharedImage({
name: "existing-image",
galleryName: "existing_gallery",
resourceGroupName: "existing-resources",
});
const example = new azure.compute.SharedImageVersion("example", {
name: "0.0.1",
galleryName: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.galleryName),
imageName: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.name),
resourceGroupName: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.resourceGroupName),
location: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.location),
managedImageId: existing.then(existing => existing.id),
targetRegions: [{
name: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.location),
regionalReplicaCount: 5,
storageAccountType: "Standard_LRS",
}],
});
import pulumi
import pulumi_azure as azure
existing = azure.compute.get_image(name="search-api",
resource_group_name="packerimages")
existing_get_shared_image = azure.compute.get_shared_image(name="existing-image",
gallery_name="existing_gallery",
resource_group_name="existing-resources")
example = azure.compute.SharedImageVersion("example",
name="0.0.1",
gallery_name=existing_get_shared_image.gallery_name,
image_name=existing_get_shared_image.name,
resource_group_name=existing_get_shared_image.resource_group_name,
location=existing_get_shared_image.location,
managed_image_id=existing.id,
target_regions=[{
"name": existing_get_shared_image.location,
"regional_replica_count": 5,
"storage_account_type": "Standard_LRS",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var existing = Azure.Compute.GetImage.Invoke(new()
{
Name = "search-api",
ResourceGroupName = "packerimages",
});
var existingGetSharedImage = Azure.Compute.GetSharedImage.Invoke(new()
{
Name = "existing-image",
GalleryName = "existing_gallery",
ResourceGroupName = "existing-resources",
});
var example = new Azure.Compute.SharedImageVersion("example", new()
{
Name = "0.0.1",
GalleryName = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.GalleryName),
ImageName = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.Name),
ResourceGroupName = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.ResourceGroupName),
Location = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.Location),
ManagedImageId = existing.Apply(getImageResult => getImageResult.Id),
TargetRegions = new[]
{
new Azure.Compute.Inputs.SharedImageVersionTargetRegionArgs
{
Name = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.Location),
RegionalReplicaCount = 5,
StorageAccountType = "Standard_LRS",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
existing, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
Name: pulumi.StringRef("search-api"),
ResourceGroupName: "packerimages",
}, nil)
if err != nil {
return err
}
existingGetSharedImage, err := compute.LookupSharedImage(ctx, &compute.LookupSharedImageArgs{
Name: "existing-image",
GalleryName: "existing_gallery",
ResourceGroupName: "existing-resources",
}, nil)
if err != nil {
return err
}
_, err = compute.NewSharedImageVersion(ctx, "example", &compute.SharedImageVersionArgs{
Name: pulumi.String("0.0.1"),
GalleryName: pulumi.String(existingGetSharedImage.GalleryName),
ImageName: pulumi.String(existingGetSharedImage.Name),
ResourceGroupName: pulumi.String(existingGetSharedImage.ResourceGroupName),
Location: pulumi.String(existingGetSharedImage.Location),
ManagedImageId: pulumi.String(existing.Id),
TargetRegions: compute.SharedImageVersionTargetRegionArray{
&compute.SharedImageVersionTargetRegionArgs{
Name: pulumi.String(existingGetSharedImage.Location),
RegionalReplicaCount: pulumi.Int(5),
StorageAccountType: pulumi.String("Standard_LRS"),
},
},
})
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.compute.ComputeFunctions;
import com.pulumi.azure.compute.inputs.GetImageArgs;
import com.pulumi.azure.compute.inputs.GetSharedImageArgs;
import com.pulumi.azure.compute.SharedImageVersion;
import com.pulumi.azure.compute.SharedImageVersionArgs;
import com.pulumi.azure.compute.inputs.SharedImageVersionTargetRegionArgs;
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) {
final var existing = ComputeFunctions.getImage(GetImageArgs.builder()
.name("search-api")
.resourceGroupName("packerimages")
.build());
final var existingGetSharedImage = ComputeFunctions.getSharedImage(GetSharedImageArgs.builder()
.name("existing-image")
.galleryName("existing_gallery")
.resourceGroupName("existing-resources")
.build());
var example = new SharedImageVersion("example", SharedImageVersionArgs.builder()
.name("0.0.1")
.galleryName(existingGetSharedImage.galleryName())
.imageName(existingGetSharedImage.name())
.resourceGroupName(existingGetSharedImage.resourceGroupName())
.location(existingGetSharedImage.location())
.managedImageId(existing.id())
.targetRegions(SharedImageVersionTargetRegionArgs.builder()
.name(existingGetSharedImage.location())
.regionalReplicaCount(5)
.storageAccountType("Standard_LRS")
.build())
.build());
}
}
resources:
example:
type: azure:compute:SharedImageVersion
properties:
name: 0.0.1
galleryName: ${existingGetSharedImage.galleryName}
imageName: ${existingGetSharedImage.name}
resourceGroupName: ${existingGetSharedImage.resourceGroupName}
location: ${existingGetSharedImage.location}
managedImageId: ${existing.id}
targetRegions:
- name: ${existingGetSharedImage.location}
regionalReplicaCount: 5
storageAccountType: Standard_LRS
variables:
existing:
fn::invoke:
function: azure:compute:getImage
arguments:
name: search-api
resourceGroupName: packerimages
existingGetSharedImage:
fn::invoke:
function: azure:compute:getSharedImage
arguments:
name: existing-image
galleryName: existing_gallery
resourceGroupName: existing-resources

Import

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

$ pulumi import azure:compute/sharedImageVersion:SharedImageVersion version /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/images/image1/versions/1.2.3

Constructors

Link copied to clipboard
constructor(blobUri: Output<String>? = null, deletionOfReplicatedLocationsEnabled: Output<Boolean>? = null, endOfLifeDate: Output<String>? = null, excludeFromLatest: Output<Boolean>? = null, galleryName: Output<String>? = null, imageName: Output<String>? = null, location: Output<String>? = null, managedImageId: Output<String>? = null, name: Output<String>? = null, osDiskSnapshotId: Output<String>? = null, replicationMode: Output<String>? = null, resourceGroupName: Output<String>? = null, storageAccountId: Output<String>? = null, tags: Output<Map<String, String>>? = null, targetRegions: Output<List<SharedImageVersionTargetRegionArgs>>? = null)

Properties

Link copied to clipboard
val blobUri: Output<String>? = null

URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created.

Link copied to clipboard

Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to false. Changing this forces a new resource to be created.

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

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

Link copied to clipboard
val excludeFromLatest: Output<Boolean>? = null

Should this Image Version be excluded from the latest filter? If set to true this Image Version won't be returned for the latest version. Defaults to false.

Link copied to clipboard
val galleryName: Output<String>? = null

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

Link copied to clipboard
val imageName: Output<String>? = null

The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val location: Output<String>? = null

The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created.

Link copied to clipboard
val managedImageId: Output<String>? = null

The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

The version number for this Image Version, such as 1.0.0. Changing this forces a new resource to be created.

Link copied to clipboard
val osDiskSnapshotId: Output<String>? = null

The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created.

Link copied to clipboard
val replicationMode: Output<String>? = null

Mode to be used for replication. Possible values are Full and Shallow. Defaults to Full. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

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 storageAccountId: Output<String>? = null

The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created.

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

A collection of tags which should be applied to this resource.

Link copied to clipboard

One or more target_region blocks as documented below.

Functions

Link copied to clipboard
open override fun toJava(): SharedImageVersionArgs