Skip to content

Commit

Permalink
feat: added rpcs to peer vcn to other vcns
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Mukadam <ali.mukadam@oracle.com>
  • Loading branch information
hyder committed Jan 16, 2024
1 parent 57e9485 commit da9619e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
22 changes: 22 additions & 0 deletions examples/network/vars-network-drg-create.auto.tfvars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2017, 2024 Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl

# to reuse an existing drg, set to false
create_drg = true

drg_display_name = "drg"

# to reuse an existing drg, provide the drg ocid
drg_id = null

#
remote_peering_connections = {
# unpeered rpc
rpc1 = {}

# peered rpc
rpc2 : {
"rpc_acceptor_id" : "ocid1.remotepeeringconnection.oc1.aaaaaa"
"rpc_acceptor_region" : "us-ashburn-1"
}
}
7 changes: 7 additions & 0 deletions module-network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ module "drg" {
drg_route_table_id : null
}
} : var.drg_attachments

# rpc parameters
remote_peering_connections = { for k, v in var.remote_peering_connections : k => {
"rpc_acceptor_id" = try(v.rpc_acceptor_id, null),
"rpc_acceptor_region" = try(v.rpc_acceptor_region, null)
}
}
}

module "network" {
Expand Down
17 changes: 12 additions & 5 deletions variables-network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ variable "drg_id" {
type = string
}

variable "drg_attachments" {
description = "DRG attachment configurations."
type = any
default = {}
}

variable "remote_peering_connections" {
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"
type = map(any)
default = {}
}

variable "internet_gateway_route_rules" {
default = null
description = "(Updatable) List of routing rules to add to Internet Gateway Route Table."
Expand Down Expand Up @@ -256,8 +268,3 @@ variable "enable_waf" {
default = false
}

variable "drg_attachments" {
description = "DRG attachment configurations."
type = any
default = {}
}

0 comments on commit da9619e

Please sign in to comment.