google_compute_global_address

Represents a Global Address resource. Global addresses are used for HTTP(S) load balancing.

To get more information about GlobalAddress, see:

Open in Cloud Shell

Example Usage - Global Address Basic

resource "google_compute_global_address" "default" {
  name = "global-appserver-ip"
}
Open in Cloud Shell

Example Usage - Global Address Private Services Connect

resource "google_compute_global_address" "default" {
  provider      = google-beta
  name          = "global-psconnect-ip"
  address_type  = "INTERNAL"
  purpose       = "PRIVATE_SERVICE_CONNECT"
  network       = google_compute_network.network.id
  address       = "100.100.100.105"
}

resource "google_compute_network" "network" {
  provider      = google-beta
  name          = "my-network-name"
  auto_create_subnetworks = false
}

Argument Reference

The following arguments are supported:


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

GlobalAddress can be imported using any of these accepted formats:

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

import {
  id = "projects/{{project}}/global/addresses/{{name}}"
  to = google_compute_global_address.default
}

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

$ terraform import google_compute_global_address.default projects/{{project}}/global/addresses/{{name}}
$ terraform import google_compute_global_address.default {{project}}/{{name}}
$ terraform import google_compute_global_address.default {{name}}

User Project Overrides

This resource supports User Project Overrides.