mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 09:36:44 +00:00
provider/google: acceptance tests for traffic selectors
This commit is contained in:
parent
eec0772512
commit
74d7af5506
@ -16,16 +16,24 @@ Manages a VPN Tunnel to the GCE network. For more info, read the
|
|||||||
```js
|
```js
|
||||||
resource "google_compute_network" "network1" {
|
resource "google_compute_network" "network1" {
|
||||||
name = "network1"
|
name = "network1"
|
||||||
ipv4_range = "10.120.0.0/16"
|
}
|
||||||
|
|
||||||
|
resource "google_compute_subnetwork" "subnet1" {
|
||||||
|
name = "subnet1"
|
||||||
|
network = "${google_compute_network.network1.self_link}"
|
||||||
|
ip_cidr_range = "10.120.0.0/16"
|
||||||
|
region = "us-central1"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_compute_vpn_gateway" "target_gateway" {
|
resource "google_compute_vpn_gateway" "target_gateway" {
|
||||||
name = "vpn1"
|
name = "vpn1"
|
||||||
network = "${google_compute_network.network1.self_link}"
|
network = "${google_compute_network.network1.self_link}"
|
||||||
|
region = "${google_compute_subnetwork.subnet1.region}"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_compute_address" "vpn_static_ip" {
|
resource "google_compute_address" "vpn_static_ip" {
|
||||||
name = "vpn-static-ip"
|
name = "vpn-static-ip"
|
||||||
|
region = "${google_compute_subnetwork.subnet1.region}"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_compute_forwarding_rule" "fr_esp" {
|
resource "google_compute_forwarding_rule" "fr_esp" {
|
||||||
@ -58,6 +66,9 @@ resource "google_compute_vpn_tunnel" "tunnel1" {
|
|||||||
|
|
||||||
target_vpn_gateway = "${google_compute_vpn_gateway.target_gateway.self_link}"
|
target_vpn_gateway = "${google_compute_vpn_gateway.target_gateway.self_link}"
|
||||||
|
|
||||||
|
local_traffic_selector = ["${google_compute_subnetwork.subnet1.ip_cidr_range}"]
|
||||||
|
remote_traffic_selector = ["172.16.0.0/12"]
|
||||||
|
|
||||||
depends_on = [
|
depends_on = [
|
||||||
"google_compute_forwarding_rule.fr_esp",
|
"google_compute_forwarding_rule.fr_esp",
|
||||||
"google_compute_forwarding_rule.fr_udp500",
|
"google_compute_forwarding_rule.fr_udp500",
|
||||||
|
Loading…
Reference in New Issue
Block a user