diff --git a/README.md b/README.md index ba94d47d..46c79db6 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ This module creates the following IBM Cloud® Virtual Private Cloud (VPC) net ## Overview * [terraform-ibm-landing-zone-vpc](#terraform-ibm-landing-zone-vpc) +* [Submodules](./modules) + * [management-vpc](./modules/management-vpc) + * [workload-vpc](./modules/workload-vpc) * [Examples](./examples) * [Basic Example](./examples/basic) * [Default Example](./examples/default) @@ -38,7 +41,7 @@ This module creates the following IBM Cloud® Virtual Private Cloud (VPC) net ### Presets -In addition to this root module, this repository provides two submodules that call the root module with presets and defaults that are aligned with the general [Framework for Financial Services](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-about) management and workload VPC topologies. See the [landing-zone-submodules](/landing-zone-submodule/) for details. +In addition to this root module, this repository provides two submodules that call the root module with presets and defaults that are aligned with the general [Framework for Financial Services](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-about) management and workload VPC topologies. See the [modules](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/tree/main/modules) for details. ### Usage ```terraform diff --git a/examples/landing_zone/README.md b/examples/landing_zone/README.md index 9ceb5c18..a4cc9f83 100644 --- a/examples/landing_zone/README.md +++ b/examples/landing_zone/README.md @@ -1,6 +1,6 @@ # Landing Zone example -This example demonstrates how to use the management and workload VPC [modules](../../landing-zone-submodule/) to create a network VPC topology that is aligned with the network segregation key principles of the IBM Cloud [Framework for Financial Services](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-overview). +This example demonstrates how to use the management and workload VPC [modules](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/tree/main/modules) to create a network VPC topology that is aligned with the network segregation key principles of the IBM Cloud [Framework for Financial Services](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-overview). The example shows how to use the base modules to create the following topology: - A management VPC diff --git a/examples/landing_zone/main.tf b/examples/landing_zone/main.tf index fbbf1aac..cf5069af 100644 --- a/examples/landing_zone/main.tf +++ b/examples/landing_zone/main.tf @@ -33,7 +33,7 @@ module "cos_bucket" { ############################################################################# module "workload_vpc" { - source = "../../landing-zone-submodule/workload-vpc/" + source = "../../modules/workload-vpc/" resource_group_id = module.resource_group.resource_group_id region = var.region prefix = "${var.prefix}-workload" @@ -48,7 +48,7 @@ module "workload_vpc" { module "management_vpc" { - source = "../../landing-zone-submodule/management-vpc/" + source = "../../modules/management-vpc/" resource_group_id = module.resource_group.resource_group_id region = var.region prefix = "${var.prefix}-management" diff --git a/landing-zone-submodule/management-vpc/README.md b/modules/management-vpc/README.md similarity index 96% rename from landing-zone-submodule/management-vpc/README.md rename to modules/management-vpc/README.md index cf0f9919..05557e12 100644 --- a/landing-zone-submodule/management-vpc/README.md +++ b/modules/management-vpc/README.md @@ -6,6 +6,17 @@ You can use this submodule when you need more modularity to create your topology See the [Landing Zone example](../../examples/landing_zone/) for runnable code. +### Usage +```terraform +module management_vpc { + source = "terraform-ibm-modules/landing-zone-vpc/ibm//modules/management-vpc" + version = "X.X.X" # replace X.X.X with a release version to lock into an exact release + name = "management" + region = "us-south" + prefix = "management-vpc" +} +``` + ### Requirements diff --git a/landing-zone-submodule/management-vpc/main.tf b/modules/management-vpc/main.tf similarity index 100% rename from landing-zone-submodule/management-vpc/main.tf rename to modules/management-vpc/main.tf diff --git a/landing-zone-submodule/management-vpc/outputs.tf b/modules/management-vpc/outputs.tf similarity index 100% rename from landing-zone-submodule/management-vpc/outputs.tf rename to modules/management-vpc/outputs.tf diff --git a/landing-zone-submodule/management-vpc/variables.tf b/modules/management-vpc/variables.tf similarity index 100% rename from landing-zone-submodule/management-vpc/variables.tf rename to modules/management-vpc/variables.tf diff --git a/landing-zone-submodule/management-vpc/version.tf b/modules/management-vpc/version.tf similarity index 100% rename from landing-zone-submodule/management-vpc/version.tf rename to modules/management-vpc/version.tf diff --git a/landing-zone-submodule/workload-vpc/README.md b/modules/workload-vpc/README.md similarity index 96% rename from landing-zone-submodule/workload-vpc/README.md rename to modules/workload-vpc/README.md index 0da5b11a..97a2c38e 100644 --- a/landing-zone-submodule/workload-vpc/README.md +++ b/modules/workload-vpc/README.md @@ -6,6 +6,16 @@ You can use this submodule when you need more modularity to create your topology See the [Landing Zone example](../../examples/landing_zone/) for runnable code. +### Usage +```terraform +module workload_vpc { + source = "terraform-ibm-modules/landing-zone-vpc/ibm//modules/workload-vpc" + version = "X.X.X" # replace X.X.X with a release version to lock into an exact release + name = "workload" + region = "us-south" + prefix = "workload-vpc" +} +``` ### Requirements diff --git a/landing-zone-submodule/workload-vpc/main.tf b/modules/workload-vpc/main.tf similarity index 100% rename from landing-zone-submodule/workload-vpc/main.tf rename to modules/workload-vpc/main.tf diff --git a/landing-zone-submodule/workload-vpc/outputs.tf b/modules/workload-vpc/outputs.tf similarity index 100% rename from landing-zone-submodule/workload-vpc/outputs.tf rename to modules/workload-vpc/outputs.tf diff --git a/landing-zone-submodule/workload-vpc/variables.tf b/modules/workload-vpc/variables.tf similarity index 100% rename from landing-zone-submodule/workload-vpc/variables.tf rename to modules/workload-vpc/variables.tf diff --git a/landing-zone-submodule/workload-vpc/version.tf b/modules/workload-vpc/version.tf similarity index 100% rename from landing-zone-submodule/workload-vpc/version.tf rename to modules/workload-vpc/version.tf