blob: d73e4700c223c9397cf1babea52a11ce5983cbb5 [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: "Cloud VMware Engine"
description: |-
Represents a network peering resource.
---
# google\_vmwareengine\_network\_peering
Represents a network peering resource. Network peerings are global resources.
To get more information about NetworkPeering, see:
* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/networks/addPeering)
## Example Usage - Vmware Engine Network Peering Ven
```hcl
resource "google_vmwareengine_network" "network-peering-nw" {
name = "default-np-nw"
location = "global"
type = "STANDARD"
}
resource "google_vmwareengine_network" "network-peering-peer-nw" {
name = "peer-np-nw"
location = "global"
type = "STANDARD"
}
resource "google_vmwareengine_network_peering" "vmw-engine-network-peering" {
name = "sample-network-peering"
description = "Sample description"
vmware_engine_network = google_vmwareengine_network.network-peering-nw.id
peer_network = google_vmwareengine_network.network-peering-peer-nw.id
peer_network_type = "VMWARE_ENGINE_NETWORK"
export_custom_routes = false
import_custom_routes = false
export_custom_routes_with_public_ip = false
import_custom_routes_with_public_ip = false
}
```
## Example Usage - Vmware Engine Network Peering Standard
```hcl
resource "google_compute_network" "network-peering-vpc" {
name = "default-vpc"
}
resource "google_vmwareengine_network" "network-peering-standard-nw" {
name = "default-standard-nw-np"
location = "global"
type = "STANDARD"
}
resource "google_vmwareengine_network_peering" "vmw-engine-network-peering" {
name = "sample-network-peering"
description = "Sample description"
peer_network = google_compute_network.network-peering-vpc.id
peer_network_type = "STANDARD"
vmware_engine_network = google_vmwareengine_network.network-peering-standard-nw.id
}
```
## Argument Reference
The following arguments are supported:
* `peer_network` -
(Required)
The relative resource name of the network to peer with a standard VMware Engine network.
The provided network can be a consumer VPC network or another standard VMware Engine network.
* `peer_network_type` -
(Required)
The type of the network to peer with the VMware Engine network.
Possible values are: `STANDARD`, `VMWARE_ENGINE_NETWORK`, `PRIVATE_SERVICES_ACCESS`, `NETAPP_CLOUD_VOLUMES`, `THIRD_PARTY_SERVICE`, `DELL_POWERSCALE`.
* `vmware_engine_network` -
(Required)
The relative resource name of the VMware Engine network. Specify the name in the following form:
projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project}
can either be a project number or a project ID.
* `name` -
(Required)
The ID of the Network Peering.
- - -
* `export_custom_routes` -
(Optional)
True if custom routes are exported to the peered network; false otherwise.
* `import_custom_routes` -
(Optional)
True if custom routes are imported from the peered network; false otherwise.
* `export_custom_routes_with_public_ip` -
(Optional)
True if all subnet routes with a public IP address range are exported; false otherwise.
* `import_custom_routes_with_public_ip` -
(Optional)
True if custom routes are imported from the peered network; false otherwise.
* `description` -
(Optional)
User-provided description for this network peering.
* `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}}/locations/global/networkPeerings/{{name}}`
* `create_time` -
Creation time of this resource.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
* `update_time` -
Last updated time of this resource.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
* `state` -
State of the network peering.
This field has a value of 'ACTIVE' when there's a matching configuration in the peer network.
New values may be added to this enum when appropriate.
* `state_details` -
Details about the current state of the network peering.
* `uid` -
System-generated unique identifier for the resource.
* `vmware_engine_network_canonical` -
The canonical name of the VMware Engine network in the form:
projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
## 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.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
NetworkPeering can be imported using any of these accepted formats:
* `projects/{{project}}/locations/global/networkPeerings/{{name}}`
* `{{project}}/{{name}}`
* `{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import NetworkPeering using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/global/networkPeerings/{{name}}"
to = google_vmwareengine_network_peering.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), NetworkPeering can be imported using one of the formats above. For example:
```
$ terraform import google_vmwareengine_network_peering.default projects/{{project}}/locations/global/networkPeerings/{{name}}
$ terraform import google_vmwareengine_network_peering.default {{project}}/{{name}}
$ terraform import google_vmwareengine_network_peering.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).