Control-Plane Rights Don't Open a Locked Key Vault

A run with full subscription rights can still be refused by a locked-down Key Vault. Check the data-plane role and where the run comes from.

  • Azure
  • Key Vault
  • Terraform Cloud

A Terraform Cloud run with full rights on a subscription can still fail on a Key Vault, and the error looks like a permissions problem. It's usually two other things.

The data plane has its own permissions. Rights to manage the vault (the control plane) don't include reading or writing its secrets (the data plane). The run's identity needs a data-plane role on the vault, such as Key Vault Secrets Officer.

The data plane has its own network. A locked-down vault (firewall on, public access off) rejects requests from anywhere not on an allowed path. A Terraform Cloud remote run comes from HashiCorp's infrastructure, so it's denied at the vault's firewall even with the right role.

The fix is to put the runner on an allowed path: a Terraform Cloud agent inside your network. Not a firewall exception for someone else's IP ranges.

resource "tfe_agent_pool" "azure_private" {
  name         = "azure-private"
  organization = var.organization
}

resource "tfe_workspace_settings" "vault_consumer" {
  workspace_id   = tfe_workspace.app.id
  execution_mode = "agent"
  agent_pool_id  = tfe_agent_pool.azure_private.id
}

When a locked-down vault says no, check two things before touching the firewall: the data-plane role, and where the run is actually coming from.

Get in touch