gcp.compute.Reservation
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/v9/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
Reservation Basic Beta
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",
            maintenanceInterval: "PERIODIC",
        },
    },
    enableEmergentMaintenance: true,
});
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",
            "maintenance_interval": "PERIODIC",
        },
    },
    enable_emergent_maintenance=True)
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/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"),
					MaintenanceInterval: pulumi.String("PERIODIC"),
				},
			},
			EnableEmergentMaintenance: pulumi.Bool(true),
		})
		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",
                MaintenanceInterval = "PERIODIC",
            },
        },
        EnableEmergentMaintenance = true,
    });
});
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")
                    .maintenanceInterval("PERIODIC")
                    .build())
                .build())
            .enableEmergentMaintenance(true)
            .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
          maintenanceInterval: PERIODIC
      enableEmergentMaintenance: true
Reservation Source Instance Template
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myImage = gcp.compute.getImage({
    family: "debian-11",
    project: "debian-cloud",
});
const foobar = new gcp.compute.InstanceTemplate("foobar", {
    name: "instance-template",
    machineType: "n2-standard-2",
    canIpForward: false,
    tags: [
        "foo",
        "bar",
    ],
    disks: [{
        sourceImage: myImage.then(myImage => myImage.selfLink),
        autoDelete: true,
        boot: true,
    }],
    networkInterfaces: [{
        network: "default",
    }],
    scheduling: {
        preemptible: false,
        automaticRestart: true,
    },
    metadata: {
        foo: "bar",
    },
    serviceAccount: {
        scopes: [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
    labels: {
        my_label: "foobar",
    },
});
const gceReservationSourceInstanceTemplate = new gcp.compute.Reservation("gce_reservation_source_instance_template", {
    name: "gce-reservation-source-instance-template",
    zone: "us-central1-a",
    specificReservation: {
        count: 1,
        sourceInstanceTemplate: foobar.selfLink,
    },
});
import pulumi
import pulumi_gcp as gcp
my_image = gcp.compute.get_image(family="debian-11",
    project="debian-cloud")
foobar = gcp.compute.InstanceTemplate("foobar",
    name="instance-template",
    machine_type="n2-standard-2",
    can_ip_forward=False,
    tags=[
        "foo",
        "bar",
    ],
    disks=[{
        "source_image": my_image.self_link,
        "auto_delete": True,
        "boot": True,
    }],
    network_interfaces=[{
        "network": "default",
    }],
    scheduling={
        "preemptible": False,
        "automatic_restart": True,
    },
    metadata={
        "foo": "bar",
    },
    service_account={
        "scopes": [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
    labels={
        "my_label": "foobar",
    })
gce_reservation_source_instance_template = gcp.compute.Reservation("gce_reservation_source_instance_template",
    name="gce-reservation-source-instance-template",
    zone="us-central1-a",
    specific_reservation={
        "count": 1,
        "source_instance_template": foobar.self_link,
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myImage, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
			Family:  pulumi.StringRef("debian-11"),
			Project: pulumi.StringRef("debian-cloud"),
		}, nil)
		if err != nil {
			return err
		}
		foobar, err := compute.NewInstanceTemplate(ctx, "foobar", &compute.InstanceTemplateArgs{
			Name:         pulumi.String("instance-template"),
			MachineType:  pulumi.String("n2-standard-2"),
			CanIpForward: pulumi.Bool(false),
			Tags: pulumi.StringArray{
				pulumi.String("foo"),
				pulumi.String("bar"),
			},
			Disks: compute.InstanceTemplateDiskArray{
				&compute.InstanceTemplateDiskArgs{
					SourceImage: pulumi.String(myImage.SelfLink),
					AutoDelete:  pulumi.Bool(true),
					Boot:        pulumi.Bool(true),
				},
			},
			NetworkInterfaces: compute.InstanceTemplateNetworkInterfaceArray{
				&compute.InstanceTemplateNetworkInterfaceArgs{
					Network: pulumi.String("default"),
				},
			},
			Scheduling: &compute.InstanceTemplateSchedulingArgs{
				Preemptible:      pulumi.Bool(false),
				AutomaticRestart: pulumi.Bool(true),
			},
			Metadata: pulumi.StringMap{
				"foo": pulumi.String("bar"),
			},
			ServiceAccount: &compute.InstanceTemplateServiceAccountArgs{
				Scopes: pulumi.StringArray{
					pulumi.String("userinfo-email"),
					pulumi.String("compute-ro"),
					pulumi.String("storage-ro"),
				},
			},
			Labels: pulumi.StringMap{
				"my_label": pulumi.String("foobar"),
			},
		})
		if err != nil {
			return err
		}
		_, err = compute.NewReservation(ctx, "gce_reservation_source_instance_template", &compute.ReservationArgs{
			Name: pulumi.String("gce-reservation-source-instance-template"),
			Zone: pulumi.String("us-central1-a"),
			SpecificReservation: &compute.ReservationSpecificReservationArgs{
				Count:                  pulumi.Int(1),
				SourceInstanceTemplate: foobar.SelfLink,
			},
		})
		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 myImage = Gcp.Compute.GetImage.Invoke(new()
    {
        Family = "debian-11",
        Project = "debian-cloud",
    });
    var foobar = new Gcp.Compute.InstanceTemplate("foobar", new()
    {
        Name = "instance-template",
        MachineType = "n2-standard-2",
        CanIpForward = false,
        Tags = new[]
        {
            "foo",
            "bar",
        },
        Disks = new[]
        {
            new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
            {
                SourceImage = myImage.Apply(getImageResult => getImageResult.SelfLink),
                AutoDelete = true,
                Boot = true,
            },
        },
        NetworkInterfaces = new[]
        {
            new Gcp.Compute.Inputs.InstanceTemplateNetworkInterfaceArgs
            {
                Network = "default",
            },
        },
        Scheduling = new Gcp.Compute.Inputs.InstanceTemplateSchedulingArgs
        {
            Preemptible = false,
            AutomaticRestart = true,
        },
        Metadata = 
        {
            { "foo", "bar" },
        },
        ServiceAccount = new Gcp.Compute.Inputs.InstanceTemplateServiceAccountArgs
        {
            Scopes = new[]
            {
                "userinfo-email",
                "compute-ro",
                "storage-ro",
            },
        },
        Labels = 
        {
            { "my_label", "foobar" },
        },
    });
    var gceReservationSourceInstanceTemplate = new Gcp.Compute.Reservation("gce_reservation_source_instance_template", new()
    {
        Name = "gce-reservation-source-instance-template",
        Zone = "us-central1-a",
        SpecificReservation = new Gcp.Compute.Inputs.ReservationSpecificReservationArgs
        {
            Count = 1,
            SourceInstanceTemplate = foobar.SelfLink,
        },
    });
});
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.InstanceTemplate;
import com.pulumi.gcp.compute.InstanceTemplateArgs;
import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
import com.pulumi.gcp.compute.inputs.InstanceTemplateSchedulingArgs;
import com.pulumi.gcp.compute.inputs.InstanceTemplateServiceAccountArgs;
import com.pulumi.gcp.compute.Reservation;
import com.pulumi.gcp.compute.ReservationArgs;
import com.pulumi.gcp.compute.inputs.ReservationSpecificReservationArgs;
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 myImage = ComputeFunctions.getImage(GetImageArgs.builder()
            .family("debian-11")
            .project("debian-cloud")
            .build());
        var foobar = new InstanceTemplate("foobar", InstanceTemplateArgs.builder()
            .name("instance-template")
            .machineType("n2-standard-2")
            .canIpForward(false)
            .tags(            
                "foo",
                "bar")
            .disks(InstanceTemplateDiskArgs.builder()
                .sourceImage(myImage.selfLink())
                .autoDelete(true)
                .boot(true)
                .build())
            .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
                .network("default")
                .build())
            .scheduling(InstanceTemplateSchedulingArgs.builder()
                .preemptible(false)
                .automaticRestart(true)
                .build())
            .metadata(Map.of("foo", "bar"))
            .serviceAccount(InstanceTemplateServiceAccountArgs.builder()
                .scopes(                
                    "userinfo-email",
                    "compute-ro",
                    "storage-ro")
                .build())
            .labels(Map.of("my_label", "foobar"))
            .build());
        var gceReservationSourceInstanceTemplate = new Reservation("gceReservationSourceInstanceTemplate", ReservationArgs.builder()
            .name("gce-reservation-source-instance-template")
            .zone("us-central1-a")
            .specificReservation(ReservationSpecificReservationArgs.builder()
                .count(1)
                .sourceInstanceTemplate(foobar.selfLink())
                .build())
            .build());
    }
}
resources:
  foobar:
    type: gcp:compute:InstanceTemplate
    properties:
      name: instance-template
      machineType: n2-standard-2
      canIpForward: false
      tags:
        - foo
        - bar
      disks:
        - sourceImage: ${myImage.selfLink}
          autoDelete: true
          boot: true
      networkInterfaces:
        - network: default
      scheduling:
        preemptible: false
        automaticRestart: true
      metadata:
        foo: bar
      serviceAccount:
        scopes:
          - userinfo-email
          - compute-ro
          - storage-ro
      labels:
        my_label: foobar
  gceReservationSourceInstanceTemplate:
    type: gcp:compute:Reservation
    name: gce_reservation_source_instance_template
    properties:
      name: gce-reservation-source-instance-template
      zone: us-central1-a
      specificReservation:
        count: 1
        sourceInstanceTemplate: ${foobar.selfLink}
variables:
  myImage:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-11
        project: debian-cloud
Reservation Sharing Policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myImage = gcp.compute.getImage({
    family: "debian-11",
    project: "debian-cloud",
});
const foobar = new gcp.compute.InstanceTemplate("foobar", {
    name: "instance-template",
    machineType: "g2-standard-4",
    canIpForward: false,
    tags: [
        "foo",
        "bar",
    ],
    disks: [{
        sourceImage: myImage.then(myImage => myImage.selfLink),
        autoDelete: true,
        boot: true,
    }],
    networkInterfaces: [{
        network: "default",
    }],
    scheduling: {
        preemptible: false,
        automaticRestart: true,
    },
    metadata: {
        foo: "bar",
    },
    serviceAccount: {
        scopes: [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
    labels: {
        my_label: "foobar",
    },
});
const gceReservationSharingPolicy = new gcp.compute.Reservation("gce_reservation_sharing_policy", {
    name: "gce-reservation-sharing-policy",
    zone: "us-central1-b",
    specificReservation: {
        count: 2,
        sourceInstanceTemplate: foobar.selfLink,
    },
    reservationSharingPolicy: {
        serviceShareType: "ALLOW_ALL",
    },
});
import pulumi
import pulumi_gcp as gcp
my_image = gcp.compute.get_image(family="debian-11",
    project="debian-cloud")
foobar = gcp.compute.InstanceTemplate("foobar",
    name="instance-template",
    machine_type="g2-standard-4",
    can_ip_forward=False,
    tags=[
        "foo",
        "bar",
    ],
    disks=[{
        "source_image": my_image.self_link,
        "auto_delete": True,
        "boot": True,
    }],
    network_interfaces=[{
        "network": "default",
    }],
    scheduling={
        "preemptible": False,
        "automatic_restart": True,
    },
    metadata={
        "foo": "bar",
    },
    service_account={
        "scopes": [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
    labels={
        "my_label": "foobar",
    })
gce_reservation_sharing_policy = gcp.compute.Reservation("gce_reservation_sharing_policy",
    name="gce-reservation-sharing-policy",
    zone="us-central1-b",
    specific_reservation={
        "count": 2,
        "source_instance_template": foobar.self_link,
    },
    reservation_sharing_policy={
        "service_share_type": "ALLOW_ALL",
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myImage, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
			Family:  pulumi.StringRef("debian-11"),
			Project: pulumi.StringRef("debian-cloud"),
		}, nil)
		if err != nil {
			return err
		}
		foobar, err := compute.NewInstanceTemplate(ctx, "foobar", &compute.InstanceTemplateArgs{
			Name:         pulumi.String("instance-template"),
			MachineType:  pulumi.String("g2-standard-4"),
			CanIpForward: pulumi.Bool(false),
			Tags: pulumi.StringArray{
				pulumi.String("foo"),
				pulumi.String("bar"),
			},
			Disks: compute.InstanceTemplateDiskArray{
				&compute.InstanceTemplateDiskArgs{
					SourceImage: pulumi.String(myImage.SelfLink),
					AutoDelete:  pulumi.Bool(true),
					Boot:        pulumi.Bool(true),
				},
			},
			NetworkInterfaces: compute.InstanceTemplateNetworkInterfaceArray{
				&compute.InstanceTemplateNetworkInterfaceArgs{
					Network: pulumi.String("default"),
				},
			},
			Scheduling: &compute.InstanceTemplateSchedulingArgs{
				Preemptible:      pulumi.Bool(false),
				AutomaticRestart: pulumi.Bool(true),
			},
			Metadata: pulumi.StringMap{
				"foo": pulumi.String("bar"),
			},
			ServiceAccount: &compute.InstanceTemplateServiceAccountArgs{
				Scopes: pulumi.StringArray{
					pulumi.String("userinfo-email"),
					pulumi.String("compute-ro"),
					pulumi.String("storage-ro"),
				},
			},
			Labels: pulumi.StringMap{
				"my_label": pulumi.String("foobar"),
			},
		})
		if err != nil {
			return err
		}
		_, err = compute.NewReservation(ctx, "gce_reservation_sharing_policy", &compute.ReservationArgs{
			Name: pulumi.String("gce-reservation-sharing-policy"),
			Zone: pulumi.String("us-central1-b"),
			SpecificReservation: &compute.ReservationSpecificReservationArgs{
				Count:                  pulumi.Int(2),
				SourceInstanceTemplate: foobar.SelfLink,
			},
			ReservationSharingPolicy: &compute.ReservationReservationSharingPolicyArgs{
				ServiceShareType: pulumi.String("ALLOW_ALL"),
			},
		})
		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 myImage = Gcp.Compute.GetImage.Invoke(new()
    {
        Family = "debian-11",
        Project = "debian-cloud",
    });
    var foobar = new Gcp.Compute.InstanceTemplate("foobar", new()
    {
        Name = "instance-template",
        MachineType = "g2-standard-4",
        CanIpForward = false,
        Tags = new[]
        {
            "foo",
            "bar",
        },
        Disks = new[]
        {
            new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
            {
                SourceImage = myImage.Apply(getImageResult => getImageResult.SelfLink),
                AutoDelete = true,
                Boot = true,
            },
        },
        NetworkInterfaces = new[]
        {
            new Gcp.Compute.Inputs.InstanceTemplateNetworkInterfaceArgs
            {
                Network = "default",
            },
        },
        Scheduling = new Gcp.Compute.Inputs.InstanceTemplateSchedulingArgs
        {
            Preemptible = false,
            AutomaticRestart = true,
        },
        Metadata = 
        {
            { "foo", "bar" },
        },
        ServiceAccount = new Gcp.Compute.Inputs.InstanceTemplateServiceAccountArgs
        {
            Scopes = new[]
            {
                "userinfo-email",
                "compute-ro",
                "storage-ro",
            },
        },
        Labels = 
        {
            { "my_label", "foobar" },
        },
    });
    var gceReservationSharingPolicy = new Gcp.Compute.Reservation("gce_reservation_sharing_policy", new()
    {
        Name = "gce-reservation-sharing-policy",
        Zone = "us-central1-b",
        SpecificReservation = new Gcp.Compute.Inputs.ReservationSpecificReservationArgs
        {
            Count = 2,
            SourceInstanceTemplate = foobar.SelfLink,
        },
        ReservationSharingPolicy = new Gcp.Compute.Inputs.ReservationReservationSharingPolicyArgs
        {
            ServiceShareType = "ALLOW_ALL",
        },
    });
});
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.InstanceTemplate;
import com.pulumi.gcp.compute.InstanceTemplateArgs;
import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
import com.pulumi.gcp.compute.inputs.InstanceTemplateSchedulingArgs;
import com.pulumi.gcp.compute.inputs.InstanceTemplateServiceAccountArgs;
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.ReservationReservationSharingPolicyArgs;
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 myImage = ComputeFunctions.getImage(GetImageArgs.builder()
            .family("debian-11")
            .project("debian-cloud")
            .build());
        var foobar = new InstanceTemplate("foobar", InstanceTemplateArgs.builder()
            .name("instance-template")
            .machineType("g2-standard-4")
            .canIpForward(false)
            .tags(            
                "foo",
                "bar")
            .disks(InstanceTemplateDiskArgs.builder()
                .sourceImage(myImage.selfLink())
                .autoDelete(true)
                .boot(true)
                .build())
            .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
                .network("default")
                .build())
            .scheduling(InstanceTemplateSchedulingArgs.builder()
                .preemptible(false)
                .automaticRestart(true)
                .build())
            .metadata(Map.of("foo", "bar"))
            .serviceAccount(InstanceTemplateServiceAccountArgs.builder()
                .scopes(                
                    "userinfo-email",
                    "compute-ro",
                    "storage-ro")
                .build())
            .labels(Map.of("my_label", "foobar"))
            .build());
        var gceReservationSharingPolicy = new Reservation("gceReservationSharingPolicy", ReservationArgs.builder()
            .name("gce-reservation-sharing-policy")
            .zone("us-central1-b")
            .specificReservation(ReservationSpecificReservationArgs.builder()
                .count(2)
                .sourceInstanceTemplate(foobar.selfLink())
                .build())
            .reservationSharingPolicy(ReservationReservationSharingPolicyArgs.builder()
                .serviceShareType("ALLOW_ALL")
                .build())
            .build());
    }
}
resources:
  foobar:
    type: gcp:compute:InstanceTemplate
    properties:
      name: instance-template
      machineType: g2-standard-4
      canIpForward: false
      tags:
        - foo
        - bar
      disks:
        - sourceImage: ${myImage.selfLink}
          autoDelete: true
          boot: true
      networkInterfaces:
        - network: default
      scheduling:
        preemptible: false
        automaticRestart: true
      metadata:
        foo: bar
      serviceAccount:
        scopes:
          - userinfo-email
          - compute-ro
          - storage-ro
      labels:
        my_label: foobar
  gceReservationSharingPolicy:
    type: gcp:compute:Reservation
    name: gce_reservation_sharing_policy
    properties:
      name: gce-reservation-sharing-policy
      zone: us-central1-b
      specificReservation:
        count: 2
        sourceInstanceTemplate: ${foobar.selfLink}
      reservationSharingPolicy:
        serviceShareType: ALLOW_ALL
