google_compute_instance_settings

Represents an Instance Settings resource. Instance settings are centralized configuration parameters that allow users to configure the default values for specific VM parameters that are normally set using GCE instance API methods.

To get more information about InstanceSettings, see:

Open in Cloud Shell

Example Usage - Instance Settings Basic

resource "google_compute_instance_settings" "gce_instance_settings" {
  zone = "us-east7-b"
  metadata {
    items = {
      foo = "baz"
    }
  }
}

Argument Reference

The following arguments are supported:


The metadata block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

InstanceSettings can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import InstanceSettings using one of the formats above. For example:

import {
  id = "projects/{{project}}/zones/{{zone}}/instanceSettings"
  to = google_compute_instance_settings.default
}

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

$ terraform import google_compute_instance_settings.default projects/{{project}}/zones/{{zone}}/instanceSettings
$ terraform import google_compute_instance_settings.default {{project}}/{{zone}}
$ terraform import google_compute_instance_settings.default {{zone}}

User Project Overrides

This resource supports User Project Overrides.