34 lines
957 B
HCL
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
|
|
}
|