Represents a PublicDelegatedPrefix for use with bring your own IP addresses (BYOIP).
To get more information about PublicDelegatedPrefix, see:
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
}
The following arguments are supported:
region
-
(Required)
A region where the prefix will reside.
name
-
(Required)
Name of the resource. 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]([-a-z0-9]*[a-z0-9])?
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.
parent_prefix
-
(Required)
The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
ip_cidr_range
-
(Required)
The IPv4 address range, in CIDR format, represented by this public advertised prefix.
description
-
(Optional)
An optional description of this resource.
is_live_migration
-
(Optional)
If true, the prefix will be live migrated.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}
self_link
- The URI of the created resource.This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.PublicDelegatedPrefix can be imported using any of these accepted formats:
projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}
{{project}}/{{region}}/{{name}}
{{region}}/{{name}}
{{name}}
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}}
This resource supports User Project Overrides.