File tree 2 files changed +51
-0
lines changed
products/networkconnectivity
templates/terraform/examples
2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ examples:
44
44
network_name : ' net'
45
45
hub_name : ' hub1'
46
46
spoke_name : ' spoke1'
47
+ - name : ' network_connectivity_spoke_linked_vpc_network_group'
48
+ primary_resource_id : ' primary'
49
+ vars :
50
+ network_name : ' net-spoke'
51
+ hub_name : ' hub1-spoke'
52
+ spoke_name : ' group-spoke1'
47
53
- name : ' network_connectivity_spoke_router_appliance_basic'
48
54
primary_resource_id : ' primary'
49
55
vars :
@@ -122,6 +128,11 @@ properties:
122
128
immutable : true
123
129
resource : ' hub'
124
130
imports : ' name'
131
+ - name : ' group'
132
+ type : String
133
+ description : The name of the group that this spoke is associated with.
134
+ immutable : true
135
+ default_from_api : true
125
136
- name : ' linkedVpnTunnels'
126
137
type : NestedObject
127
138
description : The URIs of linked VPN tunnel resources
Original file line number Diff line number Diff line change
1
+ resource "google_compute_network" "network" {
2
+ name = "{{index $.Vars "network_name"}}"
3
+ auto_create_subnetworks = false
4
+ }
5
+
6
+ resource "google_network_connectivity_hub" "basic_hub" {
7
+ name = "{{index $.Vars "hub_name"}}"
8
+ description = "A sample hub"
9
+ labels = {
10
+ label-two = "value-one"
11
+ }
12
+ }
13
+
14
+ resource "google_network_connectivity_group" "default_group" {
15
+ hub = google_network_connectivity_hub.basic_hub.id
16
+ name = "default"
17
+ description = "A sample hub group"
18
+ }
19
+
20
+ resource "google_network_connectivity_spoke" "{{$.PrimaryResourceId}}" {
21
+ name = "{{index $.Vars "spoke_name"}}"
22
+ location = "global"
23
+ description = "A sample spoke with a linked VPC"
24
+ labels = {
25
+ label-one = "value-one"
26
+ }
27
+ hub = google_network_connectivity_hub.basic_hub.id
28
+ linked_vpc_network {
29
+ exclude_export_ranges = [
30
+ "198.51.100.0/24",
31
+ "10.10.0.0/16"
32
+ ]
33
+ include_export_ranges = [
34
+ "198.51.100.0/23",
35
+ "10.0.0.0/8"
36
+ ]
37
+ uri = google_compute_network.network.self_link
38
+ }
39
+ group = google_network_connectivity_group.default_group.id
40
+ }
You can’t perform that action at this time.
0 commit comments