forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Network Connectivity Spoke (GoogleCloudPlatform#5586)
- Loading branch information
Showing
14 changed files
with
4,918 additions
and
3,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Empty file.
58 changes: 58 additions & 0 deletions
58
tpgtools/overrides/networkconnectivity/samples/spoke/router_appliance.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
resource "google_compute_network" "network" { | ||
name = "{{network}}" | ||
auto_create_subnetworks = false | ||
} | ||
|
||
resource "google_compute_subnetwork" "subnetwork" { | ||
name = "{{subnet}}" | ||
ip_cidr_range = "10.0.0.0/28" | ||
region = "{{region}}" | ||
network = google_compute_network.network.self_link | ||
} | ||
|
||
resource "google_compute_instance" "instance" { | ||
name = "{{instance}}" | ||
machine_type = "e2-medium" | ||
can_ip_forward = true | ||
zone = "{{zone}}" | ||
|
||
boot_disk { | ||
initialize_params { | ||
image = "projects/debian-cloud/global/images/debian-10-buster-v20210817" | ||
} | ||
} | ||
|
||
network_interface { | ||
subnetwork = google_compute_subnetwork.subnetwork.name | ||
network_ip = "10.0.0.2" | ||
access_config { | ||
network_tier = "PREMIUM" | ||
} | ||
} | ||
} | ||
|
||
resource "google_network_connectivity_hub" "basic_hub" { | ||
name = "{{hub}}" | ||
description = "A sample hub" | ||
labels = { | ||
label-two = "value-one" | ||
} | ||
} | ||
|
||
resource "google_network_connectivity_spoke" "primary" { | ||
name = "{{name}}" | ||
location = "{{region}}" | ||
description = "A sample spoke with a linked routher appliance instance" | ||
labels = { | ||
label-one = "value-one" | ||
} | ||
hub = google_network_connectivity_hub.basic_hub.id | ||
linked_router_appliance_instances { | ||
instances { | ||
virtual_machine = google_compute_instance.instance.self_link | ||
ip_address = "10.0.0.2" | ||
} | ||
site_to_site_data_transfer = true | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
tpgtools/overrides/networkconnectivity/samples/spoke/router_appliance.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
updates: | ||
- resource: router_appliance_update.tf.tmpl | ||
variables: | ||
- name: "project" | ||
type: "project" | ||
- name: "region" | ||
type: "region" | ||
- name: "zone" | ||
type: "zone" | ||
- name: "name" | ||
type: "resource_name" | ||
- name: "hub" | ||
type: "resource_name" | ||
- name: "network" | ||
type: "resource_name" | ||
- name: "subnet" | ||
type: "resource_name" | ||
- name: "instance" | ||
type: "resource_name" | ||
- name: "instance2" | ||
type: "resource_name" |
58 changes: 58 additions & 0 deletions
58
tpgtools/overrides/networkconnectivity/samples/spoke/router_appliance_update.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
resource "google_compute_network" "network" { | ||
name = "{{network}}" | ||
auto_create_subnetworks = false | ||
} | ||
|
||
resource "google_compute_subnetwork" "subnetwork" { | ||
name = "{{subnet}}" | ||
ip_cidr_range = "10.0.0.0/28" | ||
region = "{{region}}" | ||
network = google_compute_network.network.self_link | ||
} | ||
|
||
resource "google_compute_instance" "instance" { | ||
name = "{{instance}}" | ||
machine_type = "e2-medium" | ||
can_ip_forward = true | ||
zone = "{{zone}}" | ||
|
||
boot_disk { | ||
initialize_params { | ||
image = "projects/debian-cloud/global/images/debian-10-buster-v20210817" | ||
} | ||
} | ||
|
||
network_interface { | ||
subnetwork = google_compute_subnetwork.subnetwork.name | ||
network_ip = "10.0.0.2" | ||
access_config { | ||
network_tier = "PREMIUM" | ||
} | ||
} | ||
} | ||
|
||
resource "google_network_connectivity_hub" "basic_hub" { | ||
name = "{{hub}}" | ||
description = "A sample hub" | ||
labels = { | ||
label-two = "value-one" | ||
} | ||
} | ||
|
||
resource "google_network_connectivity_spoke" "primary" { | ||
name = "{{name}}" | ||
location = "{{region}}" | ||
description = "An UPDATED sample spoke with a linked routher appliance instance" | ||
labels = { | ||
label-two = "value-two" | ||
} | ||
hub = google_network_connectivity_hub.basic_hub.id | ||
linked_router_appliance_instances { | ||
instances { | ||
virtual_machine = google_compute_instance.instance.self_link | ||
ip_address = "10.0.0.2" | ||
} | ||
site_to_site_data_transfer = true | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.