integrations / integrations/terraform-provider-github
[FEAT]: Add support for deployment protection rules
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
### Describe the need
I propose support be added for deployment protection rules, specifically custom deployment protection rules. This was implemented in go-github here (https://github.com/google/go-github/pull/3050). This allows for Github Apps configured with the correct permissions to be used as a gate for Github Environment deployments. The only resources I currently see as of v6.2.1 are:
- `github_repository_environment_deployment_policy` - This only sets policies for what branch is allowed to deploy a specific environment.
- `github_repository_environment` - This only allows you to set who is allows to review a specific environment and toggles for if it can only be deployed on protected branches or custom branch policies defined in `github_repository_environment_deployment_policy`.
Documentation:
- https://docs.github.com/en/enterprise-cloud@latest/actions/deployment/protecting-deployments/creating-custom-deployment-protection-rules
- https://docs.github.com/en/enterprise-cloud@latest/actions/deployment/protecting-deployments/configuring-custom-deployment-protection-rules
API:
- https://docs.github.com/en/enterprise-cloud@latest/rest/deployments/protection-rules?apiVersion=2022-11-28
go-github:
- https://github.com/google/go-github/blob/master/github/repos_deployment_protection_rules.go
Thanks!
### SDK Version
go-github v59.0.0+; terraform-provider-github v6.2.1
### API Version
REST 2022-11-28
### Relevant log output
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.