variables:
  myImage:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-11
        project: debian-cloud
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,
                delete_after_duration: Optional[ReservationDeleteAfterDurationArgs] = None,
                delete_at_time: Optional[str] = None,
                description: Optional[str] = None,
                enable_emergent_maintenance: Optional[bool] = None,
                name: Optional[str] = None,
                project: Optional[str] = None,
                reservation_sharing_policy: Optional[ReservationReservationSharingPolicyArgs] = 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,
        InUseCount = 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",
                },
            },
            MaintenanceInterval = "string",
            MinCpuPlatform = "string",
        },
        SourceInstanceTemplate = "string",
    },
    Zone = "string",
    DeleteAfterDuration = new Gcp.Compute.Inputs.ReservationDeleteAfterDurationArgs
    {
        Nanos = 0,
        Seconds = "string",
    },
    DeleteAtTime = "string",
    Description = "string",
    EnableEmergentMaintenance = false,
    Name = "string",
    Project = "string",
    ReservationSharingPolicy = new Gcp.Compute.Inputs.ReservationReservationSharingPolicyArgs
    {
        ServiceShareType = "string",
    },
    ShareSettings = new Gcp.Compute.Inputs.ReservationShareSettingsArgs
    {
        ProjectMaps = new[]
        {
            new Gcp.Compute.Inputs.ReservationShareSettingsProjectMapArgs
            {
                Id = "string",
                ProjectId = "string",
            },
        },
        Projects = new[]
        {
            "string",
        },
        ShareType = "string",
    },
    SpecificReservationRequired = false,
});
example, err := compute.NewReservation(ctx, "gcpReservationResource", &compute.ReservationArgs{
	SpecificReservation: &compute.ReservationSpecificReservationArgs{
		Count:      pulumi.Int(0),
		InUseCount: 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"),
				},
			},
			MaintenanceInterval: pulumi.String("string"),
			MinCpuPlatform:      pulumi.String("string"),
		},
		SourceInstanceTemplate: pulumi.String("string"),
	},
	Zone: pulumi.String("string"),
	DeleteAfterDuration: &compute.ReservationDeleteAfterDurationArgs{
		Nanos:   pulumi.Int(0),
		Seconds: pulumi.String("string"),
	},
	DeleteAtTime:              pulumi.String("string"),
	Description:               pulumi.String("string"),
	EnableEmergentMaintenance: pulumi.Bool(false),
	Name:                      pulumi.String("string"),
	Project:                   pulumi.String("string"),
	ReservationSharingPolicy: &compute.ReservationReservationSharingPolicyArgs{
		ServiceShareType: pulumi.String("string"),
	},
	ShareSettings: &compute.ReservationShareSettingsArgs{
		ProjectMaps: compute.ReservationShareSettingsProjectMapArray{
			&compute.ReservationShareSettingsProjectMapArgs{
				Id:        pulumi.String("string"),
				ProjectId: pulumi.String("string"),
			},
		},
		Projects: pulumi.StringArray{
			pulumi.String("string"),
		},
		ShareType: pulumi.String("string"),
	},
	SpecificReservationRequired: pulumi.Bool(false),
})
var gcpReservationResource = new com.pulumi.gcp.compute.Reservation("gcpReservationResource", com.pulumi.gcp.compute.ReservationArgs.builder()
    .specificReservation(ReservationSpecificReservationArgs.builder()
        .count(0)
        .inUseCount(0)
        .instanceProperties(ReservationSpecificReservationInstancePropertiesArgs.builder()
            .machineType("string")
            .guestAccelerators(ReservationSpecificReservationInstancePropertiesGuestAcceleratorArgs.builder()
                .acceleratorCount(0)
                .acceleratorType("string")
                .build())
            .localSsds(ReservationSpecificReservationInstancePropertiesLocalSsdArgs.builder()
                .diskSizeGb(0)
                .interface_("string")
                .build())
            .maintenanceInterval("string")
            .minCpuPlatform("string")
            .build())
        .sourceInstanceTemplate("string")
        .build())
    .zone("string")
    .deleteAfterDuration(ReservationDeleteAfterDurationArgs.builder()
        .nanos(0)
        .seconds("string")
        .build())
    .deleteAtTime("string")
    .description("string")
    .enableEmergentMaintenance(false)
    .name("string")
    .project("string")
    .reservationSharingPolicy(ReservationReservationSharingPolicyArgs.builder()
        .serviceShareType("string")
        .build())
    .shareSettings(ReservationShareSettingsArgs.builder()
        .projectMaps(ReservationShareSettingsProjectMapArgs.builder()
            .id("string")
            .projectId("string")
            .build())
        .projects("string")
        .shareType("string")
        .build())
    .specificReservationRequired(false)
    .build());
