# Terraform add-on: GCP VPC Network Peering

Generated reference for the GCP VPC Network Peering add-on module.

### Requirements

| Name | Version |
| ---- | ------- |
| terraform | >= 1.14 |
| google | ~> 7.42.0 |
| time | ~> 0.12 |

### Providers

| Name | Version |
| ---- | ------- |
| google.accepter | 7.42.0 |
| google.requester | 7.42.0 |
| time | 0.14.0 |

### Resources

| Name | Type |
| ---- | ---- |
| [google\_compute\_network\_peering.accepter](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_network_peering) | resource |
| [google\_compute\_network\_peering.requester](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_network_peering) | resource |
| [google\_dns\_managed\_zone.accepter\_peering](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dns_managed_zone) | resource |
| [google\_dns\_managed\_zone.requester\_peering](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dns_managed_zone) | resource |
| [time\_sleep.accepter\_settle](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
| [time\_sleep.requester\_destroy\_cooldown](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
| [time\_sleep.requester\_initial\_settle](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
| [time\_sleep.requester\_settle](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |

### Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
| accepter | Accepter side — typically a spoke cluster's VPC. Same shape as `requester`. May live in a different project/region; the `google.accepter` provider alias supplies its credentials and project context. | <pre>object(\{<br />    network\_self\_link = string<br />    peering\_name      = optional(string)<br />  })</pre> | n/a | yes |
| name | Name prefix for the peering resources (typically the customer's deployment name + the pair name, e.g. "crypto-vault-hub-to-spoke-0"). Used to derive the two half-peering names and the optional Cloud DNS peering-zone names. | `string` | n/a | yes |
| requester | Requester side of the peering — typically the hub cluster's VPC. `network_self_link` is the full self\_link (or id) of the network to peer FROM; `peering_name` optionally overrides the derived half-peering name. | <pre>object(\{<br />    network\_self\_link = string<br />    peering\_name      = optional(string)<br />  })</pre> | n/a | yes |
| dns\_peering | Optional Cloud DNS peering zones for cross-VPC private-name resolution. When `enabled`, creates one peering zone per direction so each VPC can resolve `dns_name` records hosted in the other (needed when peer-shard internal-LB/PSC hostnames are private). `dns_name` must be a fully-qualified DNS suffix ending in a dot (e.g. "internal.example."). Zone names are derived from `name` unless overridden. | <pre>object(\{<br />    enabled             = bool<br />    dns\_name            = optional(string, "")<br />    requester\_zone\_name = optional(string)<br />    accepter\_zone\_name  = optional(string)<br />  })</pre> | <pre>\{<br />  "enabled": false<br />}</pre> | no |
| export\_custom\_routes | Whether each network exports its custom (non-subnet) routes — e.g. static routes or Cloud VPN/Interconnect-learned dynamic routes — to the peer. Subnet routes always auto-exchange regardless of this flag. Applied symmetrically to both half-peerings. | `bool` | `false` | no |
| import\_custom\_routes | Whether each network imports the peer's custom (non-subnet) routes. Applied symmetrically to both half-peerings. For a custom route to actually flow, the advertising side must set `export_custom_routes` and the receiving side `import_custom_routes`. | `bool` | `false` | no |

### Outputs

| Name | Description |
| ---- | ----------- |
| accepter\_peering\_name | Name of the accepter-side half-peering. |
| accepter\_peering\_state | State of the accepter-side peering: ACTIVE once the requester half matches this configuration, otherwise INACTIVE. |
| accepter\_peering\_state\_details | Human-readable detail about the accepter-side peering state (diagnostic). |
| dns\_peering\_zone\_names | Names of the Cloud DNS peering zones created for cross-VPC name resolution as \[requester\_zone, accepter\_zone], or an empty list when dns\_peering is disabled. |
| requester\_peering\_name | Name of the requester-side half-peering. |
| requester\_peering\_state | State of the requester-side peering: ACTIVE once the accepter half matches this configuration, otherwise INACTIVE. |
| requester\_peering\_state\_details | Human-readable detail about the requester-side peering state (diagnostic; e.g. explains why a peering is still INACTIVE). |
