Skip to content

Commit

Permalink
fixed examples to use local path for submodules (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
snafuz authored Mar 22, 2022
1 parent e7d3a9d commit 2d8ea92
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 27 deletions.
1 change: 1 addition & 0 deletions examples/custom_route_rules/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions examples/custom_route_rules/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ terraform {
# Resources

module "vcn" {
source = "oracle-terraform-modules/vcn/oci"
version = "3.1.0"

source = "../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down
12 changes: 9 additions & 3 deletions examples/drg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ terraform {
# Resources

module "drg_hub" {
source = "oracle-terraform-modules/vcn/oci//modules/drg"
source = "../../modules/drg"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci//modules/drg"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand All @@ -37,8 +40,11 @@ module "drg_hub" {
}

module "vcn_spokes" {
source = "oracle-terraform-modules/vcn/oci"
version = "3.1.0"
source = "../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

for_each = var.vcn_spokes

# general oci parameters
Expand Down
1 change: 1 addition & 0 deletions examples/hub-spoke/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions examples/hub-spoke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ terraform {

module "vcn_hub" {
# this module use the generic vcn module and configure it to act as a hub in a hub-and-spoke topology
source = "oracle-terraform-modules/vcn/oci"
version = "3.1.0"

source = "../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down Expand Up @@ -68,8 +71,11 @@ resource "oci_core_route_table" "VTR_spokes" {

module "vcn_spoke1" {
# this module use the generic vcn module and configure it to act as a spoke in a hub-and-spoke topology
source = "oracle-terraform-modules/vcn/oci"
version = "3.1.0"

source = "../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down Expand Up @@ -97,8 +103,11 @@ module "vcn_spoke1" {

module "vcn_spoke2" {
# this module use the generic vcn module and configure it to act as a spoke in a hub-and-spoke topology
source = "oracle-terraform-modules/vcn/oci"
version = "3.1.0"

source = "../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand All @@ -124,8 +133,11 @@ module "vcn_spoke2" {

module "vcn_spoke3" {
# this module use the generic vcn module and configure it to act as a spoke in a hub-and-spoke topology
source = "oracle-terraform-modules/vcn/oci"
version = "3.1.0"

source = "../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down
7 changes: 5 additions & 2 deletions examples/module_composition/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ terraform {
# Resources

module "vcn" {
source = "oracle-terraform-modules/vcn/oci"
version = "3.1.0"

source = "../../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down
27 changes: 19 additions & 8 deletions examples/rpc/rpc_from_drg_module/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ terraform {

module "vcn_acceptor" {
# this module use the generic vcn module and configure it to act as vcn for RPC acceptor
source = "oracle-terraform-modules/vcn/oci"
version = "3.2.0"

source = "../../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down Expand Up @@ -73,8 +76,11 @@ resource "oci_core_subnet" "subnet_acceptor" {


module "drg_acceptor" {
source = "oracle-terraform-modules/vcn/oci//modules/drg"
version = "3.2.0"

source = "../../../modules/drg"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci//modules/drg"
# version = "specify_version_number"

compartment_id = var.compartment_id
label_prefix = var.label_prefix
Expand All @@ -100,8 +106,11 @@ module "drg_acceptor" {

module "vcn_requestor" {
# this module use the generic vcn module and configure it to act as rpc requestor vcn
source = "oracle-terraform-modules/vcn/oci"
version = "3.2.0"

source = "../../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down Expand Up @@ -152,8 +161,10 @@ resource "oci_core_subnet" "subnet_requestor" {
}

module "drg_requestor" {
source = "oracle-terraform-modules/vcn/oci//modules/drg"
version = "3.2.0"
source = "../../../modules/drg"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci//modules/drg"
# version = "specify_version_number"

compartment_id = var.compartment_id
label_prefix = var.label_prefix
Expand Down
14 changes: 10 additions & 4 deletions examples/rpc/rpc_from_vcn_module/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ terraform {

module "vcn_acceptor" {
# this module use the generic vcn module and configure it to act as rpc acceptor vcn
source = "oracle-terraform-modules/vcn/oci"
version = "3.2.0"

source = "../../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down Expand Up @@ -73,8 +76,11 @@ resource "oci_core_subnet" "subnet_acceptor" {

module "vcn_requestor" {
# this module use the generic vcn module and configure it to act as rpc requestor vcn
source = "oracle-terraform-modules/vcn/oci"
version = "3.2.0"

source = "../../../"
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
# source = "oracle-terraform-modules/vcn/oci"
# version = "specify_version_number"

# general oci parameters
compartment_id = var.compartment_id
Expand Down

0 comments on commit 2d8ea92

Please sign in to comment.