gcp_reservation_resource = gcp.compute.Reservation("gcpReservationResource",
    specific_reservation={
        "count": 0,
        "in_use_count": 0,
        "instance_properties": {
            "machine_type": "string",
            "guest_accelerators": [{
                "accelerator_count": 0,
                "accelerator_type": "string",
            }],
            "local_ssds": [{
                "disk_size_gb": 0,
                "interface": "string",
            }],
            "maintenance_interval": "string",
            "min_cpu_platform": "string",
        },
        "source_instance_template": "string",
    },
    zone="string",
    delete_after_duration={
        "nanos": 0,
        "seconds": "string",
    },
    delete_at_time="string",
    description="string",
    enable_emergent_maintenance=False,
    name="string",
    project="string",
    reservation_sharing_policy={
        "service_share_type": "string",
    },
    share_settings={
        "project_maps": [{
            "id": "string",
            "project_id": "string",
        }],
        "projects": ["string"],
        "share_type": "string",
    },
    specific_reservation_required=False)
const gcpReservationResource = new gcp.compute.Reservation("gcpReservationResource", {
    specificReservation: {
        count: 0,
        inUseCount: 0,
        instanceProperties: {
            machineType: "string",
            guestAccelerators: [{
                acceleratorCount: 0,
                acceleratorType: "string",
            }],
            localSsds: [{
                diskSizeGb: 0,
                "interface": "string",
            }],
            maintenanceInterval: "string",
            minCpuPlatform: "string",
        },
        sourceInstanceTemplate: "string",
    },
    zone: "string",
    deleteAfterDuration: {
        nanos: 0,
        seconds: "string",
    },
    deleteAtTime: "string",
    description: "string",
    enableEmergentMaintenance: false,
    name: "string",
    project: "string",
    reservationSharingPolicy: {
        serviceShareType: "string",
    },
    shareSettings: {
        projectMaps: [{
            id: "string",
            projectId: "string",
        }],
        projects: ["string"],
        shareType: "string",
    },
    specificReservationRequired: false,
});
type: gcp:compute:Reservation
properties:
    deleteAfterDuration:
        nanos: 0
        seconds: string
    deleteAtTime: string
    description: string
    enableEmergentMaintenance: false
    name: string
    project: string
    reservationSharingPolicy:
        serviceShareType: string
    shareSettings:
        projectMaps:
            - id: string
              projectId: string
        projects:
            - string
        shareType: string
    specificReservation:
        count: 0
        inUseCount: 0
        instanceProperties:
            guestAccelerators:
                - acceleratorCount: 0
                  acceleratorType: string
            localSsds:
                - diskSizeGb: 0
                  interface: string
            machineType: string
            maintenanceInterval: string
            minCpuPlatform: string
        sourceInstanceTemplate: 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:
