-
Notifications
You must be signed in to change notification settings - Fork 949
[BUG]: Since 6.0.1 the github_actions_repository_permissions resource errors on read when it's disabled #2182
Copy link
Copy link
Closed
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documented
Description
Expected Behavior
When a github_actions_repository_permissions resource is set to disabled it should be able to be read correctly.
Actual Behavior
We're getting the following error when we have a github_actions_repository_permissions resource set to disabled.
╷
│ Error: GET https://api.github.com/repos/my-org/test/actions/permissions/selected-actions: 409 []
│
│ with module.repo["test"].github_actions_repository_permissions.default,
│ on modules/repo/main.tf line 72, in resource "github_actions_repository_permissions" "default":
│ 72: resource "github_actions_repository_permissions" "default" {
│
╵
I suspect that this has been caused by the changes in 97d5113.
Terraform Version
Terraform v1.5.7
on linux_amd64
- provider registry.terraform.io/hashicorp/random v3.6.0
- provider registry.terraform.io/integrations/github v6.0.1
Affected Resource(s)
github_actions_repository_permissions
Terraform Configuration Files
locals {
actions_enabled = false
}
resource "github_actions_repository_permissions" "default" {
repository = "my-repo"
enabled = local.actions_enabled
allowed_actions = local.actions_enabled ? "all" : null
}Steps to Reproduce
No response
Debug Output
No response
Panic Output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documented
Type
Projects
Status
✅ Done