Google Compute Engine Reservation

This page shows how to write Terraform for Compute Engine Reservation and write them securely.

google_compute_reservation (Terraform)

The Reservation in Compute Engine can be configured in Terraform with the resource name google_compute_reservation. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • commitment requiredcomputed - string
    • Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.

  • creation_timestamp requiredcomputed - string
    • Creation timestamp in RFC3339 text format.

  • description optional - string
    • An optional description of this resource.

  • id optionalcomputed - string
  • name required - 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 optionalcomputed - string
  • self_link requiredcomputed - string
  • specific_reservation_required optional - bool
    • When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.

  • status requiredcomputed - string
    • The status of the reservation.

  • zone required - string
    • The zone where the reservation is made.

Explanation in Terraform Registry

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:

Frequently asked questions

What is Google Compute Engine Reservation?

Google Compute Engine Reservation is a resource for Compute Engine of Google Cloud Platform. Settings can be wrote in Terraform.

security-icon

Scan your IaC problem in 3 minutes for free

You can keep your IaC security for free. No credit card required.