- SpecificReservation ReservationSpecific Reservation 
- Reservation for instances with specific machine shapes. Structure is documented below.
- Zone string
- The zone where the reservation is made.
- DeleteAfter ReservationDuration Delete After Duration 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- DeleteAt stringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- Description string
- An optional description of this resource.
- EnableEmergent boolMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- ReservationSharing ReservationPolicy Reservation Sharing Policy 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- 
ReservationShare Settings 
- The share setting for reservations. Structure is documented below.
- SpecificReservation 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.
- SpecificReservation ReservationSpecific Reservation Args 
- Reservation for instances with specific machine shapes. Structure is documented below.
- Zone string
- The zone where the reservation is made.
- DeleteAfter ReservationDuration Delete After Duration Args 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- DeleteAt stringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- Description string
- An optional description of this resource.
- EnableEmergent boolMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- ReservationSharing ReservationPolicy Reservation Sharing Policy Args 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- 
ReservationShare Settings Args 
- The share setting for reservations. Structure is documented below.
- SpecificReservation 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.
- specificReservation ReservationSpecific Reservation 
- Reservation for instances with specific machine shapes. Structure is documented below.
- zone String
- The zone where the reservation is made.
- deleteAfter ReservationDuration Delete After Duration 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- deleteAt StringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- description String
- An optional description of this resource.
- enableEmergent BooleanMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- reservationSharing ReservationPolicy Reservation Sharing Policy 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- 
ReservationShare Settings 
- The share setting for reservations. Structure is documented below.
- specificReservation 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.
- specificReservation ReservationSpecific Reservation 
- Reservation for instances with specific machine shapes. Structure is documented below.
- zone string
- The zone where the reservation is made.
- deleteAfter ReservationDuration Delete After Duration 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- deleteAt stringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- description string
- An optional description of this resource.
- enableEmergent booleanMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- reservationSharing ReservationPolicy Reservation Sharing Policy 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- 
ReservationShare Settings 
- The share setting for reservations. Structure is documented below.
- specificReservation 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.
- delete_after_ Reservationduration Delete After Duration Args 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- delete_at_ strtime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- description str
- An optional description of this resource.
- enable_emergent_ boolmaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- reservation_sharing_ Reservationpolicy Reservation Sharing Policy Args 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- 
ReservationShare Settings Args 
- The share setting for reservations. 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.
- specificReservation Property Map
- Reservation for instances with specific machine shapes. Structure is documented below.
- zone String
- The zone where the reservation is made.
- deleteAfter Property MapDuration 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- deleteAt StringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- description String
- An optional description of this resource.
- enableEmergent BooleanMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- reservationSharing Property MapPolicy 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- Property Map
- The share setting for reservations. Structure is documented below.
- specificReservation 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.
- 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,
        delete_after_duration: Optional[ReservationDeleteAfterDurationArgs] = None,
        delete_at_time: Optional[str] = None,
        description: Optional[str] = None,
        enable_emergent_maintenance: Optional[bool] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        reservation_sharing_policy: Optional[ReservationReservationSharingPolicyArgs] = 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) -> Reservationfunc 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)resources:  _:    type: gcp:compute:Reservation    get:      id: ${id}- 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.
