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 example = new gcp.compute.Image("example", {
name: "example-image",
rawDisk: {
source: "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
},
});
import pulumi
import pulumi_gcp as gcp
example = gcp.compute.Image("example",
name="example-image",
raw_disk=gcp.compute.ImageRawDiskArgs(
source="https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "example", &compute.ImageArgs{
Name: pulumi.String("example-image"),
RawDisk: &compute.ImageRawDiskArgs{
Source: pulumi.String("https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"),
},
})
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 example = new Gcp.Compute.Image("example", new()
{
Name = "example-image",
RawDisk = new Gcp.Compute.Inputs.ImageRawDiskArgs
{
Source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Image;
import com.pulumi.gcp.compute.ImageArgs;
import com.pulumi.gcp.compute.inputs.ImageRawDiskArgs;
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 Image("example", ImageArgs.builder()
.name("example-image")
.rawDisk(ImageRawDiskArgs.builder()
.source("https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz")
.build())
.build());
}
}
resources:
example:
type: gcp:compute:Image
properties:
name: example-image
rawDisk:
source: https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz
Image Guest Os
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.compute.Image("example", {
name: "example-image",
rawDisk: {
source: "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
},
guestOsFeatures: [
{
type: "SECURE_BOOT",
},
{
type: "MULTI_IP_SUBNET",
},
],
});
import pulumi
import pulumi_gcp as gcp
example = gcp.compute.Image("example",
name="example-image",
raw_disk=gcp.compute.ImageRawDiskArgs(
source="https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
),
guest_os_features=[
gcp.compute.ImageGuestOsFeatureArgs(
type="SECURE_BOOT",
),
gcp.compute.ImageGuestOsFeatureArgs(
type="MULTI_IP_SUBNET",
),
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "example", &compute.ImageArgs{
Name: pulumi.String("example-image"),
RawDisk: &compute.ImageRawDiskArgs{
Source: pulumi.String("https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"),
},
GuestOsFeatures: compute.ImageGuestOsFeatureArray{
&compute.ImageGuestOsFeatureArgs{
Type: pulumi.String("SECURE_BOOT"),
},
&compute.ImageGuestOsFeatureArgs{
Type: pulumi.String("MULTI_IP_SUBNET"),
},
},
})
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 example = new Gcp.Compute.Image("example", new()
{
Name = "example-image",
RawDisk = new Gcp.Compute.Inputs.ImageRawDiskArgs
{
Source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
},
GuestOsFeatures = new[]
{
new Gcp.Compute.Inputs.ImageGuestOsFeatureArgs
{
Type = "SECURE_BOOT",
},
new Gcp.Compute.Inputs.ImageGuestOsFeatureArgs
{
Type = "MULTI_IP_SUBNET",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Image;
import com.pulumi.gcp.compute.ImageArgs;
import com.pulumi.gcp.compute.inputs.ImageRawDiskArgs;
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) {
var example = new Image("example", ImageArgs.builder()
.name("example-image")
.rawDisk(ImageRawDiskArgs.builder()
.source("https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz")
.build())
.guestOsFeatures(
ImageGuestOsFeatureArgs.builder()
.type("SECURE_BOOT")
.build(),
ImageGuestOsFeatureArgs.builder()
.type("MULTI_IP_SUBNET")
.build())
.build());
}
}
resources:
example:
type: gcp:compute:Image
properties:
name: example-image
rawDisk:
source: https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz
guestOsFeatures:
- type: SECURE_BOOT
- type: MULTI_IP_SUBNET
Image Basic Storage Location
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.compute.Image("example", {
name: "example-sl-image",
rawDisk: {
source: "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
},
storageLocations: ["us-central1"],
});
import pulumi
import pulumi_gcp as gcp
example = gcp.compute.Image("example",
name="example-sl-image",
raw_disk=gcp.compute.ImageRawDiskArgs(
source="https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
),
storage_locations=["us-central1"])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "example", &compute.ImageArgs{
Name: pulumi.String("example-sl-image"),
RawDisk: &compute.ImageRawDiskArgs{
Source: pulumi.String("https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"),
},
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 example = new Gcp.Compute.Image("example", new()
{
Name = "example-sl-image",
RawDisk = new Gcp.Compute.Inputs.ImageRawDiskArgs
{
Source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz",
},
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.Image;
import com.pulumi.gcp.compute.ImageArgs;
import com.pulumi.gcp.compute.inputs.ImageRawDiskArgs;
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 Image("example", ImageArgs.builder()
.name("example-sl-image")
.rawDisk(ImageRawDiskArgs.builder()
.source("https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz")
.build())
.storageLocations("us-central1")
.build());
}
}
resources:
example:
type: gcp:compute:Image
properties:
name: example-sl-image
rawDisk:
source: https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz
storageLocations:
- us-central1
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=[gcp.compute.ImageGuestOsFeatureArgs(
type="string",
)],
image_encryption_key=gcp.compute.ImageImageEncryptionKeyArgs(
kms_key_self_link="string",
kms_key_service_account="string",
),
labels={
"string": "string",
},
licenses=["string"],
name="string",
project="string",
raw_disk=gcp.compute.ImageRawDiskArgs(
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
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.