this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(infra): remote tfstate even for local

Khue Doan 581011d8 16716a9a

+43 -9
+4 -8
Makefile
··· 1 1 .POSIX: 2 2 .PHONY: default docker-compose infra cluster system platform apps secrets edit-secrets test update 3 3 4 + env ?= local 4 5 # TODO multiple clusters 5 6 export KUBECONFIG = $(shell pwd)/cluster/kubeconfig.yaml 6 7 ··· 13 14 # https://search.opentofu.org/provider/opentofu/tfe 14 15 tofu login app.terraform.io 15 16 16 - infra/terraform.tfvars: 17 - cp infra/terraform.tfvars.example infra/terraform.tfvars 18 - nvim infra/terraform.tfvars 19 - 20 - infra: ~/.terraform.d/credentials.tfrc.json infra/terraform.tfvars 21 - cd infra \ 22 - && tofu init \ 23 - && tofu apply 17 + infra: 18 + cd infra/${env} \ 19 + && AWS_ACCESS_KEY_ID=minioadmin AWS_SECRET_ACCESS_KEY=minioadmin terragrunt apply --all 24 20 25 21 cluster: 26 22 cd cluster && ansible-playbook \
+9
compose.yaml
··· 21 21 depends_on: 22 22 temporal: 23 23 condition: service_healthy 24 + tfstate: 25 + image: quay.io/minio/minio:RELEASE.2025-05-24T17-08-30Z 26 + command: 27 + - server 28 + - /data 29 + - --console-address=:9001 30 + ports: 31 + - 9000:9000 32 + - 9001:9001
+1 -1
controller/workflows/infra.go
··· 25 25 // { 26 26 // "url": "https://github.com/khuedoan/cloudlab", 27 27 // "revision": "infra-rewrite", 28 - // "oldRevision": "7796870a3c17105d7a13c5b6c990fa895de64952", 28 + // "oldRevision": "790763a8166e306f34559870c60e818505117e6b", 29 29 // "stack": "local" 30 30 // } 31 31 func Infra(ctx workflow.Context, input InfraInputs) (*activities.Graph, error) {
+4
infra/local/bootstrap/terragrunt.hcl
··· 1 + include "root" { 2 + path = find_in_parent_folders("root.hcl") 3 + } 4 + 1 5 terraform { 2 6 source = "../../modules/local-bootstrap" 3 7 }
+4
infra/local/cluster/terragrunt.hcl
··· 1 + include "root" { 2 + path = find_in_parent_folders("root.hcl") 3 + } 4 + 1 5 terraform { 2 6 source = "../../modules/local-cluster" 3 7 }
+21
infra/local/root.hcl
··· 1 + remote_state { 2 + backend = "s3" 3 + config = { 4 + encrypt = false 5 + endpoint = "http://localhost:9000" 6 + bucket = "tfstate" 7 + key = "${path_relative_to_include()}/terraform.tfstate" 8 + region = "eu-west-1" 9 + disable_aws_client_checksums = true 10 + skip_bucket_ssencryption = true 11 + skip_bucket_public_access_blocking = true 12 + skip_bucket_enforced_tls = true 13 + skip_bucket_root_access = true 14 + skip_credentials_validation = true 15 + force_path_style = true 16 + } 17 + generate = { 18 + path = "backend.tf" 19 + if_exists = "overwrite_terragrunt" 20 + } 21 + }