Open
Description
Expected Behavior
When destroying a github_actions_repository_permissions
resource, the provider should do so in a compliant way as to not result in an error when Actions permissions / policies are enforced at the Enterprise or Organization level.
Actual Behavior
The provider throws Error: PUT https://ndia.ghe.com/api/v3/repos/<organization>/<repository>/actions/permissions: 409 []
when attempting to delete the resource.
Taking a look at the API docs, this is expected behaviour when there is a conflict in overarching settings enforced by the Organization (or Enterprise in our case).
Looking at the source for the delete of this resource, it assumes what the default settings should be to return to - which are invalid for us.
Terraform Version
Terraform v1.12.1
on darwin_arm64
- provider registry.terraform.io/integrations/github v6.6.0
Affected Resource(s)
- github_actions_repository_permissions
Terraform Configuration Files
resource "github_actions_repository_permissions" "default" {
repository = github_repository.default.name
enabled = var.actions # In this scenario, this is true.
allowed_actions = var.actions ? "selected" : null # This is managed at the enterprise level
}
Steps to Reproduce
terraform apply
terraform destroy
Debug Output
Panic Output
Code of Conduct
- I agree to follow this project's Code of Conduct