» google_service_networking_connection
Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.
Manages a private VPC connection with a GCP service provider. For more information see the official documentation and API.
» Example usage
resource "google_compute_network" "peering_network" {
name = "peering_network"
}
resource "google_compute_global_address" "private_ip_alloc" {
name = "private_ip_alloc"
purpose = "VPC_PEERING"
address_type = "INTERNAL"
prefix_length = 16
network = "${google_compute_network.peering_network.self_link}"
}
resource "google_service_networking_connection" "foobar" {
network = "${google_compute_network.peering_network.self_link}"
service = "servicenetworking.googleapis.com"
reserved_peering_ranges = ["${google_compute_global_address.private_ip_alloc.name}"]
}
» Argument Reference
The following arguments are supported:
-
network
- (Required) Name of VPC network connected with service producers using VPC peering. -
service
- (Required) Provider peering service that is managing peering connectivity for a service provider organization. For Google services that support this functionality it is 'servicenetworking.googleapis.com'. -
reserved_peering_ranges
- (Required) Named IP address range(s) of PEERING type reserved for this service provider. Note that invoking this method with a different range when connection is already established will not reallocate already provisioned service producer subnetworks.