generated from oracle-quickstart/oci-quickstart-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release 0.6.5 * Release 0.6.5 * feat: outputting NLBs private IPs info * feat: dependency on private IPs added * feat: drg_attachments dependency in route distributions statements * fix: drg_attachment_key dependency * fix: drg attachment name commented * fix: DRGs added to route rules targets * fix: route rules target * debug * fix: drg_attachment_id reference * debug * fix: drg_attachments added as dependency * doc: dependencies section updated * doc: formatting * fix: formatting * doc: variable description * doc: updates * feat: dependencies strongly typed * feat: dependencies on externally managed LPGs and RPCs, with examples * fix: NLB dependency on instances private IP addresses * doc: release notes and version bump * doc: LPG and RPC examples added
- Loading branch information
1 parent
437f4d5
commit aaf1f1c
Showing
41 changed files
with
620 additions
and
128 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**/*.rem | ||
**/*.nopub | ||
**/*.tfvars |
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,5 @@ | ||
{ | ||
"VISION-NLB": { | ||
"id": "ocid1.privateip.oc1.phx.abyhqlj...uiq" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Local Peering Gateways | ||
|
||
The enclosed pair of examples shows how to create and peer Local Peering Gateways (LPGs) within a region using the [OCI Landing Zone Core Networking module](https://github.com/oracle-quickstart/terraform-oci-cis-landing-zone-networking). | ||
|
||
It creates two VCNs. Within each VCN a Local Peering Gateway (LPG) is created. The LPGs are then peered. | ||
|
||
## How to Run the Examples | ||
|
||
### Run the Acceptor | ||
1. Replace the placeholders marked with \<\> with appropriate values in ./lpg_acceptor/input.auto.tfvars.template. Rename the file to ./lpg_acceptor/input.auto.tfvars. | ||
2. Execute terraform init/plan/apply in ./lpg-acceptor folder. | ||
|
||
### Run the Requestor | ||
3. Replace the placeholders marked with \<\> with appropriate values in ./lpg_requestor/input.auto.tfvars.template. Rename the file to ./lpg_requestor/input.auto.tfvars. | ||
4. Execute terraform init/plan/apply in ./lpg-requestor folder. |
30 changes: 30 additions & 0 deletions
30
examples/local-peering-gateways/lpg-acceptor/input.auto.tfvars.template
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,30 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
tenancy_ocid = "<TENANCY_OCID>" | ||
user_ocid = "<USER_OCID>" | ||
fingerprint = "<PEM_KEY_FINGERPRINT>" | ||
private_key_path = "<PATH_TO_PRIVATE_KEY>" | ||
private_key_password = "<PRIVATE_KEY_PASSWORD>" | ||
region = "<TENANCY_REGION>" | ||
|
||
network_configuration = { | ||
default_compartment_id = "<NETWORK_COMPARTMENT_OCID>" | ||
network_configuration_categories = { | ||
production = { | ||
vcns = { | ||
VISION-LPG-ACCEPTOR-VCN = { | ||
display_name = "vision-lpg-acceptor-vcn" | ||
cidr_blocks = ["192.168.0.0/27"] | ||
vcn_specific_gateways = { | ||
local_peering_gateways = { | ||
ACCEPTOR-LPG = { | ||
display_name = "acceptor-lpg" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,8 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
module "lpg_acceptor" { | ||
source = "../../../" | ||
network_configuration = var.network_configuration | ||
} | ||
|
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,15 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
output "networking_resources" { | ||
description = "Networking resources" | ||
value = module.lpg_acceptor.provisioned_networking_resources | ||
} | ||
|
||
# This resource writes a file with select output as JSON content. This file can be used as a network dependency by another network configuration example that depends on RPCs managed by this example. | ||
resource "local_file" "network_output" { | ||
content = module.lpg_acceptor.provisioned_networking_resources != null ? jsonencode({ | ||
"local_peering_gateways" : {for k, v in module.lpg_acceptor.provisioned_networking_resources.local_peering_gateways : k => {"id" : v.id}} | ||
}) : null | ||
filename = "./vision-network.json" | ||
} |
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,25 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
provider "oci" { | ||
region = var.region | ||
tenancy_ocid = var.tenancy_ocid | ||
user_ocid = var.user_ocid | ||
fingerprint = var.fingerprint | ||
private_key_path = var.private_key_path | ||
private_key_password = var.private_key_password | ||
} | ||
|
||
terraform { | ||
required_version = ">= 1.2.0, < 1.3.0" | ||
|
||
required_providers { | ||
oci = { | ||
source = "oracle/oci" | ||
version = "<= 5.16.0" | ||
configuration_aliases = [oci] | ||
} | ||
} | ||
|
||
experiments = [module_variable_optional_attrs] | ||
} |
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,16 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
# tenancy details | ||
variable "tenancy_ocid" {} | ||
variable "user_ocid" {} | ||
variable "fingerprint" {} | ||
variable "private_key_path" {} | ||
variable "private_key_password" {} | ||
variable "region" {} | ||
|
||
variable "network_configuration" { | ||
type = any | ||
default = null | ||
} | ||
|
31 changes: 31 additions & 0 deletions
31
examples/local-peering-gateways/lpg-requestor/input.auto.tfvars.template
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,31 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
tenancy_ocid = "<TENANCY_OCID>" | ||
user_ocid = "<USER_OCID>" | ||
fingerprint = "<PEM_KEY_FINGERPRINT>" | ||
private_key_path = "<PATH_TO_PRIVATE_KEY>" | ||
private_key_password = "<PRIVATE_KEY_PASSWORD>" | ||
region = "<TENANCY_REGION>" | ||
|
||
network_configuration = { | ||
default_compartment_id = "<NETWORK_COMPARTMENT_OCID>" | ||
network_configuration_categories = { | ||
production = { | ||
vcns = { | ||
VISION-LPG-REQUESTOR-VCN = { | ||
display_name = "vision-lpg-requestor-vcn" | ||
cidr_blocks = ["10.0.0.0/27"] | ||
vcn_specific_gateways = { | ||
local_peering_gateways = { | ||
REQUESTOR-LPG = { | ||
display_name = "requestor-lpg" | ||
peer_key = "ACCEPTOR-LPG" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,9 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
module "lpg_requestor" { | ||
source = "../../../" | ||
network_configuration = var.network_configuration | ||
network_dependency = jsondecode(file("../lpg-acceptor/vision-network.json")) | ||
} | ||
|
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,7 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
output "networking_resources" { | ||
description = "Networking resources" | ||
value = module.lpg_requestor.provisioned_networking_resources | ||
} |
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,25 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
provider "oci" { | ||
region = var.region | ||
tenancy_ocid = var.tenancy_ocid | ||
user_ocid = var.user_ocid | ||
fingerprint = var.fingerprint | ||
private_key_path = var.private_key_path | ||
private_key_password = var.private_key_password | ||
} | ||
|
||
terraform { | ||
required_version = ">= 1.2.0, < 1.3.0" | ||
|
||
required_providers { | ||
oci = { | ||
source = "oracle/oci" | ||
version = "<= 5.16.0" | ||
configuration_aliases = [oci] | ||
} | ||
} | ||
|
||
experiments = [module_variable_optional_attrs] | ||
} |
16 changes: 16 additions & 0 deletions
16
examples/local-peering-gateways/lpg-requestor/variables.tf
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,16 @@ | ||
# Copyright (c) 2024 Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
# tenancy details | ||
variable "tenancy_ocid" {} | ||
variable "user_ocid" {} | ||
variable "fingerprint" {} | ||
variable "private_key_path" {} | ||
variable "private_key_password" {} | ||
variable "region" {} | ||
|
||
variable "network_configuration" { | ||
type = any | ||
default = null | ||
} | ||
|
Oops, something went wrong.