Skip to content

BETA: Add support for delegating policy overrides#1301

Open
jbonhag wants to merge 5 commits intomainfrom
jbonhag/delegate-policy-overrides
Open

BETA: Add support for delegating policy overrides#1301
jbonhag wants to merge 5 commits intomainfrom
jbonhag/delegate-policy-overrides

Conversation

@jbonhag
Copy link
Copy Markdown
Contributor

@jbonhag jbonhag commented Mar 27, 2026

Description

This PR adds support for an upcoming API to delegate policy check override ability to a team on a specific project or workspace.

Testing plan

  1. Automated test
  2. I ran these changes against a development branch of terraform-provider-tfe to verify that the changes worked when hooked up the provider.

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

Running tests with ENABLE_BETA=1:

 TFE_ADDRESS="xxx" TFE_TOKEN="xxx" ENABLE_BETA=1 go test ./... -v -run '^(TestTeams|TestTeamAccesses|TestTeamProjectAccesses)'

ok  	github.com/hashicorp/go-tfe	23.010s
?   	github.com/hashicorp/go-tfe/examples/backing_data	[no test files]
?   	github.com/hashicorp/go-tfe/examples/configuration_versions	[no test files]
?   	github.com/hashicorp/go-tfe/examples/organizations	[no test files]
?   	github.com/hashicorp/go-tfe/examples/projects	[no test files]
?   	github.com/hashicorp/go-tfe/examples/registry_modules	[no test files]
?   	github.com/hashicorp/go-tfe/examples/run_errors	[no test files]
?   	github.com/hashicorp/go-tfe/examples/state_versions	[no test files]
?   	github.com/hashicorp/go-tfe/examples/users	[no test files]
?   	github.com/hashicorp/go-tfe/examples/workspaces	[no test files]
?   	github.com/hashicorp/go-tfe/mocks	[no test files]

Rollback Plan

  • Revert

Changes to Security Controls

N/A

@jbonhag jbonhag requested a review from a team March 27, 2026 13:37
@jbonhag jbonhag self-assigned this Mar 27, 2026
@jbonhag jbonhag requested a review from a team as a code owner March 27, 2026 13:37
@jbonhag jbonhag force-pushed the jbonhag/delegate-policy-overrides branch from c017aa1 to d016fca Compare March 27, 2026 13:38
@datadog-terraform-cloud-hashicorp
Copy link
Copy Markdown

datadog-terraform-cloud-hashicorp bot commented Mar 27, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 49b0adf | Docs | Was this helpful? Give us feedback!

mkam
mkam previously approved these changes Mar 31, 2026
Copy link
Copy Markdown
Contributor

@mkam mkam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just FYI, though, a few of your new tests aren't in the output of the the PR description.

@jbonhag jbonhag force-pushed the jbonhag/delegate-policy-overrides branch from f36b5c5 to a6e6815 Compare April 13, 2026 20:54
jbonhag added 4 commits April 14, 2026 13:18
This provides the ability to delegate the ability for a team to override
policy checks on a specific project or workspace.
@jbonhag jbonhag force-pushed the jbonhag/delegate-policy-overrides branch from a6e6815 to 8a10f07 Compare April 14, 2026 17:18
Copy link
Copy Markdown
Contributor

@Maed223 Maed223 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! The skipUnlessBeta test skips seem to make the most sense here since the enterprise ones are more of a permanent fixture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants