google_compute_public_delegated_prefix

Represents a PublicDelegatedPrefix for use with bring your own IP addresses (BYOIP).

To get more information about PublicDelegatedPrefix, see:

Example Usage - Public Delegated Prefixes Basic

resource "google_compute_public_advertised_prefix" "advertised" {
  name = "my-prefix"
  description = "description"
  dns_verification_ip = "127.127.0.0"
  ip_cidr_range = "127.127.0.0/16"
}

resource "google_compute_public_delegated_prefix" "prefixes" {
  name = "my-prefix"
  region = "us-central1"
  description = "my description"
  ip_cidr_range = "127.127.0.0/24"
  parent_prefix = google_compute_public_advertised_prefix.advertised.id
}

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

PublicDelegatedPrefix can be imported using any of these accepted formats:

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

import {
  id = "projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}"
  to = google_compute_public_delegated_prefix.default
}

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

$ terraform import google_compute_public_delegated_prefix.default projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}
$ terraform import google_compute_public_delegated_prefix.default {{project}}/{{region}}/{{name}}
$ terraform import google_compute_public_delegated_prefix.default {{region}}/{{name}}
$ terraform import google_compute_public_delegated_prefix.default {{name}}

User Project Overrides

This resource supports User Project Overrides.