You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: 409 response when destroying github_actions_repository_permissions #2681
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.
resource"github_actions_repository_permissions""default" {
repository=github_repository.default.nameenabled=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
Reacted by Victor Urvantsev, James Fernando, Julian Rodriguez, Maroš Varchola, Dane De Forest, Isaiah Lewis, boutmbr, Alisdair Craik and Thomas Zoratto
Question: What would you expect terraform destroy to do? Do you expect it to be able to fetch your Enterprises allowed default values and set to those? Swallow the error of the destroy failure? Allow you to input default values to set on destroy? Something else, what?
Activity
deiga commentedon Mar 22, 2026
Question: What would you expect
terraform destroyto do? Do you expect it to be able to fetch your Enterprises allowed default values and set to those? Swallow the error of the destroy failure? Allow you to input default values to set on destroy? Something else, what?trjstewart commentedon Mar 23, 2026
That's a rather good question.
I think the cleanest option as a first step is to honor that
allowed_actionsis optional. If it has not been set, don't try to set it on delete.stevehipwell commentedon Oct 15, 2026
If the delete call gets a 409 error it should complete successfully.