diff --git a/README.md b/README.md index 3e086d7..ac433aa 100644 --- a/README.md +++ b/README.md @@ -70,10 +70,10 @@ The `live` directory houses our live infrastructure. This is where you'll find o It is recommended to create a separate directory for each environment (e.g., `dev`, `staging`, `prod`) and region (e.g., `us-east-1`, `us-west-2`, `eu-west-1`). This allows you to easily manage and deploy your infrastructure. -| Module | Description | -| :----------------------------------------------------------------------- | :---------------------------------------------------- | -| [Prod Infrastructure (us-west-2)](./live/prod/us-west-2/README.md) | Terraform root module for our prod infrastructure. | -| [Staging Infrastructure (us-west-2)](./live/staging/us-west-2/README.md) | Terraform root module for our staging infrastructure. | +| Module | Description | +| :------------------------------------------------------------------------------- | :---------------------------------------------------- | +| [Prod App Infrastructure (us-west-2)](./live/prod/us-west-2/app/README.md) | Terraform root module for our prod infrastructure. | +| [Staging App Infrastructure (us-west-2)](./live/staging/us-west-2/app/README.md) | Terraform root module for our staging infrastructure. | ## Terraform Modules diff --git a/live/prod/us-west-2/.terraform.lock.hcl b/live/prod/us-west-2/app/.terraform.lock.hcl similarity index 100% rename from live/prod/us-west-2/.terraform.lock.hcl rename to live/prod/us-west-2/app/.terraform.lock.hcl diff --git a/live/prod/us-west-2/README.md b/live/prod/us-west-2/app/README.md similarity index 100% rename from live/prod/us-west-2/README.md rename to live/prod/us-west-2/app/README.md diff --git a/live/prod/us-west-2/backend.tf b/live/prod/us-west-2/app/backend.tf similarity index 100% rename from live/prod/us-west-2/backend.tf rename to live/prod/us-west-2/app/backend.tf diff --git a/live/prod/us-west-2/bastion.tf b/live/prod/us-west-2/app/bastion.tf similarity index 92% rename from live/prod/us-west-2/bastion.tf rename to live/prod/us-west-2/app/bastion.tf index aafb03e..2b7ffea 100644 --- a/live/prod/us-west-2/bastion.tf +++ b/live/prod/us-west-2/app/bastion.tf @@ -7,7 +7,7 @@ locals { module "bastion" { count = local.bastion.enable ? 1 : 0 - source = "../../../modules/bastion" + source = "../../../../modules/bastion" name = "${module.label.id}-bastion" vpc_id = module.vpc.vpc_id subnets = module.vpc.public_subnets diff --git a/live/prod/us-west-2/context.tf b/live/prod/us-west-2/app/context.tf similarity index 96% rename from live/prod/us-west-2/context.tf rename to live/prod/us-west-2/app/context.tf index f5e6688..29e3340 100644 --- a/live/prod/us-west-2/context.tf +++ b/live/prod/us-west-2/app/context.tf @@ -1,6 +1,6 @@ locals { context = { - name = "infra" + name = "app" namespace = "nan" environment = "prod" tags = { diff --git a/live/staging/us-west-2/docs/MODULE.md b/live/prod/us-west-2/app/docs/MODULE.md similarity index 95% rename from live/staging/us-west-2/docs/MODULE.md rename to live/prod/us-west-2/app/docs/MODULE.md index 10ed033..94a17ca 100644 --- a/live/staging/us-west-2/docs/MODULE.md +++ b/live/prod/us-west-2/app/docs/MODULE.md @@ -16,11 +16,11 @@ | Name | Source | Version | |------|--------|---------| -| <a name="module_bastion"></a> [bastion](#module\_bastion) | ../../../modules/bastion | n/a | -| <a name="module_exampledb"></a> [exampledb](#module\_exampledb) | ../../../modules/rds | n/a | +| <a name="module_bastion"></a> [bastion](#module\_bastion) | ../../../../modules/bastion | n/a | +| <a name="module_exampledb"></a> [exampledb](#module\_exampledb) | ../../../../modules/rds | n/a | | <a name="module_label"></a> [label](#module\_label) | cloudposse/label/null | 0.25.0 | | <a name="module_terraform_state_backend"></a> [terraform\_state\_backend](#module\_terraform\_state\_backend) | cloudposse/tfstate-backend/aws | 1.1.1 | -| <a name="module_vpc"></a> [vpc](#module\_vpc) | ../../../modules/vpc | n/a | +| <a name="module_vpc"></a> [vpc](#module\_vpc) | ../../../../modules/vpc | n/a | ## Resources diff --git a/live/staging/us-west-2/example-rds-instance.tf b/live/prod/us-west-2/app/example-rds-instance.tf similarity index 96% rename from live/staging/us-west-2/example-rds-instance.tf rename to live/prod/us-west-2/app/example-rds-instance.tf index 85b9a81..46fdade 100644 --- a/live/staging/us-west-2/example-rds-instance.tf +++ b/live/prod/us-west-2/app/example-rds-instance.tf @@ -6,7 +6,7 @@ locals { } module "exampledb" { - source = "../../../modules/rds" + source = "../../../../modules/rds" name = "${module.label.id}-exampledb" diff --git a/live/prod/us-west-2/main.tf b/live/prod/us-west-2/app/main.tf similarity index 100% rename from live/prod/us-west-2/main.tf rename to live/prod/us-west-2/app/main.tf diff --git a/live/prod/us-west-2/outputs.tf b/live/prod/us-west-2/app/outputs.tf similarity index 100% rename from live/prod/us-west-2/outputs.tf rename to live/prod/us-west-2/app/outputs.tf diff --git a/live/prod/us-west-2/versions.tf b/live/prod/us-west-2/app/versions.tf similarity index 100% rename from live/prod/us-west-2/versions.tf rename to live/prod/us-west-2/app/versions.tf diff --git a/live/prod/us-west-2/vpc.tf b/live/prod/us-west-2/app/vpc.tf similarity index 95% rename from live/prod/us-west-2/vpc.tf rename to live/prod/us-west-2/app/vpc.tf index 2cfdbe8..16a3f0b 100644 --- a/live/prod/us-west-2/vpc.tf +++ b/live/prod/us-west-2/app/vpc.tf @@ -1,5 +1,5 @@ module "vpc" { - source = "../../../modules/vpc" + source = "../../../../modules/vpc" name = module.label.id vpc_cidr_block = "10.0.0.0/16" tags = module.label.tags diff --git a/live/staging/us-west-2/.terraform.lock.hcl b/live/staging/us-west-2/app/.terraform.lock.hcl similarity index 100% rename from live/staging/us-west-2/.terraform.lock.hcl rename to live/staging/us-west-2/app/.terraform.lock.hcl diff --git a/live/staging/us-west-2/README.md b/live/staging/us-west-2/app/README.md similarity index 100% rename from live/staging/us-west-2/README.md rename to live/staging/us-west-2/app/README.md diff --git a/live/staging/us-west-2/backend.tf b/live/staging/us-west-2/app/backend.tf similarity index 100% rename from live/staging/us-west-2/backend.tf rename to live/staging/us-west-2/app/backend.tf diff --git a/live/staging/us-west-2/bastion.tf b/live/staging/us-west-2/app/bastion.tf similarity index 92% rename from live/staging/us-west-2/bastion.tf rename to live/staging/us-west-2/app/bastion.tf index aafb03e..2b7ffea 100644 --- a/live/staging/us-west-2/bastion.tf +++ b/live/staging/us-west-2/app/bastion.tf @@ -7,7 +7,7 @@ locals { module "bastion" { count = local.bastion.enable ? 1 : 0 - source = "../../../modules/bastion" + source = "../../../../modules/bastion" name = "${module.label.id}-bastion" vpc_id = module.vpc.vpc_id subnets = module.vpc.public_subnets diff --git a/live/staging/us-west-2/context.tf b/live/staging/us-west-2/app/context.tf similarity index 96% rename from live/staging/us-west-2/context.tf rename to live/staging/us-west-2/app/context.tf index 808c8eb..8090493 100644 --- a/live/staging/us-west-2/context.tf +++ b/live/staging/us-west-2/app/context.tf @@ -1,6 +1,6 @@ locals { context = { - name = "infra" + name = "app" namespace = "nan" environment = "staging" tags = { diff --git a/live/prod/us-west-2/docs/MODULE.md b/live/staging/us-west-2/app/docs/MODULE.md similarity index 95% rename from live/prod/us-west-2/docs/MODULE.md rename to live/staging/us-west-2/app/docs/MODULE.md index 10ed033..94a17ca 100644 --- a/live/prod/us-west-2/docs/MODULE.md +++ b/live/staging/us-west-2/app/docs/MODULE.md @@ -16,11 +16,11 @@ | Name | Source | Version | |------|--------|---------| -| <a name="module_bastion"></a> [bastion](#module\_bastion) | ../../../modules/bastion | n/a | -| <a name="module_exampledb"></a> [exampledb](#module\_exampledb) | ../../../modules/rds | n/a | +| <a name="module_bastion"></a> [bastion](#module\_bastion) | ../../../../modules/bastion | n/a | +| <a name="module_exampledb"></a> [exampledb](#module\_exampledb) | ../../../../modules/rds | n/a | | <a name="module_label"></a> [label](#module\_label) | cloudposse/label/null | 0.25.0 | | <a name="module_terraform_state_backend"></a> [terraform\_state\_backend](#module\_terraform\_state\_backend) | cloudposse/tfstate-backend/aws | 1.1.1 | -| <a name="module_vpc"></a> [vpc](#module\_vpc) | ../../../modules/vpc | n/a | +| <a name="module_vpc"></a> [vpc](#module\_vpc) | ../../../../modules/vpc | n/a | ## Resources diff --git a/live/prod/us-west-2/example-rds-instance.tf b/live/staging/us-west-2/app/example-rds-instance.tf similarity index 96% rename from live/prod/us-west-2/example-rds-instance.tf rename to live/staging/us-west-2/app/example-rds-instance.tf index 85b9a81..46fdade 100644 --- a/live/prod/us-west-2/example-rds-instance.tf +++ b/live/staging/us-west-2/app/example-rds-instance.tf @@ -6,7 +6,7 @@ locals { } module "exampledb" { - source = "../../../modules/rds" + source = "../../../../modules/rds" name = "${module.label.id}-exampledb" diff --git a/live/staging/us-west-2/main.tf b/live/staging/us-west-2/app/main.tf similarity index 100% rename from live/staging/us-west-2/main.tf rename to live/staging/us-west-2/app/main.tf diff --git a/live/staging/us-west-2/outputs.tf b/live/staging/us-west-2/app/outputs.tf similarity index 100% rename from live/staging/us-west-2/outputs.tf rename to live/staging/us-west-2/app/outputs.tf diff --git a/live/staging/us-west-2/versions.tf b/live/staging/us-west-2/app/versions.tf similarity index 100% rename from live/staging/us-west-2/versions.tf rename to live/staging/us-west-2/app/versions.tf diff --git a/live/staging/us-west-2/vpc.tf b/live/staging/us-west-2/app/vpc.tf similarity index 95% rename from live/staging/us-west-2/vpc.tf rename to live/staging/us-west-2/app/vpc.tf index 6f3b2ab..1da0966 100644 --- a/live/staging/us-west-2/vpc.tf +++ b/live/staging/us-west-2/app/vpc.tf @@ -1,5 +1,5 @@ module "vpc" { - source = "../../../modules/vpc" + source = "../../../../modules/vpc" name = module.label.id vpc_cidr_block = "10.1.0.0/16" tags = module.label.tags