blob: 1b803cfcd7c355a31e9ff78ce6a37b2f53fcff56 [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Compute Engine"
description: |-
Represents a PublicAdvertisedPrefix for use with bring your own IP addresses (BYOIP).
---
# google\_compute\_public\_advertised\_prefix
Represents a PublicAdvertisedPrefix for use with bring your own IP addresses (BYOIP).
To get more information about PublicAdvertisedPrefix, see:
* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/publicAdvertisedPrefixes)
* How-to Guides
* [Using bring your own IP](https://cloud.google.com/vpc/docs/using-bring-your-own-ip)
## Example Usage - Public Advertised Prefixes Basic
```hcl
resource "google_compute_public_advertised_prefix" "prefixes" {
name = "my-prefix"
description = "description"
dns_verification_ip = "127.127.0.0"
ip_cidr_range = "127.127.0.0/16"
}
```
## Argument Reference
The following arguments are supported:
* `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.
* `dns_verification_ip` -
(Required)
The IPv4 address to be used for reverse DNS verification.
* `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.
* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}`
* `self_link` - The URI of the created resource.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
PublicAdvertisedPrefix can be imported using any of these accepted formats:
* `projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}`
* `{{project}}/{{name}}`
* `{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import PublicAdvertisedPrefix using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}"
to = google_compute_public_advertised_prefix.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), PublicAdvertisedPrefix can be imported using one of the formats above. For example:
```
$ terraform import google_compute_public_advertised_prefix.default projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}
$ terraform import google_compute_public_advertised_prefix.default {{project}}/{{name}}
$ terraform import google_compute_public_advertised_prefix.default {{name}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).