gcp.compute.Reservation
Explore with Pulumi AI
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:
- API documentation
- How-to Guides
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,
"instance_properties": {
"machine_type": "string",
"guest_accelerators": [{
"accelerator_count": 0,
"accelerator_type": "string",
}],
"local_ssds": [{
"disk_size_gb": 0,
"interface": "string",
}],
"min_cpu_platform": "string",
},
"in_use_count": 0,
},
zone="string",
description="string",
name="string",
project="string",
share_settings={
"project_maps": [{
"id": "string",
"project_id": "string",
}],
"share_type": "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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Reservation resource accepts the following input properties:
- Specific
Reservation ReservationSpecific Reservation - 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
- Reservation
Share Settings - The share setting for reservations.
- Specific
Reservation boolRequired - 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 ReservationSpecific Reservation Args - 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
- Reservation
Share Settings Args - The share setting for reservations.
- Specific
Reservation boolRequired - 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 ReservationSpecific Reservation - 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
- Reservation
Share Settings - The share setting for reservations.
- specific
Reservation BooleanRequired - 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 ReservationSpecific Reservation - 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
- Reservation
Share Settings - The share setting for reservations.
- specific
Reservation booleanRequired - 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 ReservationSpecific Reservation Args - 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
- Reservation
Share Settings Args - The share setting for reservations.
- specific_
reservation_ boolrequired - 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 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
- Property Map
- The share setting for reservations.
- specific
Reservation BooleanRequired - 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.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link 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.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link 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.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Link 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.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- id string
- The provider-assigned unique ID for this managed resource.
- self
Link 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.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Link 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.
- Commitment string
- Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
- Creation
Timestamp 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
- Self
Link string - The URI of the created resource.
- Reservation
Share Settings - The share setting for reservations.
- Specific
Reservation ReservationSpecific Reservation - Reservation for instances with specific machine shapes. Structure is documented below.
- Specific
Reservation boolRequired - 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.
- Creation
Timestamp 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
- Self
Link string - The URI of the created resource.
- Reservation
Share Settings Args - The share setting for reservations.
- Specific
Reservation ReservationSpecific Reservation Args - Reservation for instances with specific machine shapes. Structure is documented below.
- Specific
Reservation boolRequired - 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.
- creation
Timestamp 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
- self
Link String - The URI of the created resource.
- Reservation
Share Settings - The share setting for reservations.
- specific
Reservation ReservationSpecific Reservation - Reservation for instances with specific machine shapes. Structure is documented below.
- specific
Reservation BooleanRequired - 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.
- creation
Timestamp 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
- self
Link string - The URI of the created resource.
- Reservation
Share Settings - The share setting for reservations.
- specific
Reservation ReservationSpecific Reservation - Reservation for instances with specific machine shapes. Structure is documented below.
- specific
Reservation booleanRequired - 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.
- Reservation
Share Settings Args - The share setting for reservations.
- specific_
reservation ReservationSpecific Reservation Args - Reservation for instances with specific machine shapes. Structure is documented below.
- specific_
reservation_ boolrequired - 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.
- creation
Timestamp 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
- self
Link String - The URI of the created resource.
- Property Map
- The share setting for reservations.
- specific
Reservation Property Map - Reservation for instances with specific machine shapes. Structure is documented below.
- specific
Reservation BooleanRequired - 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
- Project
Maps List<ReservationShare Settings Project Map> - A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
- string
- Type of sharing for this shared-reservation
Possible values are:
LOCAL
,SPECIFIC_PROJECTS
.
- Project
Maps []ReservationShare Settings Project Map - A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
- string
- Type of sharing for this shared-reservation
Possible values are:
LOCAL
,SPECIFIC_PROJECTS
.
- project
Maps List<ReservationShare Settings Project Map> - A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
- String
- Type of sharing for this shared-reservation
Possible values are:
LOCAL
,SPECIFIC_PROJECTS
.
- project
Maps ReservationShare Settings Project Map[] - A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
- string
- Type of sharing for this shared-reservation
Possible values are:
LOCAL
,SPECIFIC_PROJECTS
.
- project_
maps Sequence[ReservationShare Settings Project Map] - A map of project number and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. Structure is documented below.
- str
- Type of sharing for this shared-reservation
Possible values are:
LOCAL
,SPECIFIC_PROJECTS
.
- project
Maps 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.
- String
- Type of sharing for this shared-reservation
Possible values are:
LOCAL
,SPECIFIC_PROJECTS
.
ReservationShareSettingsProjectMap, ReservationShareSettingsProjectMapArgs
- 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.
ReservationSpecificReservation, ReservationSpecificReservationArgs
- Count int
- The number of resources that are allocated.
- Instance
Properties ReservationSpecific Reservation Instance Properties - The instance properties for the reservation. Structure is documented below.
- In
Use intCount - (Output) How many instances are in use.
- Count int
- The number of resources that are allocated.
- Instance
Properties ReservationSpecific Reservation Instance Properties - The instance properties for the reservation. Structure is documented below.
- In
Use intCount - (Output) How many instances are in use.
- count Integer
- The number of resources that are allocated.
- instance
Properties ReservationSpecific Reservation Instance Properties - The instance properties for the reservation. Structure is documented below.
- in
Use IntegerCount - (Output) How many instances are in use.
- count number
- The number of resources that are allocated.
- instance
Properties ReservationSpecific Reservation Instance Properties - The instance properties for the reservation. Structure is documented below.
- in
Use numberCount - (Output) How many instances are in use.
- count int
- The number of resources that are allocated.
- instance_
properties ReservationSpecific Reservation Instance Properties - The instance properties for the reservation. Structure is documented below.
- in_
use_ intcount - (Output) How many instances are in use.
- count Number
- The number of resources that are allocated.
- instance
Properties Property Map - The instance properties for the reservation. Structure is documented below.
- in
Use NumberCount - (Output) How many instances are in use.
ReservationSpecificReservationInstanceProperties, ReservationSpecificReservationInstancePropertiesArgs
- Machine
Type string - The name of the machine type to reserve.
- Guest
Accelerators List<ReservationSpecific Reservation Instance Properties Guest Accelerator> - Guest accelerator type and count. Structure is documented below.
- Local
Ssds List<ReservationSpecific Reservation Instance Properties Local Ssd> - The amount of local ssd to reserve with each instance. This
reserves disks of type
local-ssd
. Structure is documented below. - Min
Cpu stringPlatform - 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 string - The name of the machine type to reserve.
- Guest
Accelerators []ReservationSpecific Reservation Instance Properties Guest Accelerator - Guest accelerator type and count. Structure is documented below.
- Local
Ssds []ReservationSpecific Reservation Instance Properties Local Ssd - The amount of local ssd to reserve with each instance. This
reserves disks of type
local-ssd
. Structure is documented below. - Min
Cpu stringPlatform - 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 String - The name of the machine type to reserve.
- guest
Accelerators List<ReservationSpecific Reservation Instance Properties Guest Accelerator> - Guest accelerator type and count. Structure is documented below.
- local
Ssds List<ReservationSpecific Reservation Instance Properties Local Ssd> - The amount of local ssd to reserve with each instance. This
reserves disks of type
local-ssd
. Structure is documented below. - min
Cpu StringPlatform - 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 string - The name of the machine type to reserve.
- guest
Accelerators ReservationSpecific Reservation Instance Properties Guest Accelerator[] - Guest accelerator type and count. Structure is documented below.
- local
Ssds ReservationSpecific Reservation Instance Properties Local Ssd[] - The amount of local ssd to reserve with each instance. This
reserves disks of type
local-ssd
. Structure is documented below. - min
Cpu stringPlatform - 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[ReservationSpecific Reservation Instance Properties Guest Accelerator] - Guest accelerator type and count. Structure is documented below.
- local_
ssds Sequence[ReservationSpecific Reservation Instance Properties Local Ssd] - The amount of local ssd to reserve with each instance. This
reserves disks of type
local-ssd
. Structure is documented below. - min_
cpu_ strplatform - 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 String - The name of the machine type to reserve.
- guest
Accelerators List<Property Map> - Guest accelerator type and count. Structure is documented below.
- local
Ssds List<Property Map> - The amount of local ssd to reserve with each instance. This
reserves disks of type
local-ssd
. Structure is documented below. - min
Cpu StringPlatform - 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
- Accelerator
Count int - The number of the guest accelerator cards exposed to this instance.
- Accelerator
Type 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 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 Integer - The number of the guest accelerator cards exposed to this instance.
- accelerator
Type 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 number - The number of the guest accelerator cards exposed to this instance.
- accelerator
Type 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.
- accelerator
Count Number - The number of the guest accelerator cards exposed to this instance.
- accelerator
Type 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
- Disk
Size intGb - 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 intGb - 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 IntegerGb - 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 numberGb - 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_ intgb - 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
.
- disk
Size NumberGb - 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.