gcp.compute.Image
Explore with Pulumi AI
Represents an Image resource.
Google Compute Engine uses operating system images to create the root persistent disks for your instances. You specify an image when you create an instance. Images contain a boot loader, an operating system, and a root file system. Linux operating system images are also capable of running containers on Compute Engine.
Images can be either public or custom.
Public images are provided and maintained by Google, open-source communities, and third-party vendors. By default, all projects have access to these images and can use them to create instances. Custom images are available only to your project. You can create a custom image from root persistent disks and other images. Then, use the custom image to create an instance.
To get more information about Image, see:
- API documentation
- How-to Guides
Example Usage
Image Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const debian = gcp.compute.getImage({
family: "debian-12",
project: "debian-cloud",
});
const persistent = new gcp.compute.Disk("persistent", {
name: "example-disk",
image: debian.then(debian => debian.selfLink),
size: 10,
type: "pd-ssd",
zone: "us-central1-a",
});
const example = new gcp.compute.Image("example", {
name: "example-image",
sourceDisk: persistent.id,
});
import pulumi
import pulumi_gcp as gcp
debian = gcp.compute.get_image(family="debian-12",
project="debian-cloud")
persistent = gcp.compute.Disk("persistent",
name="example-disk",
image=debian.self_link,
size=10,
type="pd-ssd",
zone="us-central1-a")
example = gcp.compute.Image("example",
name="example-image",
source_disk=persistent.id)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
debian, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
Family: pulumi.StringRef("debian-12"),
Project: pulumi.StringRef("debian-cloud"),
}, nil)
if err != nil {
return err
}
persistent, err := compute.NewDisk(ctx, "persistent", &compute.DiskArgs{
Name: pulumi.String("example-disk"),
Image: pulumi.String(debian.SelfLink),
Size: pulumi.Int(10),
Type: pulumi.String("pd-ssd"),
Zone: pulumi.String("us-central1-a"),
})
if err != nil {
return err
}
_, err = compute.NewImage(ctx, "example", &compute.ImageArgs{
Name: pulumi.String("example-image"),
SourceDisk: persistent.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var debian = Gcp.Compute.GetImage.Invoke(new()
{
Family = "debian-12",
Project = "debian-cloud",
});
var persistent = new Gcp.Compute.Disk("persistent", new()
{
Name = "example-disk",
Image = debian.Apply(getImageResult => getImageResult.SelfLink),
Size = 10,
Type = "pd-ssd",
Zone = "us-central1-a",
});
var example = new Gcp.Compute.Image("example", new()
{
Name = "example-image",
SourceDisk = persistent.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetImageArgs;
import com.pulumi.gcp.compute.Disk;
import com.pulumi.gcp.compute.DiskArgs;
import com.pulumi.gcp.compute.Image;
import com.pulumi.gcp.compute.ImageArgs;
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 debian = ComputeFunctions.getImage(GetImageArgs.builder()
.family("debian-12")
.project("debian-cloud")
.build());
var persistent = new Disk("persistent", DiskArgs.builder()
.name("example-disk")
.image(debian.applyValue(getImageResult -> getImageResult.selfLink()))
.size(10)
.type("pd-ssd")
.zone("us-central1-a")
.build());
var example = new Image("example", ImageArgs.builder()
.name("example-image")
.sourceDisk(persistent.id())
.build());
}
}
resources:
persistent:
type: gcp:compute:Disk
properties:
name: example-disk
image: ${debian.selfLink}
size: 10
type: pd-ssd
zone: us-central1-a
example:
type: gcp:compute:Image
properties:
name: example-image
sourceDisk: ${persistent.id}
variables:
debian:
fn::invoke:
Function: gcp:compute:getImage
Arguments:
family: debian-12
project: debian-cloud
Image Guest Os
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const debian = gcp.compute.getImage({
family: "debian-12",
project: "debian-cloud",
});
const persistent = new gcp.compute.Disk("persistent", {
name: "example-disk",
image: debian.then(debian => debian.selfLink),
size: 10,
type: "pd-ssd",
zone: "us-central1-a",
});
const example = new gcp.compute.Image("example", {
name: "example-image",
sourceDisk: persistent.id,
guestOsFeatures: [
{
type: "UEFI_COMPATIBLE",
},
{
type: "VIRTIO_SCSI_MULTIQUEUE",
},
{
type: "GVNIC",
},
{
type: "SEV_CAPABLE",
},
{
type: "SEV_LIVE_MIGRATABLE_V2",
},
],
});
import pulumi
import pulumi_gcp as gcp
debian = gcp.compute.get_image(family="debian-12",
project="debian-cloud")
persistent = gcp.compute.Disk("persistent",
name="example-disk",
image=debian.self_link,
size=10,
type="pd-ssd",
zone="us-central1-a")
example = gcp.compute.Image("example",
name="example-image",
source_disk=persistent.id,
guest_os_features=[
{
"type": "UEFI_COMPATIBLE",
},
{
"type": "VIRTIO_SCSI_MULTIQUEUE",
},
{
"type": "GVNIC",
},
{
"type": "SEV_CAPABLE",
},
{
"type": "SEV_LIVE_MIGRATABLE_V2",
},
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
debian, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
Family: pulumi.StringRef("debian-12"),
Project: pulumi.StringRef("debian-cloud"),
}, nil)
if err != nil {
return err
}
persistent, err := compute.NewDisk(ctx, "persistent", &compute.DiskArgs{
Name: pulumi.String("example-disk"),
Image: pulumi.String(debian.SelfLink),
Size: pulumi.Int(10),
Type: pulumi.String("pd-ssd"),
Zone: pulumi.String("us-central1-a"),
})
if err != nil {
return err
}
_, err = compute.NewImage(ctx, "example", &compute.ImageArgs{
Name: pulumi.String("example-image"),
SourceDisk: persistent.ID(),
GuestOsFeatures: compute.ImageGuestOsFeatureArray{
&compute.ImageGuestOsFeatureArgs{
Type: pulumi.String("UEFI_COMPATIBLE"),
},
&compute.ImageGuestOsFeatureArgs{
Type: pulumi.String("VIRTIO_SCSI_MULTIQUEUE"),
},
&compute.ImageGuestOsFeatureArgs{
Type: pulumi.String("GVNIC"),
},
&compute.ImageGuestOsFeatureArgs{
Type: pulumi.String("SEV_CAPABLE"),
},
&compute.ImageGuestOsFeatureArgs{
Type: pulumi.String("SEV_LIVE_MIGRATABLE_V2"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var debian = Gcp.Compute.GetImage.Invoke(new()
{
Family = "debian-12",
Project = "debian-cloud",
});
var persistent = new Gcp.Compute.Disk("persistent", new()
{
Name = "example-disk",
Image = debian.Apply(getImageResult => getImageResult.SelfLink),
Size = 10,
Type = "pd-ssd",
Zone = "us-central1-a",
});
var example = new Gcp.Compute.Image("example", new()
{
Name = "example-image",
SourceDisk = persistent.Id,
GuestOsFeatures = new[]
{
new Gcp.Compute.Inputs.ImageGuestOsFeatureArgs
{
Type = "UEFI_COMPATIBLE",
},
new Gcp.Compute.Inputs.ImageGuestOsFeatureArgs
{
Type = "VIRTIO_SCSI_MULTIQUEUE",
},
new Gcp.Compute.Inputs.ImageGuestOsFeatureArgs
{
Type = "GVNIC",
},
new Gcp.Compute.Inputs.ImageGuestOsFeatureArgs
{
Type = "SEV_CAPABLE",
},
new Gcp.Compute.Inputs.ImageGuestOsFeatureArgs
{
Type = "SEV_LIVE_MIGRATABLE_V2",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetImageArgs;
import com.pulumi.gcp.compute.Disk;
import com.pulumi.gcp.compute.DiskArgs;
import com.pulumi.gcp.compute.Image;
import com.pulumi.gcp.compute.ImageArgs;
import com.pulumi.gcp.compute.inputs.ImageGuestOsFeatureArgs;
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 debian = ComputeFunctions.getImage(GetImageArgs.builder()
.family("debian-12")
.project("debian-cloud")
.build());
var persistent = new Disk("persistent", DiskArgs.builder()
.name("example-disk")
.image(debian.applyValue(getImageResult -> getImageResult.selfLink()))
.size(10)
.type("pd-ssd")
.zone("us-central1-a")
.build());
var example = new Image("example", ImageArgs.builder()
.name("example-image")
.sourceDisk(persistent.id())
.guestOsFeatures(
ImageGuestOsFeatureArgs.builder()
.type("UEFI_COMPATIBLE")
.build(),
ImageGuestOsFeatureArgs.builder()
.type("VIRTIO_SCSI_MULTIQUEUE")
.build(),
ImageGuestOsFeatureArgs.builder()
.type("GVNIC")
.build(),
ImageGuestOsFeatureArgs.builder()
.type("SEV_CAPABLE")
.build(),
ImageGuestOsFeatureArgs.builder()
.type("SEV_LIVE_MIGRATABLE_V2")
.build())
.build());
}
}
resources:
persistent:
type: gcp:compute:Disk
properties:
name: example-disk
image: ${debian.selfLink}
size: 10
type: pd-ssd
zone: us-central1-a
example:
type: gcp:compute:Image
properties:
name: example-image
sourceDisk: ${persistent.id}
guestOsFeatures:
- type: UEFI_COMPATIBLE
- type: VIRTIO_SCSI_MULTIQUEUE
- type: GVNIC
- type: SEV_CAPABLE
- type: SEV_LIVE_MIGRATABLE_V2
variables:
debian:
fn::invoke:
Function: gcp:compute:getImage
Arguments:
family: debian-12
project: debian-cloud
Image Basic Storage Location
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const debian = gcp.compute.getImage({
family: "debian-12",
project: "debian-cloud",
});
const persistent = new gcp.compute.Disk("persistent", {
name: "example-disk",
image: debian.then(debian => debian.selfLink),
size: 10,
type: "pd-ssd",
zone: "us-central1-a",
});
const example = new gcp.compute.Image("example", {
name: "example-sl-image",
sourceDisk: persistent.id,
storageLocations: ["us-central1"],
});
import pulumi
import pulumi_gcp as gcp
debian = gcp.compute.get_image(family="debian-12",
project="debian-cloud")
persistent = gcp.compute.Disk("persistent",
name="example-disk",
image=debian.self_link,
size=10,
type="pd-ssd",
zone="us-central1-a")
example = gcp.compute.Image("example",
name="example-sl-image",
source_disk=persistent.id,
storage_locations=["us-central1"])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
debian, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
Family: pulumi.StringRef("debian-12"),
Project: pulumi.StringRef("debian-cloud"),
}, nil)
if err != nil {
return err
}
persistent, err := compute.NewDisk(ctx, "persistent", &compute.DiskArgs{
Name: pulumi.String("example-disk"),
Image: pulumi.String(debian.SelfLink),
Size: pulumi.Int(10),
Type: pulumi.String("pd-ssd"),
Zone: pulumi.String("us-central1-a"),
})
if err != nil {
return err
}
_, err = compute.NewImage(ctx, "example", &compute.ImageArgs{
Name: pulumi.String("example-sl-image"),
SourceDisk: persistent.ID(),
StorageLocations: pulumi.StringArray{
pulumi.String("us-central1"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var debian = Gcp.Compute.GetImage.Invoke(new()
{
Family = "debian-12",
Project = "debian-cloud",
});
var persistent = new Gcp.Compute.Disk("persistent", new()
{
Name = "example-disk",
Image = debian.Apply(getImageResult => getImageResult.SelfLink),
Size = 10,
Type = "pd-ssd",
Zone = "us-central1-a",
});
var example = new Gcp.Compute.Image("example", new()
{
Name = "example-sl-image",
SourceDisk = persistent.Id,
StorageLocations = new[]
{
"us-central1",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetImageArgs;
import com.pulumi.gcp.compute.Disk;
import com.pulumi.gcp.compute.DiskArgs;
import com.pulumi.gcp.compute.Image;
import com.pulumi.gcp.compute.ImageArgs;
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 debian = ComputeFunctions.getImage(GetImageArgs.builder()
.family("debian-12")
.project("debian-cloud")
.build());
var persistent = new Disk("persistent", DiskArgs.builder()
.name("example-disk")
.image(debian.applyValue(getImageResult -> getImageResult.selfLink()))
.size(10)
.type("pd-ssd")
.zone("us-central1-a")
.build());
var example = new Image("example", ImageArgs.builder()
.name("example-sl-image")
.sourceDisk(persistent.id())
.storageLocations("us-central1")
.build());
}
}
resources:
persistent:
type: gcp:compute:Disk
properties:
name: example-disk
image: ${debian.selfLink}
size: 10
type: pd-ssd
zone: us-central1-a
example:
type: gcp:compute:Image
properties:
name: example-sl-image
sourceDisk: ${persistent.id}
storageLocations:
- us-central1
variables:
debian:
fn::invoke:
Function: gcp:compute:getImage
Arguments:
family: debian-12
project: debian-cloud
Create Image Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Image(name: string, args?: ImageArgs, opts?: CustomResourceOptions);
@overload
def Image(resource_name: str,
args: Optional[ImageArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Image(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
disk_size_gb: Optional[int] = None,
family: Optional[str] = None,
guest_os_features: Optional[Sequence[ImageGuestOsFeatureArgs]] = None,
image_encryption_key: Optional[ImageImageEncryptionKeyArgs] = None,
labels: Optional[Mapping[str, str]] = None,
licenses: Optional[Sequence[str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
raw_disk: Optional[ImageRawDiskArgs] = None,
source_disk: Optional[str] = None,
source_image: Optional[str] = None,
source_snapshot: Optional[str] = None,
storage_locations: Optional[Sequence[str]] = None)
func NewImage(ctx *Context, name string, args *ImageArgs, opts ...ResourceOption) (*Image, error)
public Image(string name, ImageArgs? args = null, CustomResourceOptions? opts = null)
type: gcp:compute:Image
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 ImageArgs
- 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 ImageArgs
- 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 ImageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImageArgs
- 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 imageResource = new Gcp.Compute.Image("imageResource", new()
{
Description = "string",
DiskSizeGb = 0,
Family = "string",
GuestOsFeatures = new[]
{
new Gcp.Compute.Inputs.ImageGuestOsFeatureArgs
{
Type = "string",
},
},
ImageEncryptionKey = new Gcp.Compute.Inputs.ImageImageEncryptionKeyArgs
{
KmsKeySelfLink = "string",
KmsKeyServiceAccount = "string",
},
Labels =
{
{ "string", "string" },
},
Licenses = new[]
{
"string",
},
Name = "string",
Project = "string",
RawDisk = new Gcp.Compute.Inputs.ImageRawDiskArgs
{
Source = "string",
ContainerType = "string",
Sha1 = "string",
},
SourceDisk = "string",
SourceImage = "string",
SourceSnapshot = "string",
StorageLocations = new[]
{
"string",
},
});
example, err := compute.NewImage(ctx, "imageResource", &compute.ImageArgs{
Description: pulumi.String("string"),
DiskSizeGb: pulumi.Int(0),
Family: pulumi.String("string"),
GuestOsFeatures: compute.ImageGuestOsFeatureArray{
&compute.ImageGuestOsFeatureArgs{
Type: pulumi.String("string"),
},
},
ImageEncryptionKey: &compute.ImageImageEncryptionKeyArgs{
KmsKeySelfLink: pulumi.String("string"),
KmsKeyServiceAccount: pulumi.String("string"),
},
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Licenses: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
RawDisk: &compute.ImageRawDiskArgs{
Source: pulumi.String("string"),
ContainerType: pulumi.String("string"),
Sha1: pulumi.String("string"),
},
SourceDisk: pulumi.String("string"),
SourceImage: pulumi.String("string"),
SourceSnapshot: pulumi.String("string"),
StorageLocations: pulumi.StringArray{
pulumi.String("string"),
},
})
var imageResource = new Image("imageResource", ImageArgs.builder()
.description("string")
.diskSizeGb(0)
.family("string")
.guestOsFeatures(ImageGuestOsFeatureArgs.builder()
.type("string")
.build())
.imageEncryptionKey(ImageImageEncryptionKeyArgs.builder()
.kmsKeySelfLink("string")
.kmsKeyServiceAccount("string")
.build())
.labels(Map.of("string", "string"))
.licenses("string")
.name("string")
.project("string")
.rawDisk(ImageRawDiskArgs.builder()
.source("string")
.containerType("string")
.sha1("string")
.build())
.sourceDisk("string")
.sourceImage("string")
.sourceSnapshot("string")
.storageLocations("string")
.build());
image_resource = gcp.compute.Image("imageResource",
description="string",
disk_size_gb=0,
family="string",
guest_os_features=[{
"type": "string",
}],
image_encryption_key={
"kms_key_self_link": "string",
"kms_key_service_account": "string",
},
labels={
"string": "string",
},
licenses=["string"],
name="string",
project="string",
raw_disk={
"source": "string",
"container_type": "string",
"sha1": "string",
},
source_disk="string",
source_image="string",
source_snapshot="string",
storage_locations=["string"])
const imageResource = new gcp.compute.Image("imageResource", {
description: "string",
diskSizeGb: 0,
family: "string",
guestOsFeatures: [{
type: "string",
}],
imageEncryptionKey: {
kmsKeySelfLink: "string",
kmsKeyServiceAccount: "string",
},
labels: {
string: "string",
},
licenses: ["string"],
name: "string",
project: "string",
rawDisk: {
source: "string",
containerType: "string",
sha1: "string",
},
sourceDisk: "string",
sourceImage: "string",
sourceSnapshot: "string",
storageLocations: ["string"],
});
type: gcp:compute:Image
properties:
description: string
diskSizeGb: 0
family: string
guestOsFeatures:
- type: string
imageEncryptionKey:
kmsKeySelfLink: string
kmsKeyServiceAccount: string
labels:
string: string
licenses:
- string
name: string
project: string
rawDisk:
containerType: string
sha1: string
source: string
sourceDisk: string
sourceImage: string
sourceSnapshot: string
storageLocations:
- string
Image 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 Image resource accepts the following input properties:
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Disk
Size intGb - Size of the image when restored onto a persistent disk (in GB).
- Family string
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- Guest
Os List<ImageFeatures Guest Os Feature> - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- Image
Encryption ImageKey Image Encryption Key - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- Labels Dictionary<string, string>
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Licenses List<string>
- Any applicable license URI.
- Name string
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Raw
Disk ImageRaw Disk - The parameters of the raw disk image. Structure is documented below.
- Source
Disk string - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- Source
Image string - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- Source
Snapshot string - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- Storage
Locations List<string> - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Disk
Size intGb - Size of the image when restored onto a persistent disk (in GB).
- Family string
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- Guest
Os []ImageFeatures Guest Os Feature Args - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- Image
Encryption ImageKey Image Encryption Key Args - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- Labels map[string]string
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Licenses []string
- Any applicable license URI.
- Name string
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Raw
Disk ImageRaw Disk Args - The parameters of the raw disk image. Structure is documented below.
- Source
Disk string - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- Source
Image string - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- Source
Snapshot string - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- Storage
Locations []string - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- description String
- An optional description of this resource. Provide this property when you create the resource.
- disk
Size IntegerGb - Size of the image when restored onto a persistent disk (in GB).
- family String
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- guest
Os List<ImageFeatures Guest Os Feature> - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- image
Encryption ImageKey Image Encryption Key - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- labels Map<String,String>
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - licenses List<String>
- Any applicable license URI.
- name String
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- raw
Disk ImageRaw Disk - The parameters of the raw disk image. Structure is documented below.
- source
Disk String - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- source
Image String - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- source
Snapshot String - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- storage
Locations List<String> - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- description string
- An optional description of this resource. Provide this property when you create the resource.
- disk
Size numberGb - Size of the image when restored onto a persistent disk (in GB).
- family string
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- guest
Os ImageFeatures Guest Os Feature[] - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- image
Encryption ImageKey Image Encryption Key - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- labels {[key: string]: string}
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - licenses string[]
- Any applicable license URI.
- name string
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- raw
Disk ImageRaw Disk - The parameters of the raw disk image. Structure is documented below.
- source
Disk string - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- source
Image string - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- source
Snapshot string - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- storage
Locations string[] - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- description str
- An optional description of this resource. Provide this property when you create the resource.
- disk_
size_ intgb - Size of the image when restored onto a persistent disk (in GB).
- family str
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- guest_
os_ Sequence[Imagefeatures Guest Os Feature Args] - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- image_
encryption_ Imagekey Image Encryption Key Args - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- labels Mapping[str, str]
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - licenses Sequence[str]
- Any applicable license URI.
- name str
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- raw_
disk ImageRaw Disk Args - The parameters of the raw disk image. Structure is documented below.
- source_
disk str - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- source_
image str - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- source_
snapshot str - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- storage_
locations Sequence[str] - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- description String
- An optional description of this resource. Provide this property when you create the resource.
- disk
Size NumberGb - Size of the image when restored onto a persistent disk (in GB).
- family String
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- guest
Os List<Property Map>Features - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- image
Encryption Property MapKey - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- labels Map<String>
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - licenses List<String>
- Any applicable license URI.
- name String
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- raw
Disk Property Map - The parameters of the raw disk image. Structure is documented below.
- source
Disk String - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- source
Image String - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- source
Snapshot String - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- storage
Locations List<String> - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
Outputs
All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:
- Archive
Size intBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - The URI of the created resource.
- Archive
Size intBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - The URI of the created resource.
- archive
Size IntegerBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- label
Fingerprint String - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - The URI of the created resource.
- archive
Size numberBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link string - The URI of the created resource.
- archive_
size_ intbytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- label_
fingerprint str - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- self_
link str - The URI of the created resource.
- archive
Size NumberBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- label
Fingerprint String - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - The URI of the created resource.
Look up Existing Image Resource
Get an existing Image 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?: ImageState, opts?: CustomResourceOptions): Image
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
archive_size_bytes: Optional[int] = None,
creation_timestamp: Optional[str] = None,
description: Optional[str] = None,
disk_size_gb: Optional[int] = None,
effective_labels: Optional[Mapping[str, str]] = None,
family: Optional[str] = None,
guest_os_features: Optional[Sequence[ImageGuestOsFeatureArgs]] = None,
image_encryption_key: Optional[ImageImageEncryptionKeyArgs] = None,
label_fingerprint: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
licenses: Optional[Sequence[str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
raw_disk: Optional[ImageRawDiskArgs] = None,
self_link: Optional[str] = None,
source_disk: Optional[str] = None,
source_image: Optional[str] = None,
source_snapshot: Optional[str] = None,
storage_locations: Optional[Sequence[str]] = None) -> Image
func GetImage(ctx *Context, name string, id IDInput, state *ImageState, opts ...ResourceOption) (*Image, error)
public static Image Get(string name, Input<string> id, ImageState? state, CustomResourceOptions? opts = null)
public static Image get(String name, Output<String> id, ImageState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Archive
Size intBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Disk
Size intGb - Size of the image when restored onto a persistent disk (in GB).
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Family string
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- Guest
Os List<ImageFeatures Guest Os Feature> - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- Image
Encryption ImageKey Image Encryption Key - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- Label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- Labels Dictionary<string, string>
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Licenses List<string>
- Any applicable license URI.
- Name string
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Raw
Disk ImageRaw Disk - The parameters of the raw disk image. Structure is documented below.
- Self
Link string - The URI of the created resource.
- Source
Disk string - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- Source
Image string - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- Source
Snapshot string - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- Storage
Locations List<string> - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- Archive
Size intBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Disk
Size intGb - Size of the image when restored onto a persistent disk (in GB).
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Family string
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- Guest
Os []ImageFeatures Guest Os Feature Args - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- Image
Encryption ImageKey Image Encryption Key Args - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- Label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- Labels map[string]string
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Licenses []string
- Any applicable license URI.
- Name string
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Raw
Disk ImageRaw Disk Args - The parameters of the raw disk image. Structure is documented below.
- Self
Link string - The URI of the created resource.
- Source
Disk string - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- Source
Image string - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- Source
Snapshot string - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- Storage
Locations []string - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- archive
Size IntegerBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- disk
Size IntegerGb - Size of the image when restored onto a persistent disk (in GB).
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- family String
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- guest
Os List<ImageFeatures Guest Os Feature> - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- image
Encryption ImageKey Image Encryption Key - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- label
Fingerprint String - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- labels Map<String,String>
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - licenses List<String>
- Any applicable license URI.
- name String
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- raw
Disk ImageRaw Disk - The parameters of the raw disk image. Structure is documented below.
- self
Link String - The URI of the created resource.
- source
Disk String - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- source
Image String - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- source
Snapshot String - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- storage
Locations List<String> - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- archive
Size numberBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- disk
Size numberGb - Size of the image when restored onto a persistent disk (in GB).
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- family string
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- guest
Os ImageFeatures Guest Os Feature[] - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- image
Encryption ImageKey Image Encryption Key - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- labels {[key: string]: string}
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - licenses string[]
- Any applicable license URI.
- name string
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- raw
Disk ImageRaw Disk - The parameters of the raw disk image. Structure is documented below.
- self
Link string - The URI of the created resource.
- source
Disk string - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- source
Image string - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- source
Snapshot string - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- storage
Locations string[] - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- archive_
size_ intbytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- disk_
size_ intgb - Size of the image when restored onto a persistent disk (in GB).
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- family str
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- guest_
os_ Sequence[Imagefeatures Guest Os Feature Args] - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- image_
encryption_ Imagekey Image Encryption Key Args - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- label_
fingerprint str - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- labels Mapping[str, str]
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - licenses Sequence[str]
- Any applicable license URI.
- name str
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- raw_
disk ImageRaw Disk Args - The parameters of the raw disk image. Structure is documented below.
- self_
link str - The URI of the created resource.
- source_
disk str - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- source_
image str - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- source_
snapshot str - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- storage_
locations Sequence[str] - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
- archive
Size NumberBytes - Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- disk
Size NumberGb - Size of the image when restored onto a persistent disk (in GB).
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- family String
- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
- guest
Os List<Property Map>Features - A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
- image
Encryption Property MapKey - Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) Structure is documented below.
- label
Fingerprint String - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- labels Map<String>
- Labels to apply to this Image.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - licenses List<String>
- Any applicable license URI.
- name String
- Name of the resource; provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- raw
Disk Property Map - The parameters of the raw disk image. Structure is documented below.
- self
Link String - The URI of the created resource.
- source
Disk String - The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- source
Image String - URL of the source image used to create this image. In order to create an image, you must provide the full or partial
URL of one of the following:
- The selfLink URL
- This property
- The rawDisk.source URL
- The sourceDisk URL
- source
Snapshot String - URL of the source snapshot used to create this image.
In order to create an image, you must provide the full or partial URL of one of the following:
- The selfLink URL
- This property
- The sourceImage URL
- The rawDisk.source URL
- The sourceDisk URL
- storage
Locations List<String> - Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
Supporting Types
ImageGuestOsFeature, ImageGuestOsFeatureArgs
- Type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
Possible values are:
MULTI_IP_SUBNET
,SECURE_BOOT
,SEV_CAPABLE
,UEFI_COMPATIBLE
,VIRTIO_SCSI_MULTIQUEUE
,WINDOWS
,GVNIC
,SEV_LIVE_MIGRATABLE
,SEV_SNP_CAPABLE
,SUSPEND_RESUME_COMPATIBLE
,TDX_CAPABLE
,SEV_LIVE_MIGRATABLE_V2
.
- Type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
Possible values are:
MULTI_IP_SUBNET
,SECURE_BOOT
,SEV_CAPABLE
,UEFI_COMPATIBLE
,VIRTIO_SCSI_MULTIQUEUE
,WINDOWS
,GVNIC
,SEV_LIVE_MIGRATABLE
,SEV_SNP_CAPABLE
,SUSPEND_RESUME_COMPATIBLE
,TDX_CAPABLE
,SEV_LIVE_MIGRATABLE_V2
.
- type String
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
Possible values are:
MULTI_IP_SUBNET
,SECURE_BOOT
,SEV_CAPABLE
,UEFI_COMPATIBLE
,VIRTIO_SCSI_MULTIQUEUE
,WINDOWS
,GVNIC
,SEV_LIVE_MIGRATABLE
,SEV_SNP_CAPABLE
,SUSPEND_RESUME_COMPATIBLE
,TDX_CAPABLE
,SEV_LIVE_MIGRATABLE_V2
.
- type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
Possible values are:
MULTI_IP_SUBNET
,SECURE_BOOT
,SEV_CAPABLE
,UEFI_COMPATIBLE
,VIRTIO_SCSI_MULTIQUEUE
,WINDOWS
,GVNIC
,SEV_LIVE_MIGRATABLE
,SEV_SNP_CAPABLE
,SUSPEND_RESUME_COMPATIBLE
,TDX_CAPABLE
,SEV_LIVE_MIGRATABLE_V2
.
- type str
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
Possible values are:
MULTI_IP_SUBNET
,SECURE_BOOT
,SEV_CAPABLE
,UEFI_COMPATIBLE
,VIRTIO_SCSI_MULTIQUEUE
,WINDOWS
,GVNIC
,SEV_LIVE_MIGRATABLE
,SEV_SNP_CAPABLE
,SUSPEND_RESUME_COMPATIBLE
,TDX_CAPABLE
,SEV_LIVE_MIGRATABLE_V2
.
- type String
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
Possible values are:
MULTI_IP_SUBNET
,SECURE_BOOT
,SEV_CAPABLE
,UEFI_COMPATIBLE
,VIRTIO_SCSI_MULTIQUEUE
,WINDOWS
,GVNIC
,SEV_LIVE_MIGRATABLE
,SEV_SNP_CAPABLE
,SUSPEND_RESUME_COMPATIBLE
,TDX_CAPABLE
,SEV_LIVE_MIGRATABLE_V2
.
ImageImageEncryptionKey, ImageImageEncryptionKeyArgs
- Kms
Key stringSelf Link - The self link of the encryption key that is stored in Google Cloud KMS.
- Kms
Key stringService Account - The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
- Kms
Key stringSelf Link - The self link of the encryption key that is stored in Google Cloud KMS.
- Kms
Key stringService Account - The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
- kms
Key StringSelf Link - The self link of the encryption key that is stored in Google Cloud KMS.
- kms
Key StringService Account - The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
- kms
Key stringSelf Link - The self link of the encryption key that is stored in Google Cloud KMS.
- kms
Key stringService Account - The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
- kms_
key_ strself_ link - The self link of the encryption key that is stored in Google Cloud KMS.
- kms_
key_ strservice_ account - The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
- kms
Key StringSelf Link - The self link of the encryption key that is stored in Google Cloud KMS.
- kms
Key StringService Account - The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
ImageRawDisk, ImageRawDiskArgs
- Source string
- The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
- Container
Type string - The format used to encode and transmit the block device, which
should be TAR. This is just a container and transmission format
and not a runtime format. Provided by the client when the disk
image is created.
Default value is
TAR
. Possible values are:TAR
. - Sha1 string
- An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.
- Source string
- The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
- Container
Type string - The format used to encode and transmit the block device, which
should be TAR. This is just a container and transmission format
and not a runtime format. Provided by the client when the disk
image is created.
Default value is
TAR
. Possible values are:TAR
. - Sha1 string
- An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.
- source String
- The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
- container
Type String - The format used to encode and transmit the block device, which
should be TAR. This is just a container and transmission format
and not a runtime format. Provided by the client when the disk
image is created.
Default value is
TAR
. Possible values are:TAR
. - sha1 String
- An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.
- source string
- The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
- container
Type string - The format used to encode and transmit the block device, which
should be TAR. This is just a container and transmission format
and not a runtime format. Provided by the client when the disk
image is created.
Default value is
TAR
. Possible values are:TAR
. - sha1 string
- An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.
- source str
- The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
- container_
type str - The format used to encode and transmit the block device, which
should be TAR. This is just a container and transmission format
and not a runtime format. Provided by the client when the disk
image is created.
Default value is
TAR
. Possible values are:TAR
. - sha1 str
- An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.
- source String
- The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
- container
Type String - The format used to encode and transmit the block device, which
should be TAR. This is just a container and transmission format
and not a runtime format. Provided by the client when the disk
image is created.
Default value is
TAR
. Possible values are:TAR
. - sha1 String
- An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.
Import
Image can be imported using any of these accepted formats:
projects/{{project}}/global/images/{{name}}
{{project}}/{{name}}
{{name}}
When using the pulumi import
command, Image can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/image:Image default projects/{{project}}/global/images/{{name}}
$ pulumi import gcp:compute/image:Image default {{project}}/{{name}}
$ pulumi import gcp:compute/image:Image default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.