1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. Image
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.compute.Image

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    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:

    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)
    public Image(String name, ImageArgs args)
    public Image(String name, ImageArgs args, CustomResourceOptions options)
    
    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.
    DiskSizeGb int
    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.
    GuestOsFeatures List<ImageGuestOsFeature>
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    ImageEncryptionKey ImageImageEncryptionKey
    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.
    RawDisk ImageRawDisk
    The parameters of the raw disk image. Structure is documented below.
    SourceDisk 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.
    SourceImage 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
    SourceSnapshot 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
    StorageLocations 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.
    DiskSizeGb int
    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.
    GuestOsFeatures []ImageGuestOsFeatureArgs
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    ImageEncryptionKey ImageImageEncryptionKeyArgs
    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.
    RawDisk ImageRawDiskArgs
    The parameters of the raw disk image. Structure is documented below.
    SourceDisk 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.
    SourceImage 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
    SourceSnapshot 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
    StorageLocations []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.
    diskSizeGb Integer
    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.
    guestOsFeatures List<ImageGuestOsFeature>
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    imageEncryptionKey ImageImageEncryptionKey
    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.
    rawDisk ImageRawDisk
    The parameters of the raw disk image. Structure is documented below.
    sourceDisk 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.
    sourceImage 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
    sourceSnapshot 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
    storageLocations 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.
    diskSizeGb number
    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.
    guestOsFeatures ImageGuestOsFeature[]
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    imageEncryptionKey ImageImageEncryptionKey
    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.
    rawDisk ImageRawDisk
    The parameters of the raw disk image. Structure is documented below.
    sourceDisk 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.
    sourceImage 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
    sourceSnapshot 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
    storageLocations 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_gb int
    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_features Sequence[ImageGuestOsFeatureArgs]
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    image_encryption_key ImageImageEncryptionKeyArgs
    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 ImageRawDiskArgs
    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.
    diskSizeGb Number
    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.
    guestOsFeatures List<Property Map>
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    imageEncryptionKey Property Map
    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.
    rawDisk Property Map
    The parameters of the raw disk image. Structure is documented below.
    sourceDisk 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.
    sourceImage 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
    sourceSnapshot 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
    storageLocations 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:

    ArchiveSizeBytes int
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    EffectiveLabels 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.
    LabelFingerprint string
    The fingerprint used for optimistic locking of this resource. Used internally during updates.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    SelfLink string
    The URI of the created resource.
    ArchiveSizeBytes int
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    EffectiveLabels 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.
    LabelFingerprint string
    The fingerprint used for optimistic locking of this resource. Used internally during updates.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    SelfLink string
    The URI of the created resource.
    archiveSizeBytes Integer
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    effectiveLabels 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.
    labelFingerprint String
    The fingerprint used for optimistic locking of this resource. Used internally during updates.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    selfLink String
    The URI of the created resource.
    archiveSizeBytes number
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    effectiveLabels {[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.
    labelFingerprint string
    The fingerprint used for optimistic locking of this resource. Used internally during updates.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    selfLink string
    The URI of the created resource.
    archive_size_bytes int
    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.
    archiveSizeBytes Number
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    effectiveLabels 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.
    labelFingerprint String
    The fingerprint used for optimistic locking of this resource. Used internally during updates.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    selfLink 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.
    The following state arguments are supported:
    ArchiveSizeBytes int
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional description of this resource. Provide this property when you create the resource.
    DiskSizeGb int
    Size of the image when restored onto a persistent disk (in GB).
    EffectiveLabels 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.
    GuestOsFeatures List<ImageGuestOsFeature>
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    ImageEncryptionKey ImageImageEncryptionKey
    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.
    LabelFingerprint 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.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RawDisk ImageRawDisk
    The parameters of the raw disk image. Structure is documented below.
    SelfLink string
    The URI of the created resource.
    SourceDisk 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.
    SourceImage 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
    SourceSnapshot 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
    StorageLocations 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
    ArchiveSizeBytes int
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional description of this resource. Provide this property when you create the resource.
    DiskSizeGb int
    Size of the image when restored onto a persistent disk (in GB).
    EffectiveLabels 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.
    GuestOsFeatures []ImageGuestOsFeatureArgs
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    ImageEncryptionKey ImageImageEncryptionKeyArgs
    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.
    LabelFingerprint 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.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RawDisk ImageRawDiskArgs
    The parameters of the raw disk image. Structure is documented below.
    SelfLink string
    The URI of the created resource.
    SourceDisk 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.
    SourceImage 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
    SourceSnapshot 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
    StorageLocations []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
    archiveSizeBytes Integer
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional description of this resource. Provide this property when you create the resource.
    diskSizeGb Integer
    Size of the image when restored onto a persistent disk (in GB).
    effectiveLabels 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.
    guestOsFeatures List<ImageGuestOsFeature>
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    imageEncryptionKey ImageImageEncryptionKey
    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.
    labelFingerprint 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.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    rawDisk ImageRawDisk
    The parameters of the raw disk image. Structure is documented below.
    selfLink String
    The URI of the created resource.
    sourceDisk 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.
    sourceImage 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
    sourceSnapshot 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
    storageLocations 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
    archiveSizeBytes number
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    description string
    An optional description of this resource. Provide this property when you create the resource.
    diskSizeGb number
    Size of the image when restored onto a persistent disk (in GB).
    effectiveLabels {[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.
    guestOsFeatures ImageGuestOsFeature[]
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    imageEncryptionKey ImageImageEncryptionKey
    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.
    labelFingerprint 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.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    rawDisk ImageRawDisk
    The parameters of the raw disk image. Structure is documented below.
    selfLink string
    The URI of the created resource.
    sourceDisk 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.
    sourceImage 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
    sourceSnapshot 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
    storageLocations 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_bytes int
    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_gb int
    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_features Sequence[ImageGuestOsFeatureArgs]
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    image_encryption_key ImageImageEncryptionKeyArgs
    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 ImageRawDiskArgs
    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
    archiveSizeBytes Number
    Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional description of this resource. Provide this property when you create the resource.
    diskSizeGb Number
    Size of the image when restored onto a persistent disk (in GB).
    effectiveLabels 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.
    guestOsFeatures List<Property Map>
    A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
    imageEncryptionKey Property Map
    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.
    labelFingerprint 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.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    rawDisk Property Map
    The parameters of the raw disk image. Structure is documented below.
    selfLink String
    The URI of the created resource.
    sourceDisk 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.
    sourceImage 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
    sourceSnapshot 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
    storageLocations 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

    KmsKeySelfLink string
    The self link of the encryption key that is stored in Google Cloud KMS.
    KmsKeyServiceAccount string
    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
    KmsKeySelfLink string
    The self link of the encryption key that is stored in Google Cloud KMS.
    KmsKeyServiceAccount string
    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
    kmsKeySelfLink String
    The self link of the encryption key that is stored in Google Cloud KMS.
    kmsKeyServiceAccount String
    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
    kmsKeySelfLink string
    The self link of the encryption key that is stored in Google Cloud KMS.
    kmsKeyServiceAccount string
    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_self_link str
    The self link of the encryption key that is stored in Google Cloud KMS.
    kms_key_service_account str
    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
    kmsKeySelfLink String
    The self link of the encryption key that is stored in Google Cloud KMS.
    kmsKeyServiceAccount String
    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.
    ContainerType 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.
    ContainerType 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.
    containerType 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.
    containerType 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.
    containerType 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.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi