From 68dc684537ce9a5d650b30aac0f13baa5480c5e2 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Sun, 31 Aug 2025 11:20:25 +0700 Subject: [PATCH] feat(infra): bootstrap staging cluster --- infra/staging/bootstrap/.terraform.lock.hcl | 42 +++++++++++++++++++++ infra/staging/bootstrap/terragrunt.hcl | 24 ++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 infra/staging/bootstrap/.terraform.lock.hcl create mode 100644 infra/staging/bootstrap/terragrunt.hcl diff --git a/infra/staging/bootstrap/.terraform.lock.hcl b/infra/staging/bootstrap/.terraform.lock.hcl new file mode 100644 index 0000000..93df720 --- /dev/null +++ b/infra/staging/bootstrap/.terraform.lock.hcl @@ -0,0 +1,42 @@ +# This file is maintained automatically by "tofu init". +# Manual edits may be lost in future updates. + +provider "registry.opentofu.org/alekc/kubectl" { + version = "2.1.3" + constraints = "~> 2.0" + hashes = [ + "h1:AymCb0DCWzmyLqn1qEhVs2pcFUZGT/kxPK+I/BObFH8=", + "zh:0e601ae36ebc32eb8c10aff4c48c1125e471fa09f5668465af7581c9057fa22c", + "zh:1773f08a412d1a5f89bac174fe1efdfd255ecdda92d31a2e31937e4abf843a2f", + "zh:1da2db1f940c5d34e31c2384c7bd7acba68725cc1d3ba6db0fec42efe80dbfb7", + "zh:20dc810fb09031bcfea4f276e1311e8286d8d55705f55433598418b7bcc76357", + "zh:326a01c86ba90f6c6eb121bacaabb85cfa9059d6587aea935a9bbb6d3d8e3f3f", + "zh:5a3737ea1e08421fe3e700dc833c6fd2c7b8c3f32f5444e844b3fe0c2352757b", + "zh:5f490acbd0348faefea273cb358db24e684cbdcac07c71002ee26b6cfd2c54a0", + "zh:777688cda955213ba637e2ac6b1994e438a5af4d127a34ecb9bb010a8254f8a8", + "zh:7acc32371053592f55ee0bcbbc2f696a8466415dea7f4bc5a6573f03953fc926", + "zh:81f0108e2efe5ae71e651a8826b61d0ce6918811ccfdc0e5b81b2cfb0f7f57fe", + "zh:88b785ea7185720cf40679cb8fa17e57b8b07fd6322cf2d4000b835282033d81", + "zh:89d833336b5cd027e671b46f9c5bc7d10c5109e95297639bbec8001da89aa2f7", + "zh:df108339a89d4372e5b13f77bd9d53c02a04362fb5d85e1d9b6b47292e30821c", + "zh:e8a2e3a5c50ca124e6014c361d72a9940d8e815f37ae2d1e9487ac77c3043013", + ] +} + +provider "registry.opentofu.org/hashicorp/helm" { + version = "2.17.0" + constraints = "~> 2.17" + hashes = [ + "h1:69PnHoYrrDrm7C8+8PiSvRGPI55taqL14SvQR/FGM+g=", + "zh:02690815e35131a42cb9851f63a3369c216af30ad093d05b39001d43da04b56b", + "zh:27a62f12b29926387f4d71aeeee9f7ffa0ccb81a1b6066ee895716ad050d1b7a", + "zh:2d0a5babfa73604b3fefc9dab9c87f91c77fce756c2e32b294e9f1290aed26c0", + "zh:3976400ceba6dda4636e1d297e3097e1831de5628afa534a166de98a70d1dcbe", + "zh:54440ef14f342b41d75c1aded7487bfcc3f76322b75894235b47b7e89ac4bfa4", + "zh:6512e2ab9f2fa31cbb90d9249647b5c5798f62eb1215ec44da2cdaa24e38ad25", + "zh:795f327ca0b8c5368af0ed03d5d4f6da7260692b4b3ca0bd004ed542e683464d", + "zh:ba659e1d94f224bc3f1fd34cbb9d2663e3a8e734108e5a58eb49eda84b140978", + "zh:c5c8575c4458835c2acbc3d1ed5570589b14baa2525d8fbd04295c097caf41eb", + "zh:e0877a5dac3de138e61eefa26b2f5a13305a17259779465899880f70e11314e0", + ] +} diff --git a/infra/staging/bootstrap/terragrunt.hcl b/infra/staging/bootstrap/terragrunt.hcl new file mode 100644 index 0000000..c23d88d --- /dev/null +++ b/infra/staging/bootstrap/terragrunt.hcl @@ -0,0 +1,24 @@ +include "root" { + path = find_in_parent_folders("root.hcl") +} + +terraform { + source = "${find_in_parent_folders("_modules")}//bootstrap" +} + +dependency "cluster" { + # TODO unify module names + config_path = "../nixos" +} + +inputs = { + cluster = "staging" + credentials = { + host = dependency.cluster.outputs.credentials.host + client_certificate = dependency.cluster.outputs.credentials.client_certificate + client_key = dependency.cluster.outputs.credentials.client_key + cluster_ca_certificate = dependency.cluster.outputs.credentials.cluster_ca_certificate + } + platform = "k3s" + cluster_domain = "cloudlab-staging.khuedoan.com" +} -- 2.51.2