Skip to content

Commit da9619e

Browse files
committed
feat: added rpcs to peer vcn to other vcns
Signed-off-by: Ali Mukadam <[email protected]>
1 parent 57e9485 commit da9619e

File tree

3 files changed

+41
-5
lines changed

3 files changed

+41
-5
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2017, 2024 Oracle Corporation and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
3+
4+
# to reuse an existing drg, set to false
5+
create_drg = true
6+
7+
drg_display_name = "drg"
8+
9+
# to reuse an existing drg, provide the drg ocid
10+
drg_id = null
11+
12+
#
13+
remote_peering_connections = {
14+
# unpeered rpc
15+
rpc1 = {}
16+
17+
# peered rpc
18+
rpc2 : {
19+
"rpc_acceptor_id" : "ocid1.remotepeeringconnection.oc1.aaaaaa"
20+
"rpc_acceptor_region" : "us-ashburn-1"
21+
}
22+
}

module-network.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ module "drg" {
9292
drg_route_table_id : null
9393
}
9494
} : var.drg_attachments
95+
96+
# rpc parameters
97+
remote_peering_connections = { for k, v in var.remote_peering_connections : k => {
98+
"rpc_acceptor_id" = try(v.rpc_acceptor_id, null),
99+
"rpc_acceptor_region" = try(v.rpc_acceptor_region, null)
100+
}
101+
}
95102
}
96103

97104
module "network" {

variables-network.tf

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@ variable "drg_id" {
7979
type = string
8080
}
8181

82+
variable "drg_attachments" {
83+
description = "DRG attachment configurations."
84+
type = any
85+
default = {}
86+
}
87+
88+
variable "remote_peering_connections" {
89+
description = "Map of parameters to add and optionally to peer to remote peering connections. Key-only items represent local acceptors and no peering attempted; items containing key and values represent local requestor and must have the OCID and region of the remote acceptor to peer to"
90+
type = map(any)
91+
default = {}
92+
}
93+
8294
variable "internet_gateway_route_rules" {
8395
default = null
8496
description = "(Updatable) List of routing rules to add to Internet Gateway Route Table."
@@ -256,8 +268,3 @@ variable "enable_waf" {
256268
default = false
257269
}
258270

259-
variable "drg_attachments" {
260-
description = "DRG attachment configurations."
261-
type = any
262-
default = {}
263-
}

0 commit comments

Comments
 (0)