Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/github-gcloud-oidc/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module "gcp_oidc_setup" {
source = "../../modules/github-gcloud-oidc"

organization_id = "123456789012"
parent = "folders/123456789012"
folder_create = false
id = "123456789012"
project_name = "my-oidc-project"
Expand Down
1 change: 0 additions & 1 deletion examples/organization/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module "organization" {
source = "../../modules/organization"

github_organization_id = "FociSolutions"
github_organization_billing_email = "org-billing@focisolutions.com"
github_organization_email = "info@focisolutions.com"
github_organization_blog = "https://www.focisolutions.com/articles/"
Expand Down
1 change: 1 addition & 0 deletions examples/repository/private.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module "github_repository_example" {
"devs" = "push",
"ops" = "admin"
}
repository_user_permissions = {}

default_branch = "main"
protected_branches = ["main", "develop"]
Expand Down
1 change: 1 addition & 0 deletions examples/repository/public.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module "public_github_repository" {
"dev-team" = "push",
"ops-team" = "admin"
}
repository_user_permissions = {}
protected_branches = ["main"]
topics = ["terraform", "public", "example"]
homepage = "https://example.com"
Expand Down
13 changes: 4 additions & 9 deletions examples/ruleset/repository-ruleset.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,9 @@ module "github_repo_ruleset" {
}
}
ref_name_inclusions = ["release/*", "main"]
ref_name_exclusions = []
repository_name_inclusions = ["my-target-repo"] # This field is ignored in repository-specific rulesets but included for clarity.
conditions = {
ref_name = {
include = ["release/*", "main"],
exclude = []
}
}
target = "branch"
ruleset_type = "repository"
enforcement = "active"
target = "branch"
ruleset_type = "repository"
enforcement = "active"
}
1 change: 0 additions & 1 deletion modules/organization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
| <a name="input_github_organization_enable_ghas"></a> [github\_organization\_enable\_ghas](#input\_github\_organization\_enable\_ghas) | If set github advance security will be enabled for new repositories in the organization. Defaults to `true`. | `bool` | `true` | no |
| <a name="input_github_organization_enable_secret_scanning"></a> [github\_organization\_enable\_secret\_scanning](#input\_github\_organization\_enable\_secret\_scanning) | If set secret scanning will be enabled for new repositories in the organization. Defaults to `true`. | `bool` | `true` | no |
| <a name="input_github_organization_enable_secret_scanning_push_protection"></a> [github\_organization\_enable\_secret\_scanning\_push\_protection](#input\_github\_organization\_enable\_secret\_scanning\_push\_protection) | If set secret scanning push protection will be enabled for new repositories in the organization. Defaults to `true`. | `bool` | `true` | no |
| <a name="input_github_organization_id"></a> [github\_organization\_id](#input\_github\_organization\_id) | The ID of the organization to manage. | `string` | n/a | yes |
| <a name="input_github_organization_location"></a> [github\_organization\_location](#input\_github\_organization\_location) | Organization location. Defaults to `''`. | `string` | `""` | no |
| <a name="input_github_organization_members"></a> [github\_organization\_members](#input\_github\_organization\_members) | A list of usernames to invite to the organization. Defaults to `[]`. | `list(string)` | `[]` | no |
| <a name="input_github_organization_pages_settings"></a> [github\_organization\_pages\_settings](#input\_github\_organization\_pages\_settings) | Settings for organization page creation. The default setting does not allow members to create public and private pages. | <pre>object({<br> members_can_create_public = bool,<br> members_can_create_private = bool<br> })</pre> | <pre>{<br> "members_can_create_private": false,<br> "members_can_create_public": false<br>}</pre> | no |
Expand Down
5 changes: 0 additions & 5 deletions modules/organization/settings.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ locals {
members_can_create_repositories = var.github_organization_repository_settings.members_can_create_public || var.github_organization_repository_settings.members_can_create_internal || var.github_organization_repository_settings.members_can_create_private
}

import {
to = github_organization_settings.organization_settings
id = var.github_organization_id
}

resource "github_organization_settings" "organization_settings" {
billing_email = var.github_organization_billing_email
email = var.github_organization_email
Expand Down
5 changes: 0 additions & 5 deletions modules/organization/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "github_organization_id" {
type = string
description = "The ID of the organization to manage."
}

variable "github_organization_billing_email" {
type = string
description = "The billing email to set for the organization."
Expand Down