From 8e10a340f54d048b2a3cc324646b71a644eb4a8f Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Tue, 17 Nov 2026 23:45:49 +1100 Subject: [PATCH] Extend terraform-git Vault token and Consul lease TTLs (#186) terraform-git's Consul lease (max_ttl 300s) and its Vault parent token expire before a long apply finishes, so the state save fails with `403 ACL not found` and resources created during the apply are lost from state. - Raise consul role `terraform-git` to ttl 1800 / max_ttl 3600 - Raise k8s role `woodpecker_terraform_git` to token_ttl/token_max_ttl 3600 - Raise approle `terraform_git` to token_ttl/token_max_ttl 3600 Reviewed-on: https://git.unkin.net/unkin/terraform-vault/pulls/186 Co-authored-by: unkin-agent Co-committed-by: unkin-agent --- config/auth_approle_role/approle/terraform_git.yaml | 4 ++-- .../k8s/au/syd1/woodpecker_terraform_git.yaml | 4 ++-- .../consul_root/au/syd1/terraform-git.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/auth_approle_role/approle/terraform_git.yaml b/config/auth_approle_role/approle/terraform_git.yaml index cec109a..58ec9e5 100644 --- a/config/auth_approle_role/approle/terraform_git.yaml +++ b/config/auth_approle_role/approle/terraform_git.yaml @@ -1,5 +1,5 @@ -token_ttl: 120 -token_max_ttl: 120 +token_ttl: 3600 +token_max_ttl: 3600 bind_secret_id: false token_bound_cidrs: - "10.10.12.200/32" diff --git a/config/auth_kubernetes_role/k8s/au/syd1/woodpecker_terraform_git.yaml b/config/auth_kubernetes_role/k8s/au/syd1/woodpecker_terraform_git.yaml index 19acbad..17504dd 100644 --- a/config/auth_kubernetes_role/k8s/au/syd1/woodpecker_terraform_git.yaml +++ b/config/auth_kubernetes_role/k8s/au/syd1/woodpecker_terraform_git.yaml @@ -2,6 +2,6 @@ bound_service_account_names: - terraform-git bound_service_account_namespaces: - woodpecker -token_ttl: 600 -token_max_ttl: 600 +token_ttl: 3600 +token_max_ttl: 3600 audience: https://kubernetes.default.svc.cluster.local diff --git a/config/consul_secret_backend_role/consul_root/au/syd1/terraform-git.yaml b/config/consul_secret_backend_role/consul_root/au/syd1/terraform-git.yaml index 0ede4f7..876a6c4 100644 --- a/config/consul_secret_backend_role/consul_root/au/syd1/terraform-git.yaml +++ b/config/consul_secret_backend_role/consul_root/au/syd1/terraform-git.yaml @@ -1,5 +1,5 @@ consul_roles: - terraform-git -ttl: 120 -max_ttl: 300 +ttl: 1800 +max_ttl: 3600 datacenters: []