Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Disabling the GH actions at organization or enterprise level is not supported #2405

Open
1 task done
mauromedda opened this issue Sep 28, 2024 · 0 comments · May be fixed by #2404
Open
1 task done

[BUG]: Disabling the GH actions at organization or enterprise level is not supported #2405

mauromedda opened this issue Sep 28, 2024 · 0 comments · May be fixed by #2404
Labels
Type: Bug Something isn't working as documented

Comments

@mauromedda
Copy link

Expected Behavior

When using the github_actions_organization_permissions or github_enterprise_actions_permissions by providing the required arguments:
enabled_repositories = "none" https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_organization_permissions#enabled_repositories
enabled_organizations = "none" (https://registry.terraform.io/providers/integrations/github/latest/docs/resources/enterprise_actions_permissions#enabled_organizations)

no other attributes should provided and the actions get disabled at enterprise or organization level.

Actual Behavior

The actual behaviour is the same with both
│ Error: PATCH https://api.github.com/orgs/orgname: 422 []

│ with module.complete.github_organization_settings.this,
│ on ../../main.tf line 6, in resource "github_organization_settings" "this":
│ 6: resource "github_organization_settings" "this" {



│ Error: PUT https://api.github.com/orgs/orgname/actions/permissions: 422 Invalid request.

│ is not a member of ["all", "local_only", "selected"]. []

│ with module.complete.github_actions_organization_permissions.this[0],
│ on ../../main.tf line 169, in resource "github_actions_organization_permissions" "this":
│ 169: resource "github_actions_organization_permissions" "this" {

The provider is passing to the API a wrong combination of allowed_organizations or repositories and allowed_actions values.

Terraform Version

Terraform v1.9.6
on linux_amd64

  • provider registry.terraform.io/integrations/github v6.3.0

Affected Resource(s)

  • github_actions_organization_permissions
  • github_enterprise_actions_permissions

Terraform Configuration Files

resource "github_actions_organization_permissions" "this" {
  enabled_repositories = "none"
}

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
@mauromedda mauromedda added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Sep 28, 2024
@mauromedda mauromedda linked a pull request Sep 28, 2024 that will close this issue
4 tasks
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Oct 7, 2024
@kfcampbell kfcampbell removed the Status: Triage This is being looked at and prioritized label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants