diff --git a/infra/README.md b/infra/README.md index dbf29e93..08139ed9 100644 --- a/infra/README.md +++ b/infra/README.md @@ -8,11 +8,11 @@ The repository is organized into the following directories, each corresponding t - **[`/core`](./core/)** - This directory contains the Terraform configurations for the global/shared resources used across all environments. These may include VPCs, shared databases, IAM roles, etc. -- **[`/server-prod`](./server-prod/)** - Contains the Terraform configurations for the production web server. This workspace should be configured with production-grade settings, ensuring high availability and security. +- **[`/server`](./server/)** - Contains the Terraform configurations for the production web server. This workspace should be configured with production-grade settings, ensuring high availability and security. -- **[`/server-test`](./server-test/)** - Holds the configurations for the testing/QA web server. This environment mirrors production closely and is used for final testing before deploying to production. +- **[`/server-preview`](./server-preview/)** - This directory is for the preview web server, typically used for pull request reviews. It might contain configurations that are under testing or not yet approved for the testing environment. -- **[`/server-preview`](./server-preview/)** - This directory is for the preview web server, typically used for staging and pre-release reviews. It might contain configurations that are under testing or not yet approved for the testing environment. +- **[`/server-test`](./server-test/)** - Holds the configurations for the testing/QA web server. This environment mirrors production closely and is used for final testing before deploying to production. ## Usage @@ -32,7 +32,7 @@ The repository is organized into the following directories, each corresponding t To work with Terraform configurations: -1. Navigate to the appropriate directory (e.g., `cd server-prod`). +1. Navigate to the appropriate directory (e.g., `cd server`). 2. Initialize Terraform: `terraform init`. 3. Apply configurations: `terraform apply`. diff --git a/infra/core/storage.tf b/infra/core/storage.tf index 833e5a81..c82ec10f 100644 --- a/infra/core/storage.tf +++ b/infra/core/storage.tf @@ -9,7 +9,7 @@ resource "google_storage_bucket" "pkg" { name = "pkg.${var.root_level_domain}" - location = "US" + location = var.gcp_region force_destroy = false uniform_bucket_level_access = true diff --git a/infra/server-prod/.terraform.lock.hcl b/infra/server/.terraform.lock.hcl similarity index 53% rename from infra/server-prod/.terraform.lock.hcl rename to infra/server/.terraform.lock.hcl index aaf8f7e9..e79904df 100644 --- a/infra/server-prod/.terraform.lock.hcl +++ b/infra/server/.terraform.lock.hcl @@ -20,3 +20,22 @@ provider "registry.terraform.io/hashicorp/google" { "zh:f913a0e0708391ccd26fc3458158cc1e10d68dc621bef3a1583328c61a77225d", ] } + +provider "registry.terraform.io/hashicorp/tfe" { + version = "0.51.1" + hashes = [ + "h1:n7O1yooxtUk1G0T0jyrt5ItstX5fIPoSUqMibBHA6E0=", + "zh:08f5c2296a7eba39fb3b86cc9f294ac7a9ca06eee1dec44fbf14615523fd24d0", + "zh:46ea31b9ca5450d947c0b28b698aca6df97714e671f25a2e2c9ea3ba0e0d45a0", + "zh:6326962e8afda2da9c2724a465eee4ae12c514700ccfaead7be81c73d6d7f8cd", + "zh:649639793e0cbfe8732377052110441ae24b4a3b2e35126aab5d0b9da291ac9a", + "zh:8ca07718347273bbbc8a7c0f488da22efa38a67ec05b6db3bf97d01d9ba600c0", + "zh:a9065ad79c7a3d91ee1f7021edea02f92ace116830fa0857580dcd267643a016", + "zh:bc6014f7597b281ca9aa73fe91c9060f29311096a543c2cf794803920662edc4", + "zh:c48897ce5820983c1a94b6912317fbf4927b4eca9f550c7d5e1af40a4bc9fd5f", + "zh:ca32cc1543d65a1e418eaadccd0f00d6a626ff0b40d495e508b444d95b290ed0", + "zh:d179e1f38f789ebefb4cfce8148181999bd2e24f860b2e18cdaeca2b37fbe7f6", + "zh:d95ec293fa70e946b6cd657912b33155f8be3413e6128ed2bfa5a493f788e439", + "zh:fe9538fc1da16bbd675f33176ac3d2a20c264b5c7a14389c552a889f7a1c46e4", + ] +} diff --git a/infra/server-prod/database.tf b/infra/server/database.tf similarity index 100% rename from infra/server-prod/database.tf rename to infra/server/database.tf diff --git a/infra/server-prod/providers.tf b/infra/server/providers.tf similarity index 100% rename from infra/server-prod/providers.tf rename to infra/server/providers.tf diff --git a/infra/server-prod/terraform.tf b/infra/server/terraform.tf similarity index 92% rename from infra/server-prod/terraform.tf rename to infra/server/terraform.tf index b5a47d58..6a7c0e5a 100644 --- a/infra/server-prod/terraform.tf +++ b/infra/server/terraform.tf @@ -7,7 +7,7 @@ terraform { workspaces { project = "default" - name = "server-prod" + name = "server" } } diff --git a/infra/server-prod/variables.tf b/infra/server/variables.tf similarity index 100% rename from infra/server-prod/variables.tf rename to infra/server/variables.tf