🌍 HCL (Terraform)medium
4. Fix the broken KV v2 policy
This policy is broken two ways: it FORGOT the KV v2 `data/` segment (so reads return "permission denied"), and it used a colon instead of `=`. Fix it to grant `read` and `list` on the KV v2 path for `secret/team/*`.
How to approach this
Two classic mistakes: (1) In KV v2 the API nests values under `data/`, so a policy for `secret/team/*` must be written `secret/data/team/*` — omit the `data/` and every read is denied even though the policy 'looks right.' (2) HCL assigns with `=`, never a colon (that's JSON/YAML). Fix both.
main.tf