- CreationTimestamp string
- Creation timestamp in RFC3339 text format.
- DeleteAfter ReservationDuration Delete After Duration 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- DeleteAt stringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- Description string
- An optional description of this resource.
- EnableEmergent boolMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- ReservationSharing ReservationPolicy Reservation Sharing Policy 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- SelfLink string
- The URI of the created resource.
- 
ReservationShare Settings 
- The share setting for reservations. Structure is documented below.
- SpecificReservation ReservationSpecific Reservation 
- Reservation for instances with specific machine shapes. Structure is documented below.
- SpecificReservation 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.
- CreationTimestamp string
- Creation timestamp in RFC3339 text format.
- DeleteAfter ReservationDuration Delete After Duration Args 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- DeleteAt stringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- Description string
- An optional description of this resource.
- EnableEmergent boolMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- ReservationSharing ReservationPolicy Reservation Sharing Policy Args 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- SelfLink string
- The URI of the created resource.
- 
ReservationShare Settings Args 
- The share setting for reservations. Structure is documented below.
- SpecificReservation ReservationSpecific Reservation Args 
- Reservation for instances with specific machine shapes. Structure is documented below.
- SpecificReservation 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.
- creationTimestamp String
- Creation timestamp in RFC3339 text format.
- deleteAfter ReservationDuration Delete After Duration 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- deleteAt StringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- description String
- An optional description of this resource.
- enableEmergent BooleanMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- reservationSharing ReservationPolicy Reservation Sharing Policy 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- selfLink String
- The URI of the created resource.
- 
ReservationShare Settings 
- The share setting for reservations. Structure is documented below.
- specificReservation ReservationSpecific Reservation 
- Reservation for instances with specific machine shapes. Structure is documented below.
- specificReservation 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.
- creationTimestamp string
- Creation timestamp in RFC3339 text format.
- deleteAfter ReservationDuration Delete After Duration 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- deleteAt stringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- description string
- An optional description of this resource.
- enableEmergent booleanMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- reservationSharing ReservationPolicy Reservation Sharing Policy 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- selfLink string
- The URI of the created resource.
- 
ReservationShare Settings 
- The share setting for reservations. Structure is documented below.
- specificReservation ReservationSpecific Reservation 
- Reservation for instances with specific machine shapes. Structure is documented below.
- specificReservation 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.
- delete_after_ Reservationduration Delete After Duration Args 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- delete_at_ strtime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- description str
- An optional description of this resource.
- enable_emergent_ boolmaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- reservation_sharing_ Reservationpolicy Reservation Sharing Policy Args 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- self_link str
- The URI of the created resource.
- 
ReservationShare Settings Args 
- The share setting for reservations. Structure is documented below.
- 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.
- creationTimestamp String
- Creation timestamp in RFC3339 text format.
- deleteAfter Property MapDuration 
- Duration after which the reservation will be auto-deleted by Compute Engine. Cannot be used with delete_at_time. Structure is documented below.
- deleteAt StringTime 
- Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. Cannot be used with delete_after_duration.
- description String
- An optional description of this resource.
- enableEmergent BooleanMaintenance 
- Indicates if this group of VMs have emergent maintenance enabled.
- 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.
- reservationSharing Property MapPolicy 
- Sharing policy for reservations with Google Cloud managed services. Structure is documented below.
- selfLink String
- The URI of the created resource.
- Property Map
- The share setting for reservations. Structure is documented below.
- specificReservation Property Map
- Reservation for instances with specific machine shapes. Structure is documented below.
- specificReservation 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
ReservationDeleteAfterDuration, ReservationDeleteAfterDurationArgs        
ReservationReservationSharingPolicy, ReservationReservationSharingPolicyArgs        
- string
- Sharing config for all Google Cloud services.
Possible values are: ALLOW_ALL,DISALLOW_ALL.
- string
- Sharing config for all Google Cloud services.
Possible values are: ALLOW_ALL,DISALLOW_ALL.
- String
- Sharing config for all Google Cloud services.
Possible values are: ALLOW_ALL,DISALLOW_ALL.
- string
- Sharing config for all Google Cloud services.
Possible values are: ALLOW_ALL,DISALLOW_ALL.
- str
- Sharing config for all Google Cloud services.
Possible values are: ALLOW_ALL,DISALLOW_ALL.
- String
- Sharing config for all Google Cloud services.
Possible values are: ALLOW_ALL,DISALLOW_ALL.
ReservationShareSettings, ReservationShareSettingsArgs      
- ProjectMaps 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.
- Projects List<string>
- List of project IDs with which the reservation is shared.
- string
- Type of sharing for this shared-reservation
Possible values are: LOCAL,SPECIFIC_PROJECTS.
- ProjectMaps []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.
- Projects []string
- List of project IDs with which the reservation is shared.
- string
- Type of sharing for this shared-reservation
Possible values are: LOCAL,SPECIFIC_PROJECTS.
- projectMaps 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.
- projects List<String>
- List of project IDs with which the reservation is shared.
- String
- Type of sharing for this shared-reservation
Possible values are: LOCAL,SPECIFIC_PROJECTS.
- projectMaps 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.
- projects string[]
- List of project IDs with which the reservation is shared.
- 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.
- projects Sequence[str]
- List of project IDs with which the reservation is shared.
- 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.
- projects List<String>
- List of project IDs with which the reservation is shared.
- 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.
- InUse intCount 
- (Output) How many instances are in use.
- InstanceProperties ReservationSpecific Reservation Instance Properties 
- The instance properties for the reservation. Structure is documented below.
- SourceInstance stringTemplate 
- Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field.
- Count int
- The number of resources that are allocated.
- InUse intCount 
- (Output) How many instances are in use.
- InstanceProperties ReservationSpecific Reservation Instance Properties 
- The instance properties for the reservation. Structure is documented below.
- SourceInstance stringTemplate 
- Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field.
- count Integer
- The number of resources that are allocated.
- inUse IntegerCount 
- (Output) How many instances are in use.
- instanceProperties ReservationSpecific Reservation Instance Properties 
- The instance properties for the reservation. Structure is documented below.
- sourceInstance StringTemplate 
- Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field.
- count number
- The number of resources that are allocated.
- inUse numberCount 
- (Output) How many instances are in use.
- instanceProperties ReservationSpecific Reservation Instance Properties 
- The instance properties for the reservation. Structure is documented below.
- sourceInstance stringTemplate 
- Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field.
- count int
- The number of resources that are allocated.
- in_use_ intcount 
- (Output) How many instances are in use.
- instance_properties ReservationSpecific Reservation Instance Properties 
- The instance properties for the reservation. Structure is documented below.
- source_instance_ strtemplate 
- Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field.
- count Number
- The number of resources that are allocated.
- inUse NumberCount 
- (Output) How many instances are in use.
- instanceProperties Property Map
- The instance properties for the reservation. Structure is documented below.
- sourceInstance StringTemplate 
- Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field.
ReservationSpecificReservationInstanceProperties, ReservationSpecificReservationInstancePropertiesArgs          
- MachineType string
- The name of the machine type to reserve.
- GuestAccelerators List<ReservationSpecific Reservation Instance Properties Guest Accelerator> 
- Guest accelerator type and count. Structure is documented below.
- LocalSsds 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.
- MaintenanceInterval string
- Specifies the frequency of planned maintenance events.
Possible values are: AS_NEEDED,PERIODIC,RECURRENT.
- MinCpu 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.
- MachineType string
- The name of the machine type to reserve.
- GuestAccelerators []ReservationSpecific Reservation Instance Properties Guest Accelerator 
- Guest accelerator type and count. Structure is documented below.
- LocalSsds []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.
- MaintenanceInterval string
- Specifies the frequency of planned maintenance events.
Possible values are: AS_NEEDED,PERIODIC,RECURRENT.
- MinCpu 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.
- machineType String
- The name of the machine type to reserve.
- guestAccelerators List<ReservationSpecific Reservation Instance Properties Guest Accelerator> 
- Guest accelerator type and count. Structure is documented below.
- localSsds 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.
- maintenanceInterval String
- Specifies the frequency of planned maintenance events.
Possible values are: AS_NEEDED,PERIODIC,RECURRENT.
- minCpu 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.
- machineType string
- The name of the machine type to reserve.
- guestAccelerators ReservationSpecific Reservation Instance Properties Guest Accelerator[] 
- Guest accelerator type and count. Structure is documented below.
- localSsds 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.
- maintenanceInterval string
- Specifies the frequency of planned maintenance events.
Possible values are: AS_NEEDED,PERIODIC,RECURRENT.
- minCpu 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.
- maintenance_interval str
- Specifies the frequency of planned maintenance events.
Possible values are: AS_NEEDED,PERIODIC,RECURRENT.
- 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.
- 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.
- maintenanceInterval String
- Specifies the frequency of planned maintenance events.
Possible values are: AS_NEEDED,PERIODIC,RECURRENT.
- minCpu 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              
- 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-p100If 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-p100If 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-p100If 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-p100If 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-p100If 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-p100If you are creating an instance template, specify only the accelerator name.
ReservationSpecificReservationInstancePropertiesLocalSsd, ReservationSpecificReservationInstancePropertiesLocalSsdArgs              
- DiskSize 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.
- DiskSize 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.
- diskSize 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.
- diskSize 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.
- diskSize 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-betaTerraform Provider.
