Files
terraform-git/environments/root.hcl
T
unkinben 0385d2a1ef
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
vault provider: skip child token creation in CI
Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-27 21:52:24 +10:00

34 lines
957 B
HCL

generate "backend" {
path = "backend.tf"
if_exists = "overwrite"
contents = <<EOF
provider "gitea" {
base_url = "https://git.unkin.net"
cacert_file = "/etc/pki/tls/certs/ca-bundle.crt"
}
provider "woodpecker" {
server = "https://ci.k8s.syd1.au.unkin.net"
}
# Address + token come from VAULT_ADDR / VAULT_TOKEN in the environment (the
# Makefile authenticates via k8s auth before running terragrunt). Used to seed
# bot-account credentials into Vault KV (see modules/user vault_seed_path).
# skip_child_token: the CI token from the k8s auth role cannot create child
# tokens (apply fails with "failed to create limited child token").
provider "vault" {
skip_child_token = true
}
terraform {
backend "consul" {
address = "https://consul.service.consul"
path = "infra/terraform/git/${path_relative_to_include()}/state"
scheme = "https"
lock = true
ca_file = "/etc/pki/tls/certs/ca-bundle.crt"
}
}
EOF
}