1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. Reservation
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

gcp.compute.Reservation

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

    Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running.

    Reservations apply only to Compute Engine, Cloud Dataproc, and Google Kubernetes Engine VM usage.Reservations do not apply to f1-micro or g1-small machine types, preemptible VMs, sole tenant nodes, or other services not listed above like Cloud SQL and Dataflow.

    To get more information about Reservation, see:

    Example Usage

    Reservation Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const gceReservation = new gcp.compute.Reservation("gce_reservation", {
        name: "gce-reservation",
        zone: "us-central1-a",
        specificReservation: {
            count: 1,
            instanceProperties: {
                minCpuPlatform: "Intel Cascade Lake",
                machineType: "n2-standard-2",
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    gce_reservation = gcp.compute.Reservation("gce_reservation",
        name="gce-reservation",
        zone="us-central1-a",
        specific_reservation={
            "count": 1,
            "instance_properties": {
                "min_cpu_platform": "Intel Cascade Lake",
                "machine_type": "n2-standard-2",
            },
        })
    
    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 {
    		_, err := compute.NewReservation(ctx, "gce_reservation", &compute.ReservationArgs{
    			Name: pulumi.String("gce-reservation"),
    			Zone: pulumi.String("us-central1-a"),
    			SpecificReservation: &compute.ReservationSpecificReservationArgs{
    				Count: pulumi.Int(1),
    				InstanceProperties: &compute.ReservationSpecificReservationInstancePropertiesArgs{
    					MinCpuPlatform: pulumi.String("Intel Cascade Lake"),
    					MachineType:    pulumi.String("n2-standard-2"),
    				},
    			},
    		})
    		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 gceReservation = new Gcp.Compute.Reservation("gce_reservation", new()
        {
            Name = "gce-reservation",
            Zone = "us-central1-a",
            SpecificReservation = new Gcp.Compute.Inputs.ReservationSpecificReservationArgs
            {
                Count = 1,
                InstanceProperties = new Gcp.Compute.Inputs.ReservationSpecificReservationInstancePropertiesArgs
                {
                    MinCpuPlatform = "Intel Cascade Lake",
                    MachineType = "n2-standard-2",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Reservation;
    import com.pulumi.gcp.compute.ReservationArgs;
    import com.pulumi.gcp.compute.inputs.ReservationSpecificReservationArgs;
    import com.pulumi.gcp.compute.inputs.ReservationSpecificReservationInstancePropertiesArgs;
    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 gceReservation = new Reservation("gceReservation", ReservationArgs.builder()
                .name("gce-reservation")
                .zone("us-central1-a")
                .specificReservation(ReservationSpecificReservationArgs.builder()
                    .count(1)
                    .instanceProperties(ReservationSpecificReservationInstancePropertiesArgs.builder()
                        .minCpuPlatform("Intel Cascade Lake")
                        .machineType("n2-standard-2")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      gceReservation:
        type: gcp:compute:Reservation
        name: gce_reservation
        properties:
          name: gce-reservation
          zone: us-central1-a
          specificReservation:
            count: 1
            instanceProperties:
              minCpuPlatform: Intel Cascade Lake
              machineType: n2-standard-2
    

    Create Reservation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Reservation(name: string, args: ReservationArgs, opts?: CustomResourceOptions);
    @overload
    def Reservation(resource_name: str,
                    args: ReservationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Reservation(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    specific_reservation: Optional[ReservationSpecificReservationArgs] = None,
                    zone: Optional[str] = None,
                    description: Optional[str] = None,
                    name: Optional[str] = None,
                    project: Optional[str] = None,
                    share_settings: Optional[ReservationShareSettingsArgs] = None,
                    specific_reservation_required: Optional[bool] = None)
    func NewReservation(ctx *Context, name string, args ReservationArgs, opts ...ResourceOption) (*Reservation, error)
    public Reservation(string name, ReservationArgs args, CustomResourceOptions? opts = null)
    public Reservation(String name, ReservationArgs args)
    public Reservation(String name, ReservationArgs args, CustomResourceOptions options)
    
    type: gcp:compute:Reservation
    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 ReservationArgs
    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 ReservationArgs
    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 ReservationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReservationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReservationArgs
    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 gcpReservationResource = new Gcp.Compute.Reservation("gcpReservationResource", new()
    {
        SpecificReservation = new Gcp.Compute.Inputs.ReservationSpecificReservationArgs
        {
            Count = 0,
            InstanceProperties = new Gcp.Compute.Inputs.ReservationSpecificReservationInstancePropertiesArgs
            {
                MachineType = "string",
                GuestAccelerators = new[]
                {
                    new Gcp.Compute.Inputs.ReservationSpecificReservationInstancePropertiesGuestAcceleratorArgs
                    {
                        AcceleratorCount = 0,
                        AcceleratorType = "string",
                    },
                },
                LocalSsds = new[]
                {
                    new Gcp.Compute.Inputs.ReservationSpecificReservationInstancePropertiesLocalSsdArgs
                    {
                        DiskSizeGb = 0,
                        Interface = "string",
                    },
                },
                MinCpuPlatform = "string",
            },
            InUseCount = 0,
        },
        Zone = "string",
        Description = "string",
        Name = "string",
        Project = "string",
        ShareSettings = new Gcp.Compute.Inputs.ReservationShareSettingsArgs
        {
            ProjectMaps = new[]
            {
                new Gcp.Compute.Inputs.ReservationShareSettingsProjectMapArgs
                {
                    Id = "string",
                    ProjectId = "string",
                },
            },
            ShareType = "string",
        },
        SpecificReservationRequired = false,
    });
    
    example, err := compute.NewReservation(ctx, "gcpReservationResource", &compute.ReservationArgs{
    	SpecificReservation: &compute.ReservationSpecificReservationArgs{
    		Count: pulumi.Int(0),
    		InstanceProperties: &compute.ReservationSpecificReservationInstancePropertiesArgs{
    			MachineType: pulumi.String("string"),
    			GuestAccelerators: compute.ReservationSpecificReservationInstancePropertiesGuestAcceleratorArray{
    				&compute.ReservationSpecificReservationInstancePropertiesGuestAcceleratorArgs{
    					AcceleratorCount: pulumi.Int(0),
    					AcceleratorType:  pulumi.String("string"),
    				},
    			},
    			LocalSsds: compute.ReservationSpecificReservationInstancePropertiesLocalSsdArray{
    				&compute.ReservationSpecificReservationInstancePropertiesLocalSsdArgs{
    					DiskSizeGb: pulumi.Int(0),
    					Interface:  pulumi.String("string"),
    				},
    			},
    			MinCpuPlatform: pulumi.String("string"),
    		},
    		InUseCount: pulumi.Int(0),
    	},
    	Zone:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Project:     pulumi.String("string"),
    	ShareSettings: &compute.ReservationShareSettingsArgs{
    		ProjectMaps: compute.ReservationShareSettingsProjectMapArray{
    			&compute.ReservationShareSettingsProjectMapArgs{
    				Id:        pulumi.String("string"),
    				ProjectId: pulumi.String("string"),
    			},
    		},
    		ShareType: pulumi.String("string"),
    	},
    	SpecificReservationRequired: pulumi.Bool(false),
    })
    
    var gcpReservationResource = new Reservation("gcpReservationResource", ReservationArgs.builder()
        .specificReservation(ReservationSpecificReservationArgs.builder()
            .count(0)
            .instanceProperties(ReservationSpecificReservationInstancePropertiesArgs.builder()
                .machineType("string")
                .guestAccelerators(ReservationSpecificReservationInstancePropertiesGuestAcceleratorArgs.builder()
                    .acceleratorCount(0)
                    .acceleratorType("string")
                    .build())
                .localSsds(ReservationSpecificReservationInstancePropertiesLocalSsdArgs.builder()
                    .diskSizeGb(0)
                    .interface_("string")
                    .build())
                .minCpuPlatform("string")
                .build())
            .inUseCount(0)
            .build())
        .zone("string")
        .description("string")
        .name("string")
        .project("string")
        .shareSettings(ReservationShareSettingsArgs.builder()
            .projectMaps(ReservationShareSettingsProjectMapArgs.builder()
                .id("string")
                .projectId("string")
                .build())
            .shareType("string")
            .build())
        .specificReservationRequired(false)
        .build());
    
    gcp_reservation_resource = gcp.compute.Reservation("gcpReservationResource",
        specific_reservation={
            "count": 0,
            "instanceProperties": {
                "machineType": "string",
                "guestAccelerators": [{
                    "acceleratorCount": 0,
                    "acceleratorType": "string",
                }],
                "localSsds": [{
                    "diskSizeGb": 0,
                    "interface": "string",
                }],
                "minCpuPlatform": "string",
            },
            "inUseCount": 0,
        },
        zone="string",
        description="string",
        name="string",
        project="string",
        share_settings={
            "projectMaps": [{
                "id": "string",
                "projectId": "string",
            }],
            "shareType": "string",
        },
        specific_reservation_required=False)
    
    const gcpReservationResource = new gcp.compute.Reservation("gcpReservationResource", {
        specificReservation: {
            count: 0,
            instanceProperties: {
                machineType: "string",
                guestAccelerators: [{
                    acceleratorCount: 0,
                    acceleratorType: "string",
                }],
                localSsds: [{
                    diskSizeGb: 0,
                    "interface": "string",
                }],
                minCpuPlatform: "string",
            },
            inUseCount: 0,
        },
        zone: "string",
        description: "string",
        name: "string",
        project: "string",
        shareSettings: {
            projectMaps: [{
                id: "string",
                projectId: "string",
            }],
            shareType: "string",
        },
        specificReservationRequired: false,
    });
    
    type: gcp:compute:Reservation
    properties:
        description: string
        name: string
        project: string
        shareSettings:
            projectMaps:
                - id: string
                  projectId: string
            shareType: string
        specificReservation:
            count: 0
            inUseCount: 0
            instanceProperties:
                guestAccelerators:
                    - acceleratorCount: 0
                      acceleratorType: string
                localSsds:
                    - diskSizeGb: 0
                      interface: string
                machineType: string
                minCpuPlatform: string
        specificReservationRequired: false
        zone: string
    

    Reservation 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 Reservation resource accepts the following input properties:

    SpecificReservation ReservationSpecificReservation
    Reservation for instances with specific machine shapes. Structure is documented below.
    Zone string
    The zone where the reservation is made.
    Description string
    An optional description of this resource.
    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
    ShareSettings ReservationShareSettings
    The share setting for reservations.
    SpecificReservationRequired bool
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    SpecificReservation ReservationSpecificReservationArgs
    Reservation for instances with specific machine shapes. Structure is documented below.
    Zone string
    The zone where the reservation is made.
    Description string
    An optional description of this resource.
    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
    ShareSettings ReservationShareSettingsArgs
    The share setting for reservations.
    SpecificReservationRequired bool
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    specificReservation ReservationSpecificReservation
    Reservation for instances with specific machine shapes. Structure is documented below.
    zone String
    The zone where the reservation is made.
    description String
    An optional description of this resource.
    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
    shareSettings ReservationShareSettings
    The share setting for reservations.
    specificReservationRequired Boolean
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    specificReservation ReservationSpecificReservation
    Reservation for instances with specific machine shapes. Structure is documented below.
    zone string
    The zone where the reservation is made.
    description string
    An optional description of this resource.
    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
    shareSettings ReservationShareSettings
    The share setting for reservations.
    specificReservationRequired boolean
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    specific_reservation ReservationSpecificReservationArgs
    Reservation for instances with specific machine shapes. Structure is documented below.
    zone str
    The zone where the reservation is made.
    description str
    An optional description of this resource.
    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
    share_settings ReservationShareSettingsArgs
    The share setting for reservations.
    specific_reservation_required bool
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    specificReservation Property Map
    Reservation for instances with specific machine shapes. Structure is documented below.
    zone String
    The zone where the reservation is made.
    description String
    An optional description of this resource.
    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
    shareSettings Property Map
    The share setting for reservations.
    specificReservationRequired Boolean
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Reservation resource produces the following output properties:

    Commitment string
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    Status string
    The status of the reservation.
    Commitment string
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    Status string
    The status of the reservation.
    commitment String
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    status String
    The status of the reservation.
    commitment string
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    id string
    The provider-assigned unique ID for this managed resource.
    selfLink string
    The URI of the created resource.
    status string
    The status of the reservation.
    commitment str
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    id str
    The provider-assigned unique ID for this managed resource.
    self_link str
    The URI of the created resource.
    status str
    The status of the reservation.
    commitment String
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    status String
    The status of the reservation.

    Look up Existing Reservation Resource

    Get an existing Reservation 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?: ReservationState, opts?: CustomResourceOptions): Reservation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            commitment: Optional[str] = None,
            creation_timestamp: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            self_link: Optional[str] = None,
            share_settings: Optional[ReservationShareSettingsArgs] = None,
            specific_reservation: Optional[ReservationSpecificReservationArgs] = None,
            specific_reservation_required: Optional[bool] = None,
            status: Optional[str] = None,
            zone: Optional[str] = None) -> Reservation
    func GetReservation(ctx *Context, name string, id IDInput, state *ReservationState, opts ...ResourceOption) (*Reservation, error)
    public static Reservation Get(string name, Input<string> id, ReservationState? state, CustomResourceOptions? opts = null)
    public static Reservation get(String name, Output<String> id, ReservationState 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:
    Commitment string
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional description of this resource.
    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
    SelfLink string
    The URI of the created resource.
    ShareSettings ReservationShareSettings
    The share setting for reservations.
    SpecificReservation ReservationSpecificReservation
    Reservation for instances with specific machine shapes. Structure is documented below.
    SpecificReservationRequired bool
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    Status string
    The status of the reservation.
    Zone string
    The zone where the reservation is made.
    Commitment string
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional description of this resource.
    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
    SelfLink string
    The URI of the created resource.
    ShareSettings ReservationShareSettingsArgs
    The share setting for reservations.
    SpecificReservation ReservationSpecificReservationArgs
    Reservation for instances with specific machine shapes. Structure is documented below.
    SpecificReservationRequired bool
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    Status string
    The status of the reservation.
    Zone string
    The zone where the reservation is made.
    commitment String
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional description of this resource.
    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
    selfLink String
    The URI of the created resource.
    shareSettings ReservationShareSettings
    The share setting for reservations.
    specificReservation ReservationSpecificReservation
    Reservation for instances with specific machine shapes. Structure is documented below.
    specificReservationRequired Boolean
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    status String
    The status of the reservation.
    zone String
    The zone where the reservation is made.
    commitment string
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    description string
    An optional description of this resource.
    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
    selfLink string
    The URI of the created resource.
    shareSettings ReservationShareSettings
    The share setting for reservations.
    specificReservation ReservationSpecificReservation
    Reservation for instances with specific machine shapes. Structure is documented below.
    specificReservationRequired boolean
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    status string
    The status of the reservation.
    zone string
    The zone where the reservation is made.
    commitment str
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    description str
    An optional description of this resource.
    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
    self_link str
    The URI of the created resource.
    share_settings ReservationShareSettingsArgs
    The share setting for reservations.
    specific_reservation ReservationSpecificReservationArgs
    Reservation for instances with specific machine shapes. Structure is documented below.
    specific_reservation_required bool
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    status str
    The status of the reservation.
    zone str
    The zone where the reservation is made.
    commitment String
    Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional description of this resource.
    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
    selfLink String
    The URI of the created resource.
    shareSettings Property Map
    The share setting for reservations.
    specificReservation Property Map
    Reservation for instances with specific machine shapes. Structure is documented below.
    specificReservationRequired Boolean
    When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
    status String
    The status of the reservation.
    zone String
    The zone where the reservation is made.

    Supporting Types

    ReservationShareSettings, ReservationShareSettingsArgs

    ProjectMaps List<ReservationShareSettingsProjectMap>
    A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
    ShareType string
    Type of sharing for this shared-reservation Possible values are: LOCAL, SPECIFIC_PROJECTS.
    ProjectMaps []ReservationShareSettingsProjectMap
    A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
    ShareType string
    Type of sharing for this shared-reservation Possible values are: LOCAL, SPECIFIC_PROJECTS.
    projectMaps List<ReservationShareSettingsProjectMap>
    A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
    shareType String
    Type of sharing for this shared-reservation Possible values are: LOCAL, SPECIFIC_PROJECTS.
    projectMaps ReservationShareSettingsProjectMap[]
    A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
    shareType string
    Type of sharing for this shared-reservation Possible values are: LOCAL, SPECIFIC_PROJECTS.
    project_maps Sequence[ReservationShareSettingsProjectMap]
    A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
    share_type str
    Type of sharing for this shared-reservation Possible values are: LOCAL, SPECIFIC_PROJECTS.
    projectMaps List<Property Map>
    A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
    shareType String
    Type of sharing for this shared-reservation Possible values are: LOCAL, SPECIFIC_PROJECTS.

    ReservationShareSettingsProjectMap, ReservationShareSettingsProjectMapArgs

    Id string
    The identifier for this object. Format specified above.
    ProjectId string
    The project id/number, should be same as the key of this project config in the project map.
    Id string
    The identifier for this object. Format specified above.
    ProjectId string
    The project id/number, should be same as the key of this project config in the project map.
    id String
    The identifier for this object. Format specified above.
    projectId String
    The project id/number, should be same as the key of this project config in the project map.
    id string
    The identifier for this object. Format specified above.
    projectId string
    The project id/number, should be same as the key of this project config in the project map.
    id str
    The identifier for this object. Format specified above.
    project_id str
    The project id/number, should be same as the key of this project config in the project map.
    id String
    The identifier for this object. Format specified above.
    projectId String
    The project id/number, should be same as the key of this project config in the project map.

    ReservationSpecificReservation, ReservationSpecificReservationArgs

    Count int
    The number of resources that are allocated.
    InstanceProperties ReservationSpecificReservationInstanceProperties
    The instance properties for the reservation. Structure is documented below.
    InUseCount int
    (Output) How many instances are in use.
    Count int
    The number of resources that are allocated.
    InstanceProperties ReservationSpecificReservationInstanceProperties
    The instance properties for the reservation. Structure is documented below.
    InUseCount int
    (Output) How many instances are in use.
    count Integer
    The number of resources that are allocated.
    instanceProperties ReservationSpecificReservationInstanceProperties
    The instance properties for the reservation. Structure is documented below.
    inUseCount Integer
    (Output) How many instances are in use.
    count number
    The number of resources that are allocated.
    instanceProperties ReservationSpecificReservationInstanceProperties
    The instance properties for the reservation. Structure is documented below.
    inUseCount number
    (Output) How many instances are in use.
    count int
    The number of resources that are allocated.
    instance_properties ReservationSpecificReservationInstanceProperties
    The instance properties for the reservation. Structure is documented below.
    in_use_count int
    (Output) How many instances are in use.
    count Number
    The number of resources that are allocated.
    instanceProperties Property Map
    The instance properties for the reservation. Structure is documented below.
    inUseCount Number
    (Output) How many instances are in use.

    ReservationSpecificReservationInstanceProperties, ReservationSpecificReservationInstancePropertiesArgs

    MachineType string
    The name of the machine type to reserve.
    GuestAccelerators List<ReservationSpecificReservationInstancePropertiesGuestAccelerator>
    Guest accelerator type and count. Structure is documented below.
    LocalSsds List<ReservationSpecificReservationInstancePropertiesLocalSsd>
    The amount of local ssd to reserve with each instance. This reserves disks of type local-ssd. Structure is documented below.
    MinCpuPlatform string
    The minimum CPU platform for the reservation. For example, "Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.
    MachineType string
    The name of the machine type to reserve.
    GuestAccelerators []ReservationSpecificReservationInstancePropertiesGuestAccelerator
    Guest accelerator type and count. Structure is documented below.
    LocalSsds []ReservationSpecificReservationInstancePropertiesLocalSsd
    The amount of local ssd to reserve with each instance. This reserves disks of type local-ssd. Structure is documented below.
    MinCpuPlatform string
    The minimum CPU platform for the reservation. For example, "Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.
    machineType String
    The name of the machine type to reserve.
    guestAccelerators List<ReservationSpecificReservationInstancePropertiesGuestAccelerator>
    Guest accelerator type and count. Structure is documented below.
    localSsds List<ReservationSpecificReservationInstancePropertiesLocalSsd>
    The amount of local ssd to reserve with each instance. This reserves disks of type local-ssd. Structure is documented below.
    minCpuPlatform String
    The minimum CPU platform for the reservation. For example, "Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.
    machineType string
    The name of the machine type to reserve.
    guestAccelerators ReservationSpecificReservationInstancePropertiesGuestAccelerator[]
    Guest accelerator type and count. Structure is documented below.
    localSsds ReservationSpecificReservationInstancePropertiesLocalSsd[]
    The amount of local ssd to reserve with each instance. This reserves disks of type local-ssd. Structure is documented below.
    minCpuPlatform string
    The minimum CPU platform for the reservation. For example, "Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.
    machine_type str
    The name of the machine type to reserve.
    guest_accelerators Sequence[ReservationSpecificReservationInstancePropertiesGuestAccelerator]
    Guest accelerator type and count. Structure is documented below.
    local_ssds Sequence[ReservationSpecificReservationInstancePropertiesLocalSsd]
    The amount of local ssd to reserve with each instance. This reserves disks of type local-ssd. Structure is documented below.
    min_cpu_platform str
    The minimum CPU platform for the reservation. For example, "Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.
    machineType String
    The name of the machine type to reserve.
    guestAccelerators List<Property Map>
    Guest accelerator type and count. Structure is documented below.
    localSsds List<Property Map>
    The amount of local ssd to reserve with each instance. This reserves disks of type local-ssd. Structure is documented below.
    minCpuPlatform String
    The minimum CPU platform for the reservation. For example, "Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.

    ReservationSpecificReservationInstancePropertiesGuestAccelerator, ReservationSpecificReservationInstancePropertiesGuestAcceleratorArgs

    AcceleratorCount int
    The number of the guest accelerator cards exposed to this instance.
    AcceleratorType string
    The full or partial URL of the accelerator type to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name.
    AcceleratorCount int
    The number of the guest accelerator cards exposed to this instance.
    AcceleratorType string
    The full or partial URL of the accelerator type to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name.
    acceleratorCount Integer
    The number of the guest accelerator cards exposed to this instance.
    acceleratorType String
    The full or partial URL of the accelerator type to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name.
    acceleratorCount number
    The number of the guest accelerator cards exposed to this instance.
    acceleratorType string
    The full or partial URL of the accelerator type to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name.
    accelerator_count int
    The number of the guest accelerator cards exposed to this instance.
    accelerator_type str
    The full or partial URL of the accelerator type to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name.
    acceleratorCount Number
    The number of the guest accelerator cards exposed to this instance.
    acceleratorType String
    The full or partial URL of the accelerator type to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name.

    ReservationSpecificReservationInstancePropertiesLocalSsd, ReservationSpecificReservationInstancePropertiesLocalSsdArgs

    DiskSizeGb int
    The size of the disk in base-2 GB.


    Interface string
    The disk interface to use for attaching this disk. Default value is SCSI. Possible values are: SCSI, NVME.
    DiskSizeGb int
    The size of the disk in base-2 GB.


    Interface string
    The disk interface to use for attaching this disk. Default value is SCSI. Possible values are: SCSI, NVME.
    diskSizeGb Integer
    The size of the disk in base-2 GB.


    interface_ String
    The disk interface to use for attaching this disk. Default value is SCSI. Possible values are: SCSI, NVME.
    diskSizeGb number
    The size of the disk in base-2 GB.


    interface string
    The disk interface to use for attaching this disk. Default value is SCSI. Possible values are: SCSI, NVME.
    disk_size_gb int
    The size of the disk in base-2 GB.


    interface str
    The disk interface to use for attaching this disk. Default value is SCSI. Possible values are: SCSI, NVME.
    diskSizeGb Number
    The size of the disk in base-2 GB.


    interface String
    The disk interface to use for attaching this disk. Default value is SCSI. Possible values are: SCSI, NVME.

    Import

    Reservation can be imported using any of these accepted formats:

    • projects/{{project}}/zones/{{zone}}/reservations/{{name}}

    • {{project}}/{{zone}}/{{name}}

    • {{zone}}/{{name}}

    • {{name}}

    When using the pulumi import command, Reservation can be imported using one of the formats above. For example:

    $ pulumi import gcp:compute/reservation:Reservation default projects/{{project}}/zones/{{zone}}/reservations/{{name}}
    
    $ pulumi import gcp:compute/reservation:Reservation default {{project}}/{{zone}}/{{name}}
    
    $ pulumi import gcp:compute/reservation:Reservation default {{zone}}/{{name}}
    
    $ pulumi import gcp:compute/reservation:Reservation 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.3.1 published on Wednesday, Sep 25, 2024 by Pulumi