From 0a0deed44da662a74916c22662ef801294be129d Mon Sep 17 00:00:00 2001 From: Ross Buggins Date: Fri, 28 Jun 2024 13:51:35 +0100 Subject: [PATCH] move terraform to infra dir --- .vscode/settings.json | 3 +-- {terraform => infrastructure/terraform}/.gitignore | 0 .../terraform}/bin/terraform.sh | 0 .../terraform}/bootstrap/.terraform-version | 0 .../bootstrap/data_iam_policy_document_bucket.tf | 0 .../bootstrap/data_iam_policy_document_kms_key_s3.tf | 0 .../terraform}/bootstrap/dynamodb_table.tf | 0 .../terraform}/bootstrap/kms_key_s3.tf | 0 .../terraform}/bootstrap/locals.tf | 0 .../terraform}/bootstrap/outputs.tf | 0 .../terraform}/bootstrap/provider_aws.tf | 0 .../terraform}/bootstrap/s3_bucket.tf | 0 .../bootstrap/s3_bucket_lifecycle_configuration.tf | 0 .../bootstrap/s3_bucket_ownership_controls.tf | 0 .../terraform}/bootstrap/s3_bucket_policy.tf | 0 .../bootstrap/s3_bucket_public_access_block.tf | 0 .../s3_bucket_server_side_encryption_configuration.tf | 0 .../terraform}/bootstrap/s3_bucket_versioning.tf | 0 .../terraform}/bootstrap/variables.tf | 0 .../terraform}/bootstrap/versions.tf | 0 .../terraform}/components/.gitkeep | 0 .../terraform}/components/examplecomponent/main.tf | 0 .../terraform}/components/examplecomponent/outputs.tf | 0 .../components/examplecomponent/variables.tf | 0 {terraform => infrastructure/terraform}/etc/.gitkeep | 0 .../terraform}/modules/.gitkeep | 0 nhs-notify-repository-template.code-workspace | 6 +----- terraform/etc/env_eu-west-2_exampleenv.tfvars | 10 ---------- terraform/etc/eu-west-2.tfvars | 2 -- terraform/etc/global.tfvars | 6 ------ terraform/etc/group_examplegroup.tfvars | 1 - terraform/etc/versions_eg-region-1_exampleenv.tfvars | 2 -- terraform/plugin-cache/.gitkeep | 0 33 files changed, 2 insertions(+), 28 deletions(-) rename {terraform => infrastructure/terraform}/.gitignore (100%) rename {terraform => infrastructure/terraform}/bin/terraform.sh (100%) rename {terraform => infrastructure/terraform}/bootstrap/.terraform-version (100%) rename {terraform => infrastructure/terraform}/bootstrap/data_iam_policy_document_bucket.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/data_iam_policy_document_kms_key_s3.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/dynamodb_table.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/kms_key_s3.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/locals.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/outputs.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/provider_aws.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/s3_bucket.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/s3_bucket_lifecycle_configuration.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/s3_bucket_ownership_controls.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/s3_bucket_policy.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/s3_bucket_public_access_block.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/s3_bucket_server_side_encryption_configuration.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/s3_bucket_versioning.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/variables.tf (100%) rename {terraform => infrastructure/terraform}/bootstrap/versions.tf (100%) rename {terraform => infrastructure/terraform}/components/.gitkeep (100%) rename {terraform => infrastructure/terraform}/components/examplecomponent/main.tf (100%) rename {terraform => infrastructure/terraform}/components/examplecomponent/outputs.tf (100%) rename {terraform => infrastructure/terraform}/components/examplecomponent/variables.tf (100%) rename {terraform => infrastructure/terraform}/etc/.gitkeep (100%) rename {terraform => infrastructure/terraform}/modules/.gitkeep (100%) delete mode 100644 terraform/etc/env_eu-west-2_exampleenv.tfvars delete mode 100644 terraform/etc/eu-west-2.tfvars delete mode 100644 terraform/etc/global.tfvars delete mode 100644 terraform/etc/group_examplegroup.tfvars delete mode 100644 terraform/etc/versions_eg-region-1_exampleenv.tfvars delete mode 100644 terraform/plugin-cache/.gitkeep diff --git a/.vscode/settings.json b/.vscode/settings.json index ed740f0c..7d4e59b9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,7 +14,6 @@ ".vscode": false, "tests":true, "infrastructure":true, - "scripts":true, - "terraform": true + "scripts":true } } diff --git a/terraform/.gitignore b/infrastructure/terraform/.gitignore similarity index 100% rename from terraform/.gitignore rename to infrastructure/terraform/.gitignore diff --git a/terraform/bin/terraform.sh b/infrastructure/terraform/bin/terraform.sh similarity index 100% rename from terraform/bin/terraform.sh rename to infrastructure/terraform/bin/terraform.sh diff --git a/terraform/bootstrap/.terraform-version b/infrastructure/terraform/bootstrap/.terraform-version similarity index 100% rename from terraform/bootstrap/.terraform-version rename to infrastructure/terraform/bootstrap/.terraform-version diff --git a/terraform/bootstrap/data_iam_policy_document_bucket.tf b/infrastructure/terraform/bootstrap/data_iam_policy_document_bucket.tf similarity index 100% rename from terraform/bootstrap/data_iam_policy_document_bucket.tf rename to infrastructure/terraform/bootstrap/data_iam_policy_document_bucket.tf diff --git a/terraform/bootstrap/data_iam_policy_document_kms_key_s3.tf b/infrastructure/terraform/bootstrap/data_iam_policy_document_kms_key_s3.tf similarity index 100% rename from terraform/bootstrap/data_iam_policy_document_kms_key_s3.tf rename to infrastructure/terraform/bootstrap/data_iam_policy_document_kms_key_s3.tf diff --git a/terraform/bootstrap/dynamodb_table.tf b/infrastructure/terraform/bootstrap/dynamodb_table.tf similarity index 100% rename from terraform/bootstrap/dynamodb_table.tf rename to infrastructure/terraform/bootstrap/dynamodb_table.tf diff --git a/terraform/bootstrap/kms_key_s3.tf b/infrastructure/terraform/bootstrap/kms_key_s3.tf similarity index 100% rename from terraform/bootstrap/kms_key_s3.tf rename to infrastructure/terraform/bootstrap/kms_key_s3.tf diff --git a/terraform/bootstrap/locals.tf b/infrastructure/terraform/bootstrap/locals.tf similarity index 100% rename from terraform/bootstrap/locals.tf rename to infrastructure/terraform/bootstrap/locals.tf diff --git a/terraform/bootstrap/outputs.tf b/infrastructure/terraform/bootstrap/outputs.tf similarity index 100% rename from terraform/bootstrap/outputs.tf rename to infrastructure/terraform/bootstrap/outputs.tf diff --git a/terraform/bootstrap/provider_aws.tf b/infrastructure/terraform/bootstrap/provider_aws.tf similarity index 100% rename from terraform/bootstrap/provider_aws.tf rename to infrastructure/terraform/bootstrap/provider_aws.tf diff --git a/terraform/bootstrap/s3_bucket.tf b/infrastructure/terraform/bootstrap/s3_bucket.tf similarity index 100% rename from terraform/bootstrap/s3_bucket.tf rename to infrastructure/terraform/bootstrap/s3_bucket.tf diff --git a/terraform/bootstrap/s3_bucket_lifecycle_configuration.tf b/infrastructure/terraform/bootstrap/s3_bucket_lifecycle_configuration.tf similarity index 100% rename from terraform/bootstrap/s3_bucket_lifecycle_configuration.tf rename to infrastructure/terraform/bootstrap/s3_bucket_lifecycle_configuration.tf diff --git a/terraform/bootstrap/s3_bucket_ownership_controls.tf b/infrastructure/terraform/bootstrap/s3_bucket_ownership_controls.tf similarity index 100% rename from terraform/bootstrap/s3_bucket_ownership_controls.tf rename to infrastructure/terraform/bootstrap/s3_bucket_ownership_controls.tf diff --git a/terraform/bootstrap/s3_bucket_policy.tf b/infrastructure/terraform/bootstrap/s3_bucket_policy.tf similarity index 100% rename from terraform/bootstrap/s3_bucket_policy.tf rename to infrastructure/terraform/bootstrap/s3_bucket_policy.tf diff --git a/terraform/bootstrap/s3_bucket_public_access_block.tf b/infrastructure/terraform/bootstrap/s3_bucket_public_access_block.tf similarity index 100% rename from terraform/bootstrap/s3_bucket_public_access_block.tf rename to infrastructure/terraform/bootstrap/s3_bucket_public_access_block.tf diff --git a/terraform/bootstrap/s3_bucket_server_side_encryption_configuration.tf b/infrastructure/terraform/bootstrap/s3_bucket_server_side_encryption_configuration.tf similarity index 100% rename from terraform/bootstrap/s3_bucket_server_side_encryption_configuration.tf rename to infrastructure/terraform/bootstrap/s3_bucket_server_side_encryption_configuration.tf diff --git a/terraform/bootstrap/s3_bucket_versioning.tf b/infrastructure/terraform/bootstrap/s3_bucket_versioning.tf similarity index 100% rename from terraform/bootstrap/s3_bucket_versioning.tf rename to infrastructure/terraform/bootstrap/s3_bucket_versioning.tf diff --git a/terraform/bootstrap/variables.tf b/infrastructure/terraform/bootstrap/variables.tf similarity index 100% rename from terraform/bootstrap/variables.tf rename to infrastructure/terraform/bootstrap/variables.tf diff --git a/terraform/bootstrap/versions.tf b/infrastructure/terraform/bootstrap/versions.tf similarity index 100% rename from terraform/bootstrap/versions.tf rename to infrastructure/terraform/bootstrap/versions.tf diff --git a/terraform/components/.gitkeep b/infrastructure/terraform/components/.gitkeep similarity index 100% rename from terraform/components/.gitkeep rename to infrastructure/terraform/components/.gitkeep diff --git a/terraform/components/examplecomponent/main.tf b/infrastructure/terraform/components/examplecomponent/main.tf similarity index 100% rename from terraform/components/examplecomponent/main.tf rename to infrastructure/terraform/components/examplecomponent/main.tf diff --git a/terraform/components/examplecomponent/outputs.tf b/infrastructure/terraform/components/examplecomponent/outputs.tf similarity index 100% rename from terraform/components/examplecomponent/outputs.tf rename to infrastructure/terraform/components/examplecomponent/outputs.tf diff --git a/terraform/components/examplecomponent/variables.tf b/infrastructure/terraform/components/examplecomponent/variables.tf similarity index 100% rename from terraform/components/examplecomponent/variables.tf rename to infrastructure/terraform/components/examplecomponent/variables.tf diff --git a/terraform/etc/.gitkeep b/infrastructure/terraform/etc/.gitkeep similarity index 100% rename from terraform/etc/.gitkeep rename to infrastructure/terraform/etc/.gitkeep diff --git a/terraform/modules/.gitkeep b/infrastructure/terraform/modules/.gitkeep similarity index 100% rename from terraform/modules/.gitkeep rename to infrastructure/terraform/modules/.gitkeep diff --git a/nhs-notify-repository-template.code-workspace b/nhs-notify-repository-template.code-workspace index 1ccca0db..cb384d0e 100644 --- a/nhs-notify-repository-template.code-workspace +++ b/nhs-notify-repository-template.code-workspace @@ -13,7 +13,7 @@ "path": "./tests" }, { - "name": "Infra", + "name": "Infrastructure", "path": "./infrastructure" }, { @@ -32,10 +32,6 @@ "name": "Dev Container", "path": ".devcontainer" }, - { - "name": "Terraform", - "path": "terraform" - } ], "settings": { diff --git a/terraform/etc/env_eu-west-2_exampleenv.tfvars b/terraform/etc/env_eu-west-2_exampleenv.tfvars deleted file mode 100644 index 8317d388..00000000 --- a/terraform/etc/env_eu-west-2_exampleenv.tfvars +++ /dev/null @@ -1,10 +0,0 @@ -# Define variable values to be fed into components in the components directory that will each form a part of the examplenv environment... - -environment = "exampleenv" - -default_tags = { - "Project" = "myproject" - "Environment" = "exampleenv" - "Owner" = "My Project Manager" - "Client" = "My Client" -} diff --git a/terraform/etc/eu-west-2.tfvars b/terraform/etc/eu-west-2.tfvars deleted file mode 100644 index 53cd511a..00000000 --- a/terraform/etc/eu-west-2.tfvars +++ /dev/null @@ -1,2 +0,0 @@ -# Specific to region within project/AWS Account -region = "eu-west-2" diff --git a/terraform/etc/global.tfvars b/terraform/etc/global.tfvars deleted file mode 100644 index 216b4b47..00000000 --- a/terraform/etc/global.tfvars +++ /dev/null @@ -1,6 +0,0 @@ -# Specific to whole project / AWS Account -# CHANGEME: these should be set for the project you are working on -# project should ideally be as short as possible whilst being meaningful as it will be used in resource naming! -# aws_account_id should be set to the AWS account ID you are running Terraform in the context of - you will get errors otherwise... -project = "myproject" -aws_account_id = "012345678901" diff --git a/terraform/etc/group_examplegroup.tfvars b/terraform/etc/group_examplegroup.tfvars deleted file mode 100644 index 59493824..00000000 --- a/terraform/etc/group_examplegroup.tfvars +++ /dev/null @@ -1 +0,0 @@ -# Variables shared by any environment that chooses to be subscribed to it diff --git a/terraform/etc/versions_eg-region-1_exampleenv.tfvars b/terraform/etc/versions_eg-region-1_exampleenv.tfvars deleted file mode 100644 index 31b06028..00000000 --- a/terraform/etc/versions_eg-region-1_exampleenv.tfvars +++ /dev/null @@ -1,2 +0,0 @@ -# Define variable values to be fed into components in the components directory that will each form a part of the examplenv environment... -my_example_docker_app_version = "0.0.1" diff --git a/terraform/plugin-cache/.gitkeep b/terraform/plugin-cache/.gitkeep deleted file mode 100644 index e69de29b..00000000