this repo has no description
0
fork

Configure Feed

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

feat(infra/staging): setup root config

+59
+59
infra/staging/root.hcl
··· 1 + locals { 2 + secrets = yamldecode(sops_decrypt_file(find_in_parent_folders("secrets.yaml"))) 3 + env = basename(get_parent_terragrunt_dir()) 4 + cloud = split("/", path_relative_to_include())[0] 5 + } 6 + 7 + generate "backend" { 8 + path = "backend.tf.json" 9 + if_exists = "overwrite" 10 + disable_signature = true 11 + contents = jsonencode({ 12 + terraform = { 13 + backend = { 14 + s3 = { 15 + bucket = "tfstate-${local.env}" 16 + key = "${path_relative_to_include()}/tfstate.json" 17 + region = "auto" 18 + skip_credentials_validation = true 19 + skip_metadata_api_check = true 20 + skip_region_validation = true 21 + skip_requesting_account_id = true 22 + skip_s3_checksum = true 23 + use_path_style = true 24 + access_key = local.secrets.cloudflare_tfstate_access_key 25 + secret_key = local.secrets.cloudflare_tfstate_secret_key 26 + endpoints = { 27 + s3 = "https://${local.secrets.cloudflare_account_id}.r2.cloudflarestorage.com" 28 + } 29 + } 30 + } 31 + } 32 + }) 33 + } 34 + 35 + generate "provider" { 36 + path = "provider.tf.json" 37 + if_exists = "overwrite" 38 + disable_signature = true 39 + 40 + contents = jsonencode(lookup( 41 + { 42 + hetzner = { 43 + provider = { 44 + hcloud = {} 45 + } 46 + } 47 + proxmox = { 48 + provider = { 49 + proxmox = { 50 + endpoint = "https://proxmox:8006" 51 + insecure = true 52 + } 53 + } 54 + } 55 + }, 56 + local.cloud, 57 + {} 58 + )) 59 + }