Stack-level permissions control who can act on an individual stack, while workspace-level permissions apply more broadly across the workspace boundary. Stack-level control is better when one environment contains stacks with different sensitivity, approval needs, or blast radius. It gives teams finer separation of duties and stronger least privilege without forcing uniform access across everything.
Why This Matters for Security Teams
Terraform permission boundaries are not just an admin convenience. They define who can change infrastructure, who can approve drift remediation, and how far a compromised identity can move once it reaches the control plane. In environments with shared state, shared modules, and automated delivery, overly broad workspace access often becomes a hidden privilege escalation path. NHI Mgmt Group research shows that 97% of NHIs carry excessive privileges, which makes boundary design a practical security issue, not a cosmetic one.
For teams managing infrastructure as code, the difference matters because Terraform workflows frequently mix human operators, service accounts, CI/CD runners, and AI-assisted automation. If permissions are only set at the workspace level, every actor with access may inherit the same operational reach across stacks with very different blast radii. That weakens separation of duties and makes approval controls harder to enforce consistently. The Ultimate Guide to NHIs — Key Challenges and Risks shows why overbroad identity scope repeatedly turns into exposure, and the OWASP Non-Human Identity Top 10 frames privilege creep as a recurring control failure. In practice, many security teams encounter the permission problem only after a pipeline or operator has already touched a stack that should have stayed isolated.
How It Works in Practice
Workspace-level permissions apply across the broader Terraform workspace boundary, so they are useful when the same group truly needs consistent access to everything inside that workspace. Stack-level permissions narrow that scope to one stack, which is better when different stacks represent different environments, business units, or approval requirements. The operational advantage is simple: a developer, release bot, or break-glass operator can be allowed to act on one stack without inheriting authority over every other stack in the same workspace.
That distinction becomes important in real Terraform operations because access is rarely static. A planning job may need read access, a deployment job may need apply rights only for one target, and an incident responder may need temporary elevated access for a single stack. Best practice is evolving toward context-aware authorization, where the control decision is tied to the task, environment, and risk posture at request time rather than to a broad default role. NIST guidance in NIST SP 800-53 Rev 5 Security and Privacy Controls supports this least-privilege approach, while NHIMG’s Ultimate Guide to NHIs — What are Non-Human Identities explains why machine identities should be governed as first-class actors, not treated as generic user accounts.
- Use stack-level permissions when the stack has its own sensitivity, approval chain, or deployment owner.
- Use workspace-level permissions only when broad access is genuinely required and the blast radius is acceptable.
- Separate read, plan, and apply permissions so automation can inspect without necessarily changing state.
- Bind CI/CD and other NHIs to the minimum scope needed for the specific stack they manage.
These controls tend to break down when teams reuse one workspace for unrelated systems because the boundary stops reflecting real operational risk.
Common Variations and Edge Cases
Tighter stack-level control often increases operational overhead, requiring organisations to balance least privilege against delivery speed and support burden. That tradeoff is real, especially in small teams that want fewer policy objects or in legacy Terraform estates where workspaces were built around convenience rather than segmentation. Current guidance suggests defaulting to stack-level restrictions for high-risk or high-change stacks, then expanding to workspace-level access only where the blast radius is genuinely shared and understood.
There are also edge cases. Some teams use a single workspace for multiple stacks because of tooling constraints, but that design can make workspace-level permissions too coarse for separation of duties. Others use automation heavily enough that access must be granted to NHIs rather than humans, which makes short-lived credentials and explicit revocation more important than the permission model alone. The practical lesson is that permission scope and credential lifecycle must work together. NHIMG incident coverage such as Replit AI Tool Database Deletion and Meta AI Instagram Account Takeover shows how quickly overly broad automation access can become operational damage when governance is too coarse.
Where Terraform environments mix production and non-production, or where multiple teams share the same control plane, stack-level permissions usually provide the cleaner security boundary. Workspace-level permissions remain useful, but only when the workspace itself is already a well-governed trust zone.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-01 | Workspace scope can overexpose machine identities and secrets across stacks. |
| OWASP Agentic AI Top 10 | A-03 | Autonomous automation needs bounded, task-specific authorization at runtime. |
| CSA MAESTRO | IAM-02 | Agent and workload identities need granular authorization boundaries. |
| NIST AI RMF | Risk management should reflect the blast radius of autonomous infrastructure changes. | |
| NIST CSF 2.0 | PR.AC-4 | Least-privilege access management is central to stack versus workspace boundaries. |
Apply least privilege by aligning access rights to the narrowest Terraform boundary that still supports the job.
Related resources from NHI Mgmt Group
- What is the difference between stack-level visibility and code-level review for Terraform governance?
- What is the difference between cloud and on-premise identity governance for regulated environments?
- What is the difference between policy-based access control and role-based access control in modern cloud environments?
- What is the difference between workload access governance and privileged access management in cloud environments?