Skip to content

feat: add actions default permissions input - #40

Merged
nickdemianchuk merged 1 commit into
mainfrom
feat/actions-default-permissions
Oct 14, 2026
Merged

nickdemianchuk merged 1 commit into
mainfrom
feat/actions-default-permissions

Conversation

@nickdemianchuk

Copy link
Copy Markdown
Owner

Manage the default GITHUB_TOKEN permissions per repo with github_workflow_repository_permissions, exposed as the module input actions_default_permissions (read or write, default read). Also sets can_approve_pull_request_reviews to false.

@github-actions

Copy link
Copy Markdown
Contributor

Terraform plan in . in the github-ops workspace

Plan: 6 to add, 0 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+   create

Terraform will perform the following actions:

  # module.actions.github_workflow_repository_permissions.this will be created
+   resource "github_workflow_repository_permissions" "this" {
+       can_approve_pull_request_reviews = false
+       default_workflow_permissions     = "read"
+       id                               = (known after apply)
+       repository                       = "actions"
    }

  # module.claude_ops.github_workflow_repository_permissions.this will be created
+   resource "github_workflow_repository_permissions" "this" {
+       can_approve_pull_request_reviews = false
+       default_workflow_permissions     = "read"
+       id                               = (known after apply)
+       repository                       = "claude-ops"
    }

  # module.git_ops.github_workflow_repository_permissions.this will be created
+   resource "github_workflow_repository_permissions" "this" {
+       can_approve_pull_request_reviews = false
+       default_workflow_permissions     = "read"
+       id                               = (known after apply)
+       repository                       = "git-ops"
    }

  # module.github_ops.github_workflow_repository_permissions.this will be created
+   resource "github_workflow_repository_permissions" "this" {
+       can_approve_pull_request_reviews = false
+       default_workflow_permissions     = "read"
+       id                               = (known after apply)
+       repository                       = "github-ops"
    }

  # module.job_hunter.github_workflow_repository_permissions.this will be created
+   resource "github_workflow_repository_permissions" "this" {
+       can_approve_pull_request_reviews = false
+       default_workflow_permissions     = "read"
+       id                               = (known after apply)
+       repository                       = "job-hunter"
    }

  # module.sandbox_factory.github_workflow_repository_permissions.this will be created
+   resource "github_workflow_repository_permissions" "this" {
+       can_approve_pull_request_reviews = false
+       default_workflow_permissions     = "read"
+       id                               = (known after apply)
+       repository                       = "agent-factory"
    }

Plan: 6 to add, 0 to change, 0 to destroy.

Warning: Argument is deprecated

  with module.actions.github_actions_secret.app_private_key["octo_buddy"],
  on modules/github-repo/actions.tf line 38, in resource "github_actions_secret" "app_private_key":
  38:   plaintext_value = each.value.private_key

Use value.

📝 Plan generated in ci #159

@nickdemianchuk
nickdemianchuk marked this pull request as ready for review October 14, 2026 15:26
@nickdemianchuk
nickdemianchuk merged commit cc62f23 into main Oct 14, 2026
9 checks passed
@nickdemianchuk
nickdemianchuk deleted the feat/actions-default-permissions branch October 14, 2026 15:26
@octo-buddy

octo-buddy Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.11.0 🎉

The release is available on GitHub release 📦🚀

@octo-buddy octo-buddy Bot added the released label Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant