feat: implement consul ACL management with provider aliases

This commit message captures the major architectural change of implementing Consul ACL management
with proper provider aliasing, along with the supporting configuration files and policy definitions
for various terraform services.

- add consul_acl_management module to manage consul acl policies and roles
- add consul backend roles and policies for terraform services (incus, k8s, nomad, repoflow, vault)
- add consul provider configuration to root.hcl
- add policies to generate credentials for each role
- simplify consul_secret_backend_role module to reference acl-managed roles
- switch to opentofu for provider foreach support
- update terragrunt configuration to support consul backend aliases
- update pre-commit hooks to use opentofu instead of terraform
- configure tflint exceptions for consul acl management module
This commit is contained in:
2026-02-08 15:55:30 +11:00
parent f8f1185b42
commit 5536869a38
30 changed files with 318 additions and 24 deletions
@@ -0,0 +1,10 @@
# generate credentials for the terraform-incus role in consul
---
rules:
- path: "consul_root/au/syd1/creds/terraform-incus"
capabilities:
- read
auth:
approle:
- terraform_incus
@@ -0,0 +1,10 @@
# generate credentials for the terraform-k8s role in consul
---
rules:
- path: "consul_root/au/syd1/creds/terraform-k8s"
capabilities:
- read
auth:
approle:
- terraform_k8s
@@ -0,0 +1,10 @@
# generate credentials for the terraform-nomad role in consul
---
rules:
- path: "consul_root/au/syd1/creds/terraform-nomad"
capabilities:
- read
auth:
approle:
- terraform_nomad
@@ -0,0 +1,10 @@
# generate credentials for the terraform-repoflow role in consul
---
rules:
- path: "consul_root/au/syd1/creds/terraform-repoflow"
capabilities:
- read
auth:
approle:
- terraform_repoflow
@@ -0,0 +1,10 @@
# generate credentials for the terraform-vault role in consul
---
rules:
- path: "consul_root/au/syd1/creds/terraform-vault"
capabilities:
- read
auth:
approle:
- tf_vault