Skip to content

Add init-time policy evaluation#38519

Draft
dsa0x wants to merge 1 commit intopolicy-pr4-cli-backendfrom
policy-pr5-init-policy
Draft

Add init-time policy evaluation#38519
dsa0x wants to merge 1 commit intopolicy-pr4-cli-backendfrom
policy-pr5-init-policy

Conversation

@dsa0x
Copy link
Copy Markdown
Member

@dsa0x dsa0x commented May 5, 2026

This is part of a stacked series to upstream the policy work in smaller, reviewable pieces:

This PR adds policy evaluation during terraform init. That includes evaluating policy during module installation and provider installation, wiring the init flow through the policy client, and adding the init-specific view/test support needed to surface policy outcomes correctly in that stage of execution.

Contrary to the plan/apply workflow, policy failures during init would result in a non-zero exit of the terraform command.

Included here

  • init-time module policy evaluation
  • init-time provider installation policy evaluation
  • initwd hook changes needed to support policy checks during module installation
  • init command wiring
  • init-specific view support for policy results
  • init-specific tests

Target Release

1.16.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Changelog Warning

Currently this PR would target a v1.16 release. Please add a changelog entry for in the .changes/v1.16 folder, or discuss which release you'd like to target with your reviewer. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.

@dsa0x dsa0x force-pushed the policy-pr5-init-policy branch from a60d49a to 01c69f8 Compare May 5, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant