diff --git a/examples/github-gcloud-oidc/main.tf b/examples/github-gcloud-oidc/main.tf index 2e9be49..e5e4d83 100644 --- a/examples/github-gcloud-oidc/main.tf +++ b/examples/github-gcloud-oidc/main.tf @@ -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" diff --git a/examples/organization/main.tf b/examples/organization/main.tf index a2b98aa..7c17df4 100644 --- a/examples/organization/main.tf +++ b/examples/organization/main.tf @@ -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/" diff --git a/examples/repository/private.tf b/examples/repository/private.tf index 671112d..cf21866 100644 --- a/examples/repository/private.tf +++ b/examples/repository/private.tf @@ -10,6 +10,7 @@ module "github_repository_example" { "devs" = "push", "ops" = "admin" } + repository_user_permissions = {} default_branch = "main" protected_branches = ["main", "develop"] diff --git a/examples/repository/public.tf b/examples/repository/public.tf index 3f987b7..4dbbb3f 100644 --- a/examples/repository/public.tf +++ b/examples/repository/public.tf @@ -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" diff --git a/examples/ruleset/repository-ruleset.tf b/examples/ruleset/repository-ruleset.tf index 751cb23..b770834 100644 --- a/examples/ruleset/repository-ruleset.tf +++ b/examples/ruleset/repository-ruleset.tf @@ -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" } diff --git a/modules/organization/README.md b/modules/organization/README.md index d99d2e0..944d60f 100644 --- a/modules/organization/README.md +++ b/modules/organization/README.md @@ -61,7 +61,6 @@ | [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 | | [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 | | [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 | -| [github\_organization\_id](#input\_github\_organization\_id) | The ID of the organization to manage. | `string` | n/a | yes | | [github\_organization\_location](#input\_github\_organization\_location) | Organization location. Defaults to `''`. | `string` | `""` | no | | [github\_organization\_members](#input\_github\_organization\_members) | A list of usernames to invite to the organization. Defaults to `[]`. | `list(string)` | `[]` | no | | [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. |
object({
members_can_create_public = bool,
members_can_create_private = bool
})
|
{
"members_can_create_private": false,
"members_can_create_public": false
}
| no | diff --git a/modules/organization/settings.tf b/modules/organization/settings.tf index d1c56fa..ebd9bc0 100644 --- a/modules/organization/settings.tf +++ b/modules/organization/settings.tf @@ -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 diff --git a/modules/organization/variables.tf b/modules/organization/variables.tf index c0ef4d2..99ffb1f 100644 --- a/modules/organization/variables.tf +++ b/modules/organization/variables.tf @@ -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."