diff --git a/.github/workflows/apply.yml b/.github/workflows/apply.yml deleted file mode 100644 index 829caae..0000000 --- a/.github/workflows/apply.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: "Apply org changes" - -on: - push: - branches: - - main - paths: - - 'terraform/production/*.tfvars' - -jobs: - apply-changes: - name: "Org changes apply" - runs-on: ubuntu-latest - - permissions: - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: terraform apply - # v1.43.0 - # Use the commit hash for security hardening - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions - uses: dflook/terraform-apply@dcda97d729f1843ede471d2fac989cb946f5622a - env: - TERRAFORM_ACTIONS_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - path: "terraform" - variables: | - github_token = "${{ secrets.TERRAFORM_MANAGEMENT_GITHUB_TOKEN }}" - var_file: | - terraform/production/org.tfvars - terraform/production/repositories.tfvars - - - name: Commit changes - if: ${{ always() }} - uses: devops-infra/action-commit-push@v0.9.2 - with: - github_token: "${{ secrets.GITHUB_TOKEN }}" - commit_prefix: "[AUTO]" - commit_message: "State changes after apply" - force: false diff --git a/.github/workflows/plan.yml b/.github/workflows/plan.yml deleted file mode 100644 index 28e39f5..0000000 --- a/.github/workflows/plan.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: "Plan org changes and list them in a PR" -on: - pull_request: - branches: - - main - paths: - - 'terraform/production/*.tfvars' - -jobs: - format-terraform-code: - name: "Format Terraform code" - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: "${{ github.event.pull_request.head.ref }}" - - - - name: terraform fmt - uses: dflook/terraform-fmt@2ec321e746af7edf90e43513dda2086a92a07b4c - with: - path: "terraform" - - - name: Commit changes - uses: devops-infra/action-commit-push@v0.9.2 - with: - github_token: "${{ secrets.GITHUB_TOKEN }}" - commit_prefix: "[AUTO]" - commit_message: "Format code" - force: false -# target_branch: "${{ github.event.pull_request.head.ref }}" - - plan-changes: - name: "Org changes plan" - runs-on: ubuntu-latest - needs: [ "format-terraform-code" ] - permissions: - pull-requests: write - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: terraform plan - # v1.43.0 - # Use the commit hash for security hardening - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions - uses: dflook/terraform-plan@d9df4f6c2484e709ba7ffaa16c98a6906f4760cd - env: - TERRAFORM_ACTIONS_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - add_github_comment: true - path: "terraform" - variables: | - github_token = "${{ secrets.TERRAFORM_MANAGEMENT_GITHUB_TOKEN }}" - var_file: | - terraform/production/org.tfvars - terraform/production/repositories.tfvars diff --git a/README.md b/README.md index a035c6f..e14e0ac 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Django Commons packages. 2. If they are not a real human or not reasonably trustworthy, close the issue, asking for more information they are a human and not a spambot. You can explain that by being a member, they can impact repositories immediately. 3. Add the user's GitHub username to the `members` collection in - the [`terraform/production/org.tfvars`](https://github.com/django-commons/controls/blob/main/terraform/production/org.tfvars) + the [`terraform/production/org.tfvars`][1] file. Please keep the list sorted alphabetically. ```terraform members = [ @@ -24,7 +24,7 @@ Django Commons packages. ] ``` 4. If they requested to be on specific repository team(s), in - the [`terraform/production/repositories.tfvars`](https://github.com/django-commons/controls/blob/main/terraform/production/repositories.tfvars) + the [`terraform/production/repositories.tfvars`][2] file, add them to the `members` collection. Please keep the list sorted alphabetically. ```terraform repositories = { @@ -45,7 +45,7 @@ Django Commons packages. > Thank you for joining! You'll get an invite email from GitHub. You'll have one > week to accept that. If you don't mind, after accepting, can you set your - > [organization membership as public](https://github.com/orgs/django-commons/people)? + > [organization membership as public][people]? > This helps Django Commons grow. ## Repository Team Change Playbook @@ -53,7 +53,7 @@ Django Commons packages. 1. If they are not a real human or not reasonably trustworthy, close the issue, asking for more information if they are a human and not a spambot. You can explain that by being a member, they can impact repositories immediately. 2. For the requested repository's team(s), in - the [`terraform/production/repositories.tfvars`](https://github.com/django-commons/controls/blob/main/terraform/production/repositories.tfvars) + the [`terraform/production/repositories.tfvars`][2] file, add them to the `members` collection. Please keep the list sorted alphabetically. ```terraform repositories = { @@ -75,7 +75,7 @@ Django Commons packages. 1. Confirm with all existing admins that they approve changes to the repository admins or committers. 2. If there's disagreement, close the issue and ask for the admins to come to a consensus 3. For the requested repository's team(s), in - the [`terraform/production/repositories.tfvars`](https://github.com/django-commons/controls/blob/main/terraform/production/repositories.tfvars) + the [`terraform/production/repositories.tfvars`][2] file, for the repository's key under `repositories`, add them to the `admins` collection for the correct team. There will be two privileged teams for each repository, `*-admins` and `*-committers`, the user should be added to the requested team. Please keep the list sorted alphabetically. @@ -97,7 +97,7 @@ Django Commons packages. ## New Project Playbook 1. Check if repository - meets [inbound requirements](https://github.com/django-commons/membership/blob/main/incoming_repo_requirements.md). + meets [inbound requirements][3]. 2. Confirm who will be the admins and maintainers for the repository 3. PyPI project owner must add you (Django Commons admin) as owner in PyPI 4. (TODO: Determine how this works with transferring out of an org and into the Django Commons org) @@ -120,7 +120,7 @@ Django Commons packages. 1. Transfer the existing repository to the Django Commons organization using the GitHub UI, so old information is preserved. 2. Make sure the there are no teams `repo-name`, `repo-name-admins` and `repo-name-committers` in the Django Commons - organization. Teams can be viewed [here](https://github.com/orgs/django-commons/teams). The teams will be created by + organization. Teams can be viewed [here][teams]. The teams will be created by the terraform apply process. #### Locally @@ -128,7 +128,7 @@ Django Commons packages. Assuming repository name is `repo-name`: 1. -In [`terraform/production/respositories.tfvars`](https://github.com/django-commons/controls/blob/main/terraform/production/respositories.tfvars), +In [`terraform/production/respositories.tfvars`][2], add the new repository to the `repositories` section: ```terraform @@ -176,7 +176,7 @@ The expected changes: 1. Confirm there's agreement amongst current project maintainers to move project out of Django Commons 2. Add new Owner(s) to project in PyPI -3. [Transfer GitHub repo to new owner or Org](https://github.com/orgs/django-commons/people) +3. [Transfer GitHub repo to new owner or Org][people] 4. Wait for repository to be transferred out. 5. Remove all Django Commons members from PyPI project (except any that are staying on from step 2) 6. (TODO: Determine how to handle transferring a PyPI project out of an organization) @@ -184,7 +184,7 @@ The expected changes: ### Terraform changes to remove a project 1. Remove the repository from the `repositories` section - in [`terraform/production/respositories.tfvars`](https://github.com/django-commons/controls/blob/main/terraform/production/respositories.tfvars) + in [`terraform/production/respositories.tfvars`][2] 2. Create a pull-request to `main` branch. This will trigger terraform to plan the changes in the organization to be executed. Review the changes and make sure they align with the request. @@ -194,3 +194,9 @@ The expected changes: - The repository will be removed from the organization. - The repository's teams will be removed from the organization. + +[1]: https://github.com/django-commons/membership/blob/main/terraform/production/org.tfvars +[2]: https://github.com/django-commons/membership/blob/main/terraform/production/repositories.tfvars +[3]: https://github.com/django-commons/membership/blob/main/incoming_repo_requirements.md +[people]: https://github.com/orgs/django-commons/people +[teams]: https://github.com/orgs/django-commons/teams \ No newline at end of file diff --git a/terraform/README.md b/terraform/README.md deleted file mode 100644 index 8097372..0000000 --- a/terraform/README.md +++ /dev/null @@ -1,102 +0,0 @@ -GitHub Organization as Terraform -================================ - -# Structure - -- `variables.tf` - define variable types (classes?), notice there is `variable "repositories" {...` there which has a - few variables marked as optional with default values. Why I chose to have `has_discussions` as a repo variable - while `has_issues` as a constant - I am embarrassed to say I don't have a better answer than laziness :smile: - I just - figured if this is the path we want to take, we can continue adding to it. -- `production/*.tfvars` - instances, should strictly follow the types in `variables.tf`. -- `main.tf` - build configuration based on instances values from `production.tfvars` (or, if not defined explicitly, - then default value from `variables.tf`) -- `resources-*.tf` - define resources, like `github_repository`, `github_team`, etc. -- `tfstate.json` - Current state file, pulled using `terraform import ..` - -# Why Terraform? - -We can define our "desired/default" repository configuration, and within this configuration: - -- What is enforced from day one (i.e., constant in `resource "github_repository" "this"`) -- What is recommended but can be changed by users (i.e., variable with a default value in `variables.tf` that can be - updated in `production.tfvars`) => Note this can also help us review outliers, you can see all repos which have - non-default values in the `production.tfvars` file. -- What is determined by users (i.e., variables without default value, like `description`) -- What is not configured in the infra-as-code (currently, for example, repo-labels). - -# What changes can be made - -All changes should be made in `production/*.tfvars`: - -- Add/Remove organization admins by editing the `admins` list. -- Add/Remove organization members by editing the `members` list. -- Add/Remove/Update repositories by editing the `repositories`. A repository can have the following variables: - ```terraform - repositories = { - "repo-name" = { - description = "repo description" - homepage_url = "" # optional, default is "" - allow_auto_merge = false # optional, default is false - allow_merge_commit = false # optional, default is false - allow_rebase_merge = false # optional, default is false - allow_squash_merge = true # optional, default is true - allow_update_branch = true # optional, default is true - delete_branch_on_merge = true # optional, default is true - has_discussions = true # optional, default is true - has_downloads = true # optional, default is true - has_wiki = false # optional, default is false - is_template = false # optional, default is false - push_allowances = [] - template = "" # optional, default is "" - topics = [] - visibility = "public" # optional, default is "public" - is_django_commons_repo = optional(bool, false) # Do not create teams for repository - enable_branch_protection = true # optional, default is true - required_status_checks_contexts = [] # optional, default is [] - admins = [] # Members of the repository's admin and repository teams. Have admin permissions - committers = [] # Members of the repository's committers and repository teams. Have write permissions - members = [] # Members of the repository team. Have triage permissions - } - # ... - } - ``` - -# How to use locally - -You might want to try new settings locally before applying them to the repository automation. -To do so, you can use the following steps: - -1. Clone the repository. -2. From the `terraform/` directory, run `terraform init`. -3. Create a github-token with the necessary permissions on the organization (see [permissions documentation][1]). - - The `repo` permisison for full control of private repositories. - - The `admin:org` permission for full control of orgs and teams, read and write org projects - - The `delete_repo` permission to delete repositories - -4. Make changes to `production/*.tfvars` to reflect the desired state (add/update users, repositories, teams, etc.) -5. To see what changes between the current state of the GitHub organization and the plan - run: `terraform plan -var-file=production/org.tfvars -var-file=production/repositories.tfvars -var github_token=...` -6. To apply the changes, - run: `terraform apply -var-file=production/org.tfvars -var-file=production/repositories.tfvars -var github_token=...` - -# Integration with GitHub Actions - -The repository is configured to run `terraform plan` on every new pull-request as well as an update to a pull-request -and list the expected changes as a comment on the pull-request. -Once the pull-request is merged to the `main` branch, `terraform apply` applies the changes to the GitHub organization, and -the updated current state is committed to the `main` branch. -To achieve this, the workflows use `TERRAFORM_MANAGEMENT_GITHUB_TOKEN` secret to plan/apply terraform changes. - -`TERRAFORM_MANAGEMENT_GITHUB_TOKEN` is a fine-grained personal access token with permissions the following permissions -required (see documentation [here][2]): - -- The `repo` permission for full control of private repositories -- The `admin:org` permission for full control of orgs and teams, read and write org projects -- The `delete_repo` permission to delete repositories -- Additionally, the token should have permissions to write content to the repository (see, [here][3]) - -[1]: https://developer.hashicorp.com/terraform/tutorials/it-saas/github-user-teams#configure-your-credentials - -[2]: https://developer.hashicorp.com/terraform/tutorials/it-saas/github-user-teams#configure-your-credentials - -[3]: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository \ No newline at end of file diff --git a/terraform/backend.tf b/terraform/backend.tf deleted file mode 100644 index a113544..0000000 --- a/terraform/backend.tf +++ /dev/null @@ -1,9 +0,0 @@ -# Backend Configuration -# https://www.terraform.io/language/settings/backends/configuration - -terraform { - backend "local" { - path = "tfstate.json" - } - -} diff --git a/terraform/locals.tf b/terraform/locals.tf deleted file mode 100644 index 0aff6dc..0000000 --- a/terraform/locals.tf +++ /dev/null @@ -1,20 +0,0 @@ -# Local Values -# https://www.terraform.io/language/values/locals - -locals { - - admins = { - for user in var.admins : user => "admin" - } - - branch_protections = { - for repository_key, repository in var.repositories : repository_key => repository - if repository.enable_branch_protection - } - - members = { - for user in var.members : user => "member" - } - - users = merge(local.admins, local.members) -} diff --git a/terraform/main.tf b/terraform/main.tf deleted file mode 100644 index cc837b7..0000000 --- a/terraform/main.tf +++ /dev/null @@ -1,60 +0,0 @@ -# Required Providers -# https://www.terraform.io/docs/language/providers/requirements.html#requiring-providers - -terraform { - required_providers { - github = { - source = "integrations/github" - } - } -} - -# Github Provider -# https://registry.terraform.io/providers/integrations/github/latest/docs - -provider "github" { - owner = "django-commons" - token = var.github_token -} - - -# Random Password Resource -# https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password - -############# GitHub Organization Secret Resource ############# - -# This is necessary to set a GitHub org secret -# resource "random_password" "this" { -# for_each = var.organization_secrets -# length = 32 -# special = false -# -# keepers = { -# rotation_time = time_rotating.this.rotation_rfc3339 -# } -# } - -# Time Rotating Resource -# https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/rotating - -# This is necessary to use random_password, which is needed -# to set a GitHub org secret -# resource "time_rotating" "this" { -# rotation_days = 5 -# } - -# Github Actions Secret Resource -# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_organization_secret - -# resource "github_actions_organization_secret" "this" { -# -# # Ensure GitHub Actions secrets are encrypted -# # checkov:skip=CKV_GIT_4: We are passing the secret from the random_password resource which is sensitive by default -# # and not checking in any plain text values. State is always secured. -# -# for_each = var.organization_secrets -# -# plaintext_value = random_password.this[each.key].result -# secret_name = each.key -# visibility = each.value.visibility -# } diff --git a/terraform/production/org.tfvars b/terraform/production/org.tfvars deleted file mode 100644 index ce3e562..0000000 --- a/terraform/production/org.tfvars +++ /dev/null @@ -1,63 +0,0 @@ -# Organization admins -admins = [ - "cunla", - "ryancheley", - "Stormheg", - "tim-schilling", - "williln", -] -# Organization members -members = [ - "bckohan", - "browniebroke", - "codein", - "ddabble", - "FlipperPA", - "g-nie", - "gav-fyi", - "jacklinke", - "jcjudkins", - "joshuadavidthomas", - "maerteijn", - "matthiask", - "Mogost", - "nanorepublica", - "Natim", - "pfouque", - "priyapahwa", - "rptmat57", - "salty-ivy", - "testSchilling", -] - -organization_teams = { - "Admins" = { - description = "django-commons administrators" - # Use maintainers for organizational teams - maintainers = [ - "cunla", - "ryancheley", - "Stormheg", - "tim-schilling", - "williln", - ] - } - "security-team" = { - description = "django-commons security team" - # Use maintainers for organizational teams - maintainers = [ - "matthiask", - "tim-schilling", - ] - permission = "push" - } -} - -################ GitHub Organization Secrets, not used at the moment ############# - -organization_secrets = { - # "GPG_PASSPHRASE" = { - # description = "GPG Passphrase used to encrypt plan.out files" - # visibility = "all" - # } -} diff --git a/terraform/production/repositories.tfvars b/terraform/production/repositories.tfvars deleted file mode 100644 index fa06adf..0000000 --- a/terraform/production/repositories.tfvars +++ /dev/null @@ -1,82 +0,0 @@ -# Organization repositories -repositories = { - - ".github" = { - description = "A Special Repository." - enable_branch_protection = false - - topics = [] - push_allowances = [] - is_django_commons_repo = true - } - - "controls" = { - description = "The controls for managing Django Commons projects" - enable_branch_protection = false - allow_merge_commit = true - allow_rebase_merge = true - allow_squash_merge = true - topics = [] - push_allowances = [] - is_django_commons_repo = true - } - - "membership" = { - description = "Membership repository for the django-commons organization." - visibility = "public" - allow_merge_commit = true - allow_rebase_merge = true - allow_squash_merge = true - topics = [] - push_allowances = [] - is_django_commons_repo = true - } - - "django-commons-playground" = { - description = "A sample project to test things out" - topics = [] - # People with GitHub admin repo permissions - admins = [ - "cunla", - "ryancheley", - "Stormheg", - "tim-schilling", - "williln", - ] - # People with GitHub maintain repo permissions - committers = [ - "priyapahwa", - ] - # People with GitHub triage repo permissions - members = [ - ] - } - - "django-tasks-scheduler" = { - description = "Schedule async tasks using redis pub/sub." - homepage_url = "https://django-tasks-scheduler.readthedocs.io/" - allow_merge_commit = true - - admins = [ - "cunla", - ] - committers = [] - members = [] - } - - "django-fsm-2" = { - description = "Django friendly finite state machine support" - homepage_url = "https://github.com/django-commons/django-fsm-2" - allow_merge_commit = false - allow_rebase_merge = true - has_projects = false - - admins = [ - "Natim", - "pfouque", - ] - committers = [] - members = [] - } - -} diff --git a/terraform/resources-environments.tf b/terraform/resources-environments.tf deleted file mode 100644 index e6824c6..0000000 --- a/terraform/resources-environments.tf +++ /dev/null @@ -1,18 +0,0 @@ -resource "github_repository_environment" "pypi" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - - environment = "pypi" - repository = each.key - prevent_self_review = false - reviewers { - teams = [github_team.repo_admin_team[each.key].id] - } -} - -resource "github_repository_environment" "testpypi" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - - environment = "testpypi" - repository = each.key - prevent_self_review = false -} \ No newline at end of file diff --git a/terraform/resources-org.tf b/terraform/resources-org.tf deleted file mode 100644 index 4367822..0000000 --- a/terraform/resources-org.tf +++ /dev/null @@ -1,49 +0,0 @@ -# GitHub Membership Resource -# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/membership - -resource "github_membership" "this" { - for_each = local.users - - role = each.value - username = each.key -} - -# Github Organization Security Manager Resource -# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_security_manager - -resource "github_organization_security_manager" "this" { - team_slug = github_team.org_teams["security-team"].slug -} -# Create the organization teams for Django Commons. -resource "github_team" "org_teams" { - for_each = var.organization_teams - - name = each.key - description = each.value.description - privacy = each.value.privacy -} - -resource "github_team_members" "org_team_members" { - for_each = var.organization_teams - - team_id = github_team.org_teams[each.key].id - - dynamic "members" { - for_each = each.value.members - - content { - username = members.value - role = "member" - } - } - - # Maintainer here means the maintainer role for the team. It's not a maintainer of the repo. - dynamic "members" { - for_each = each.value.maintainers - - content { - username = members.value - role = "maintainer" - } - } -} diff --git a/terraform/resources-repo-admin-teams.tf b/terraform/resources-repo-admin-teams.tf deleted file mode 100644 index c26608c..0000000 --- a/terraform/resources-repo-admin-teams.tf +++ /dev/null @@ -1,33 +0,0 @@ -# Define the admin team for each repository -resource "github_team" "repo_admin_team" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - - parent_team_id = github_team.repo_team[each.key].id - name = "${each.key}-admins" - description = "Admin team for the ${each.key} repository" - privacy = "closed" -} - -# Add the people to the team -resource "github_team_members" "repo_admin_members" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - - team_id = github_team.repo_admin_team[each.key].id - - dynamic "members" { - for_each = each.value.admins - - content { - username = members.value - role = contains(var.admins, members.value) ? "maintainer" : "member" - } - } -} - -# Define the team's permissions for the repositories -resource "github_team_repository" "repo_admin_team_access" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - repository = each.key - team_id = github_team.repo_admin_team[each.key].id - permission = "admin" -} \ No newline at end of file diff --git a/terraform/resources-repo-committer-teams.tf b/terraform/resources-repo-committer-teams.tf deleted file mode 100644 index 8bf5fc0..0000000 --- a/terraform/resources-repo-committer-teams.tf +++ /dev/null @@ -1,40 +0,0 @@ -# Define the committers team for each repository -resource "github_team" "repo_committer_team" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - - parent_team_id = github_team.repo_team[each.key].id - name = "${each.key}-committers" - description = "Committers team for the ${each.key} repository" - privacy = "closed" -} - -# Add the people to the team -resource "github_team_members" "repo_committer_team_members" { - for_each = { - for k, v in var.repositories : k => v - if v.is_django_commons_repo == false && length(v.committers) > 0 - } - - team_id = github_team.repo_committer_team[each.key].id - - dynamic "members" { - for_each = each.value.committers - - content { - username = members.value - role = contains(each.value.admins, members.value) ? "maintainer" : "member" - } - } -} - -# Define the team's permissions for the repositories -resource "github_team_repository" "repo_committer_team_access" { - for_each = { - for k, v in var.repositories : k => v - if v.is_django_commons_repo == false - } - repository = each.key - team_id = github_team.repo_committer_team[each.key].id - permission = "maintain" -} - diff --git a/terraform/resources-repo-teams.tf b/terraform/resources-repo-teams.tf deleted file mode 100644 index 4dddd5a..0000000 --- a/terraform/resources-repo-teams.tf +++ /dev/null @@ -1,49 +0,0 @@ -# Create the main repository team for Django Commons. -resource "github_team" "repo_team" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - - name = each.key - description = "Main team for the ${each.key} repository" - privacy = "closed" -} -# Add the people to the team -resource "github_team_members" "repo_team_members" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - - team_id = github_team.repo_team[each.key].id - - dynamic "members" { - # Add the admins and committers as members because this is the parent - # team for the organization. If the team is mentioned in a discussion, - # they too should be notified. - for_each = setunion(each.value.members, each.value.committers, each.value.admins) - - content { - # members here references the dynamic name, not the looped entity. - username = members.value - role = contains(var.admins, members.value) ? "maintainer" : "member" - } - } -} -# Define the team's permissions for the repositories -resource "github_team_repository" "repo_team_access" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - repository = each.key - team_id = github_team.repo_team[each.key].id - permission = "triage" -} -# GitHub Team Settings Resource -# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_settings - -# This is used to enable automatic PR review requests -resource "github_team_settings" "this" { - for_each = { for k, v in var.repositories : k => v if v.is_django_commons_repo == false } - - review_request_delegation { - algorithm = "LOAD_BALANCE" - member_count = 2 - notify = false - } - - team_id = github_team.repo_team[each.key].id -} diff --git a/terraform/resources-repos.tf b/terraform/resources-repos.tf deleted file mode 100644 index 480cd79..0000000 --- a/terraform/resources-repos.tf +++ /dev/null @@ -1,81 +0,0 @@ -# Github Repository Resource -# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository - -# Try to import the repository if it already exists -import { - for_each = var.repositories - - id = each.key - to = github_repository.this[each.key] -} - -resource "github_repository" "this" { - for_each = var.repositories - - homepage_url = each.value.homepage_url - allow_auto_merge = each.value.allow_auto_merge - allow_merge_commit = each.value.allow_merge_commit - merge_commit_title = each.value.allow_merge_commit ? each.value.merge_commit_title : null - merge_commit_message = each.value.allow_merge_commit ? each.value.merge_commit_message : null - allow_rebase_merge = each.value.allow_rebase_merge - allow_squash_merge = each.value.allow_squash_merge - squash_merge_commit_title = each.value.allow_squash_merge ? each.value.squash_merge_commit_title : null - squash_merge_commit_message = each.value.allow_squash_merge ? each.value.squash_merge_commit_message : null - allow_update_branch = each.value.allow_update_branch - archive_on_destroy = true - delete_branch_on_merge = each.value.delete_branch_on_merge - description = each.value.description - has_downloads = each.value.has_downloads - has_discussions = each.value.has_discussions - has_issues = true - has_projects = true - has_wiki = each.value.has_wiki - is_template = each.value.is_template - name = each.key - topics = each.value.topics - visibility = each.value.visibility - vulnerability_alerts = true - - dynamic "template" { - for_each = each.value.template != null ? [each.value.template] : [] - - content { - owner = "django-commons" - repository = template.value - } - } -} - - -############# Github Branch Protection Resource ############# -# -# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection -# -# resource "github_branch_protection" "this" { -# -# # GitHub pull requests should require at least 2 approvals -# # checkov:skip=CKV_GIT_5: 1 approval is reasonable for a small team -# for_each = local.branch_protections -# -# enforce_admins = false -# pattern = "main" -# repository_id = github_repository.this[each.key].name -# require_conversation_resolution = true -# required_linear_history = true -# require_signed_commits = true -# -# required_pull_request_reviews { -# dismiss_stale_reviews = true -# require_code_owner_reviews = true -# required_approving_review_count = github_repository.this[each.key].required_approving_review_count -# } -# -# required_status_checks { -# contexts = each.value.required_status_checks_contexts -# strict = true -# } -# -# restrict_pushes { -# push_allowances = each.value.push_allowances -# } -# } diff --git a/terraform/tfstate.json b/terraform/tfstate.json deleted file mode 100644 index 8e21648..0000000 --- a/terraform/tfstate.json +++ /dev/null @@ -1,1729 +0,0 @@ -{ - "version": 4, - "terraform_version": "1.9.6", - "serial": 213, - "lineage": "425397de-8394-a003-8a6c-bce854d9cc53", - "outputs": {}, - "resources": [ - { - "mode": "managed", - "type": "github_membership", - "name": "this", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "FlipperPA", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"39c6ab5500265c27347ebf55f8d65fb87cd5fc443396ba0d28066f7a107bb25c\"", - "id": "django-commons:FlipperPA", - "role": "member", - "username": "FlipperPA" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "Mogost", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"e1ed43b9b7f54508fef66294952869d35ae1761e291667fa109dcc13641462d6\"", - "id": "django-commons:Mogost", - "role": "member", - "username": "Mogost" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "Natim", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"6fd5d8f720014dd48fcf1c46153acfba522b63940c91b59858110623e8398986\"", - "id": "django-commons:Natim", - "role": "member", - "username": "Natim" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "Stormheg", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"2a0c3f113c3c391dd2e570f3d2c310faa3913c6d3b044e5d1332846e8cb14bdd\"", - "id": "django-commons:Stormheg", - "role": "admin", - "username": "Stormheg" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "bckohan", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"a5b2de150d4db1327b5c94c700c83dbe48ed557a5879f50b972422148b750e18\"", - "id": "django-commons:bckohan", - "role": "member", - "username": "bckohan" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "browniebroke", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"f07e7b364a754f8e963a20658ff1870fcd0e3a4ecdd80709ca2a32059e7c1391\"", - "id": "django-commons:browniebroke", - "role": "member", - "username": "browniebroke" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "codein", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"5c2c03863ace394f05712222529ecb5df9e53982d43d756cd8dd976107f445a9\"", - "id": "django-commons:codein", - "role": "member", - "username": "codein" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "cunla", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"a3c10fc75649b3e5e48c8279e7e7c51d1ea69eda1ece022200317e226a312071\"", - "id": "django-commons:cunla", - "role": "admin", - "username": "cunla" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "ddabble", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"0d73382d126615999a66b8edf5b81a77dc209b53aa84ecb2e787f89bd8f7f176\"", - "id": "django-commons:ddabble", - "role": "member", - "username": "ddabble" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "g-nie", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"b159adcdbec9df7a9bf7f51ee7e8a605781020c87328b521e1b3e9cacc7d30df\"", - "id": "django-commons:g-nie", - "role": "member", - "username": "g-nie" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "gav-fyi", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"9567d31fa1587885214042bb836419552aa0626b3b12004f06a023e7e4d05b94\"", - "id": "django-commons:gav-fyi", - "role": "member", - "username": "gav-fyi" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "jacklinke", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"3b4a2e4d0c447d65bd1dd9889f2441b2e830c676a3670306d96d5d9d1209abf4\"", - "id": "django-commons:jacklinke", - "role": "member", - "username": "jacklinke" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "jcjudkins", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"120214bdad851e35a35db5f478f95218ad1e9716cc2898d207627ce686451dbc\"", - "id": "django-commons:jcjudkins", - "role": "member", - "username": "jcjudkins" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "joshuadavidthomas", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"472ca67b6a77605e75ce0176d5d1973315336d7953d03deccf27be97c8b9c9a1\"", - "id": "django-commons:joshuadavidthomas", - "role": "member", - "username": "joshuadavidthomas" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "maerteijn", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"12ca2badd5ff5c455be852651743fb1fdc088e307177346b9953839020844e6b\"", - "id": "django-commons:maerteijn", - "role": "member", - "username": "maerteijn" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "matthiask", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"f5c48cbaa30bcc6f24130e870d5b7a17438804f93944a25866e082a806fe408c\"", - "id": "django-commons:matthiask", - "role": "member", - "username": "matthiask" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "nanorepublica", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"90aa34d56320bccba1b230cf83f083741d3b628e4a53dc4b6501e11737de2bb7\"", - "id": "django-commons:nanorepublica", - "role": "member", - "username": "nanorepublica" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "pfouque", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"6cf68db52f17f985b9a194f44f7960f6327a4c4597c5d2046b93a388cecc217c\"", - "id": "django-commons:pfouque", - "role": "member", - "username": "pfouque" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "priyapahwa", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"2771ecea10a1124901f2a8f9eb1b4a682da0d531c514a2f1e04bb45a65297926\"", - "id": "django-commons:priyapahwa", - "role": "member", - "username": "priyapahwa" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "rptmat57", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"4c055586df554fc7d1a2412139fa745dae602f9a32126d4cb862935e832bd16b\"", - "id": "django-commons:rptmat57", - "role": "member", - "username": "rptmat57" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "ryancheley", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"c76df4ee75da5c7dfb80147f0105564d2bd971e0d0009c1951de58b8cc265fef\"", - "id": "django-commons:ryancheley", - "role": "admin", - "username": "ryancheley" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "salty-ivy", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": false, - "etag": "W/\"d112ed34470ec8c4568e475882b7b26899e507238c6305baac54eb1b9829a098\"", - "id": "django-commons:salty-ivy", - "role": "member", - "username": "salty-ivy" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "testSchilling", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"82cd5e50d842e40b67e012cc543d511651cc95ef4b1acfc0a2b0d76a004525eb\"", - "id": "django-commons:testSchilling", - "role": "member", - "username": "testSchilling" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "tim-schilling", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"3e0f1264752f25dbf6ca43ecb381b03dc8623251cedbcf0e900dcdb7f3d744a0\"", - "id": "django-commons:tim-schilling", - "role": "admin", - "username": "tim-schilling" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "williln", - "schema_version": 0, - "attributes": { - "downgrade_on_destroy": null, - "etag": "W/\"0fb7a97ee78d9b4282447813247a4ff786b4628597f2cf7dcc6c195a01835c61\"", - "id": "django-commons:williln", - "role": "admin", - "username": "williln" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - } - ] - }, - { - "mode": "managed", - "type": "github_organization_security_manager", - "name": "this", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "id": "10641823", - "team_slug": "security-team" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.org_teams" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_repository", - "name": "this", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": ".github", - "schema_version": 1, - "attributes": { - "allow_auto_merge": false, - "allow_merge_commit": false, - "allow_rebase_merge": false, - "allow_squash_merge": true, - "allow_update_branch": true, - "archive_on_destroy": true, - "archived": false, - "auto_init": false, - "default_branch": "main", - "delete_branch_on_merge": true, - "description": "A Special Repository.", - "etag": "W/\"50694cd7b6ad870daf7771d58eab831150c45ad83ed3936d0ea3e68da0b9edd0\"", - "full_name": "django-commons/.github", - "git_clone_url": "git://github.com/django-commons/.github.git", - "gitignore_template": null, - "has_discussions": true, - "has_downloads": true, - "has_issues": true, - "has_projects": true, - "has_wiki": false, - "homepage_url": "", - "html_url": "https://github.com/django-commons/.github", - "http_clone_url": "https://github.com/django-commons/.github.git", - "id": ".github", - "ignore_vulnerability_alerts_during_read": null, - "is_template": false, - "license_template": null, - "merge_commit_message": "PR_TITLE", - "merge_commit_title": "MERGE_MESSAGE", - "name": ".github", - "node_id": "R_kgDOLkyRSQ", - "pages": [], - "primary_language": "", - "private": false, - "repo_id": 776769865, - "security_and_analysis": [ - { - "advanced_security": [], - "secret_scanning": [ - { - "status": "disabled" - } - ], - "secret_scanning_push_protection": [ - { - "status": "disabled" - } - ] - } - ], - "squash_merge_commit_message": "COMMIT_MESSAGES", - "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", - "ssh_clone_url": "git@github.com:django-commons/.github.git", - "svn_url": "https://github.com/django-commons/.github", - "template": [], - "topics": [], - "visibility": "public", - "vulnerability_alerts": true, - "web_commit_signoff_required": false - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - }, - { - "index_key": "controls", - "schema_version": 1, - "attributes": { - "allow_auto_merge": false, - "allow_merge_commit": true, - "allow_rebase_merge": true, - "allow_squash_merge": true, - "allow_update_branch": true, - "archive_on_destroy": true, - "archived": false, - "auto_init": false, - "default_branch": "main", - "delete_branch_on_merge": true, - "description": "The controls for managing Django Commons projects", - "etag": "W/\"d2f77130d0c8a05917ab69eaa1bd2fb8ecbf95281b1ed124f367d6debd4c5f10\"", - "full_name": "django-commons/controls", - "git_clone_url": "git://github.com/django-commons/controls.git", - "gitignore_template": null, - "has_discussions": true, - "has_downloads": true, - "has_issues": true, - "has_projects": true, - "has_wiki": false, - "homepage_url": "", - "html_url": "https://github.com/django-commons/controls", - "http_clone_url": "https://github.com/django-commons/controls.git", - "id": "controls", - "ignore_vulnerability_alerts_during_read": null, - "is_template": false, - "license_template": null, - "merge_commit_message": "PR_TITLE", - "merge_commit_title": "MERGE_MESSAGE", - "name": "controls", - "node_id": "R_kgDOLkDK8g", - "pages": [], - "primary_language": "HCL", - "private": false, - "repo_id": 775998194, - "security_and_analysis": [ - { - "advanced_security": [], - "secret_scanning": [ - { - "status": "disabled" - } - ], - "secret_scanning_push_protection": [ - { - "status": "disabled" - } - ] - } - ], - "squash_merge_commit_message": "COMMIT_MESSAGES", - "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", - "ssh_clone_url": "git@github.com:django-commons/controls.git", - "svn_url": "https://github.com/django-commons/controls", - "template": [], - "topics": [], - "visibility": "public", - "vulnerability_alerts": true, - "web_commit_signoff_required": false - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - }, - { - "index_key": "django-commons-playground", - "schema_version": 1, - "attributes": { - "allow_auto_merge": false, - "allow_merge_commit": false, - "allow_rebase_merge": false, - "allow_squash_merge": true, - "allow_update_branch": true, - "archive_on_destroy": true, - "archived": false, - "auto_init": false, - "default_branch": "main", - "delete_branch_on_merge": true, - "description": "A sample project to test things out", - "etag": "W/\"d8540749830105253f1673a7bd059812b52369642650b13fd671ef4595b2ba19\"", - "full_name": "django-commons/django-commons-playground", - "git_clone_url": "git://github.com/django-commons/django-commons-playground.git", - "gitignore_template": null, - "has_discussions": true, - "has_downloads": true, - "has_issues": true, - "has_projects": true, - "has_wiki": false, - "homepage_url": "", - "html_url": "https://github.com/django-commons/django-commons-playground", - "http_clone_url": "https://github.com/django-commons/django-commons-playground.git", - "id": "django-commons-playground", - "ignore_vulnerability_alerts_during_read": null, - "is_template": false, - "license_template": null, - "merge_commit_message": "PR_TITLE", - "merge_commit_title": "MERGE_MESSAGE", - "name": "django-commons-playground", - "node_id": "R_kgDOLkANrg", - "pages": [], - "primary_language": "Python", - "private": false, - "repo_id": 775949742, - "security_and_analysis": [ - { - "advanced_security": [], - "secret_scanning": [ - { - "status": "disabled" - } - ], - "secret_scanning_push_protection": [ - { - "status": "disabled" - } - ] - } - ], - "squash_merge_commit_message": "COMMIT_MESSAGES", - "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", - "ssh_clone_url": "git@github.com:django-commons/django-commons-playground.git", - "svn_url": "https://github.com/django-commons/django-commons-playground", - "template": [], - "topics": [], - "visibility": "public", - "vulnerability_alerts": true, - "web_commit_signoff_required": false - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - }, - { - "index_key": "django-fsm-2", - "schema_version": 1, - "attributes": { - "allow_auto_merge": false, - "allow_merge_commit": false, - "allow_rebase_merge": true, - "allow_squash_merge": true, - "allow_update_branch": true, - "archive_on_destroy": true, - "archived": false, - "auto_init": false, - "default_branch": "main", - "delete_branch_on_merge": true, - "description": "Django friendly finite state machine support", - "etag": "W/\"76b99535c36d5fd412306e97248fc3a0d5820eb85141f8d7da553a271c7545e2\"", - "full_name": "django-commons/django-fsm-2", - "git_clone_url": "git://github.com/django-commons/django-fsm-2.git", - "gitignore_template": null, - "has_discussions": true, - "has_downloads": true, - "has_issues": true, - "has_projects": true, - "has_wiki": false, - "homepage_url": "https://github.com/django-commons/django-fsm-2", - "html_url": "https://github.com/django-commons/django-fsm-2", - "http_clone_url": "https://github.com/django-commons/django-fsm-2.git", - "id": "django-fsm-2", - "ignore_vulnerability_alerts_during_read": null, - "is_template": false, - "license_template": null, - "merge_commit_message": "PR_TITLE", - "merge_commit_title": "MERGE_MESSAGE", - "name": "django-fsm-2", - "node_id": "R_kgDOIRc3Iw", - "pages": [], - "primary_language": "Python", - "private": false, - "repo_id": 555169571, - "security_and_analysis": [ - { - "advanced_security": [], - "secret_scanning": [ - { - "status": "disabled" - } - ], - "secret_scanning_push_protection": [ - { - "status": "disabled" - } - ] - } - ], - "squash_merge_commit_message": "COMMIT_MESSAGES", - "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", - "ssh_clone_url": "git@github.com:django-commons/django-fsm-2.git", - "svn_url": "https://github.com/django-commons/django-fsm-2", - "template": [], - "topics": [], - "visibility": "public", - "vulnerability_alerts": true, - "web_commit_signoff_required": false - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 1, - "attributes": { - "allow_auto_merge": false, - "allow_merge_commit": true, - "allow_rebase_merge": false, - "allow_squash_merge": true, - "allow_update_branch": true, - "archive_on_destroy": true, - "archived": false, - "auto_init": false, - "default_branch": "master", - "delete_branch_on_merge": true, - "description": "Schedule async tasks using redis pub/sub.", - "etag": "W/\"cbcd7cec4c857e71171d784c83beeaea166b7f7ede4aa2b963caca00176c5259\"", - "full_name": "django-commons/django-tasks-scheduler", - "git_clone_url": "git://github.com/django-commons/django-tasks-scheduler.git", - "gitignore_template": null, - "has_discussions": true, - "has_downloads": true, - "has_issues": true, - "has_projects": true, - "has_wiki": false, - "homepage_url": "https://django-tasks-scheduler.readthedocs.io/", - "html_url": "https://github.com/django-commons/django-tasks-scheduler", - "http_clone_url": "https://github.com/django-commons/django-tasks-scheduler.git", - "id": "django-tasks-scheduler", - "ignore_vulnerability_alerts_during_read": null, - "is_template": false, - "license_template": null, - "merge_commit_message": "PR_TITLE", - "merge_commit_title": "MERGE_MESSAGE", - "name": "django-tasks-scheduler", - "node_id": "R_kgDOJzK5Kg", - "pages": [], - "primary_language": "Python", - "private": false, - "repo_id": 657635626, - "security_and_analysis": [ - { - "advanced_security": [], - "secret_scanning": [ - { - "status": "disabled" - } - ], - "secret_scanning_push_protection": [ - { - "status": "disabled" - } - ] - } - ], - "squash_merge_commit_message": "COMMIT_MESSAGES", - "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", - "ssh_clone_url": "git@github.com:django-commons/django-tasks-scheduler.git", - "svn_url": "https://github.com/django-commons/django-tasks-scheduler", - "template": [], - "topics": [ - "background-jobs", - "django", - "django-application", - "job-queue", - "python", - "redis", - "redis-queue", - "scheduled-jobs", - "scheduled-tasks", - "task-queue" - ], - "visibility": "public", - "vulnerability_alerts": true, - "web_commit_signoff_required": false - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - }, - { - "index_key": "membership", - "schema_version": 1, - "attributes": { - "allow_auto_merge": false, - "allow_merge_commit": true, - "allow_rebase_merge": true, - "allow_squash_merge": true, - "allow_update_branch": true, - "archive_on_destroy": true, - "archived": false, - "auto_init": false, - "default_branch": "main", - "delete_branch_on_merge": true, - "description": "Membership repository for the django-commons organization.", - "etag": "W/\"f0ce29c97a5161cd022dc59c6e71339f7f19a8e98d8d074f2969dbd9b01b3760\"", - "full_name": "django-commons/membership", - "git_clone_url": "git://github.com/django-commons/membership.git", - "gitignore_template": null, - "has_discussions": true, - "has_downloads": true, - "has_issues": true, - "has_projects": true, - "has_wiki": false, - "homepage_url": "", - "html_url": "https://github.com/django-commons/membership", - "http_clone_url": "https://github.com/django-commons/membership.git", - "id": "membership", - "ignore_vulnerability_alerts_during_read": null, - "is_template": false, - "license_template": null, - "merge_commit_message": "PR_TITLE", - "merge_commit_title": "MERGE_MESSAGE", - "name": "membership", - "node_id": "R_kgDOLklIpA", - "pages": [], - "primary_language": "", - "private": false, - "repo_id": 776554660, - "security_and_analysis": [ - { - "advanced_security": [], - "secret_scanning": [ - { - "status": "disabled" - } - ], - "secret_scanning_push_protection": [ - { - "status": "disabled" - } - ] - } - ], - "squash_merge_commit_message": "COMMIT_MESSAGES", - "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", - "ssh_clone_url": "git@github.com:django-commons/membership.git", - "svn_url": "https://github.com/django-commons/membership", - "template": [], - "topics": [], - "visibility": "public", - "vulnerability_alerts": true, - "web_commit_signoff_required": false - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - } - ] - }, - { - "mode": "managed", - "type": "github_repository_environment", - "name": "pypi", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "can_admins_bypass": true, - "deployment_branch_policy": [], - "environment": "pypi", - "id": "django-commons-playground:pypi", - "prevent_self_review": false, - "repository": "django-commons-playground", - "reviewers": [ - { - "teams": [ - 9757650 - ], - "users": [] - } - ], - "wait_timer": 0 - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "can_admins_bypass": true, - "deployment_branch_policy": [], - "environment": "pypi", - "id": "django-fsm-2:pypi", - "prevent_self_review": false, - "repository": "django-fsm-2", - "reviewers": [ - { - "teams": [ - 10870432 - ], - "users": [] - } - ], - "wait_timer": 0 - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "can_admins_bypass": true, - "deployment_branch_policy": [], - "environment": "pypi", - "id": "django-tasks-scheduler:pypi", - "prevent_self_review": false, - "repository": "django-tasks-scheduler", - "reviewers": [ - { - "teams": [ - 10707221 - ], - "users": [] - } - ], - "wait_timer": 0 - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_repository_environment", - "name": "testpypi", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "can_admins_bypass": true, - "deployment_branch_policy": [], - "environment": "testpypi", - "id": "django-commons-playground:testpypi", - "prevent_self_review": null, - "repository": "django-commons-playground", - "reviewers": [], - "wait_timer": 0 - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "can_admins_bypass": true, - "deployment_branch_policy": [], - "environment": "testpypi", - "id": "django-fsm-2:testpypi", - "prevent_self_review": null, - "repository": "django-fsm-2", - "reviewers": [], - "wait_timer": 0 - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "can_admins_bypass": true, - "deployment_branch_policy": [], - "environment": "testpypi", - "id": "django-tasks-scheduler:testpypi", - "prevent_self_review": false, - "repository": "django-tasks-scheduler", - "reviewers": [], - "wait_timer": 0 - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - } - ] - }, - { - "mode": "managed", - "type": "github_team", - "name": "org_teams", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "Admins", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "django-commons administrators", - "etag": "W/\"19840e59ec4cc081ca4ec0abb1bd3b95e643541c75e59553a84306243c178965\"", - "id": "9763562", - "ldap_dn": "", - "members_count": 5, - "name": "Admins", - "node_id": "T_kwDOCaaRBM4AlPrq", - "parent_team_id": "", - "parent_team_read_id": "", - "parent_team_read_slug": "", - "privacy": "closed", - "slug": "admins" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "security-team", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "django-commons security team", - "etag": "W/\"f9280127516d2e84047fa5e273952f10e9c627712ae3c40609ea3f1066344402\"", - "id": "10641823", - "ldap_dn": "", - "members_count": 2, - "name": "security-team", - "node_id": "T_kwDOCaaRBM4AomGf", - "parent_team_id": "", - "parent_team_read_id": "", - "parent_team_read_slug": "", - "privacy": "closed", - "slug": "security-team" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - } - ] - }, - { - "mode": "managed", - "type": "github_team", - "name": "repo_admin_team", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Admin team for the django-commons-playground repository", - "etag": "W/\"dd6cea22ddfa64ef04bfa4577a408cacdbc380389b036034501c26ba87935584\"", - "id": "9757650", - "ldap_dn": "", - "members_count": 5, - "name": "django-commons-playground-admins", - "node_id": "T_kwDOCaaRBM4AlOPS", - "parent_team_id": "9757678", - "parent_team_read_id": "9757678", - "parent_team_read_slug": "django-commons-playground", - "privacy": "closed", - "slug": "django-commons-playground-admins" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Admin team for the django-fsm-2 repository", - "etag": "W/\"e494186402ecdd31caf40163e0493b5aa1e57ac575928455d00e6e203ac797b2\"", - "id": "10870432", - "ldap_dn": "", - "members_count": 2, - "name": "django-fsm-2-admins", - "node_id": "T_kwDOCaaRBM4Apd6g", - "parent_team_id": "10870431", - "parent_team_read_id": "10870431", - "parent_team_read_slug": "django-fsm-2", - "privacy": "closed", - "slug": "django-fsm-2-admins" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Admin team for the django-tasks-scheduler repository", - "etag": "W/\"a10f8781578d72428616c6b57afadb216def3b08504a304e294266139b965e87\"", - "id": "10707221", - "ldap_dn": "", - "members_count": 1, - "name": "django-tasks-scheduler-admins", - "node_id": "T_kwDOCaaRBM4Ao2EV", - "parent_team_id": "10707217", - "parent_team_read_id": "10707217", - "parent_team_read_slug": "django-tasks-scheduler", - "privacy": "closed", - "slug": "django-tasks-scheduler-admins" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team", - "name": "repo_committer_team", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Committers team for the django-commons-playground repository", - "etag": "W/\"5b93e68fb9f7f76ec5cf37322ce9517b232b6a37dc462247975f01a98aaaa68b\"", - "id": "9757668", - "ldap_dn": "", - "members_count": 1, - "name": "django-commons-playground-committers", - "node_id": "T_kwDOCaaRBM4AlOPk", - "parent_team_id": "9757678", - "parent_team_read_id": "9757678", - "parent_team_read_slug": "django-commons-playground", - "privacy": "closed", - "slug": "django-commons-playground-committers" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Committers team for the django-fsm-2 repository", - "etag": "W/\"79d4758348eb742e0a8f732dadbade2b5b9c6f8118d5f98a7cf4787ce712bc29\"", - "id": "10870433", - "ldap_dn": "", - "members_count": 0, - "name": "django-fsm-2-committers", - "node_id": "T_kwDOCaaRBM4Apd6h", - "parent_team_id": "10870431", - "parent_team_read_id": "10870431", - "parent_team_read_slug": "django-fsm-2", - "privacy": "closed", - "slug": "django-fsm-2-committers" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Committers team for the django-tasks-scheduler repository", - "etag": "W/\"66662e0a91e8e9477c07a26bc306d7cbde242a1f5e123864b1e1aa3892ad56cf\"", - "id": "10707220", - "ldap_dn": "", - "members_count": 0, - "name": "django-tasks-scheduler-committers", - "node_id": "T_kwDOCaaRBM4Ao2EU", - "parent_team_id": "10707217", - "parent_team_read_id": "10707217", - "parent_team_read_slug": "django-tasks-scheduler", - "privacy": "closed", - "slug": "django-tasks-scheduler-committers" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team", - "name": "repo_team", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Main team for the django-commons-playground repository", - "etag": "W/\"e8ef028ab284524b852495f2fc50fb0b8bc25484145757aea737a3d36be9dbc3\"", - "id": "9757678", - "ldap_dn": "", - "members_count": 6, - "name": "django-commons-playground", - "node_id": "T_kwDOCaaRBM4AlOPu", - "parent_team_id": "", - "parent_team_read_id": "", - "parent_team_read_slug": "", - "privacy": "closed", - "slug": "django-commons-playground" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Main team for the django-fsm-2 repository", - "etag": "W/\"7bd24e759ed6ffb932982eb0e5f8218347e2c1ace9d430752c845c6c13866659\"", - "id": "10870431", - "ldap_dn": "", - "members_count": 2, - "name": "django-fsm-2", - "node_id": "T_kwDOCaaRBM4Apd6f", - "parent_team_id": "", - "parent_team_read_id": "", - "parent_team_read_slug": "", - "privacy": "closed", - "slug": "django-fsm-2" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "create_default_maintainer": false, - "description": "Main team for the django-tasks-scheduler repository", - "etag": "W/\"c56cf3f2e82ba0cbdbddc052f16a386933bd304f86a4366f0f29e7eebef8e42c\"", - "id": "10707217", - "ldap_dn": "", - "members_count": 1, - "name": "django-tasks-scheduler", - "node_id": "T_kwDOCaaRBM4Ao2ER", - "parent_team_id": "", - "parent_team_read_id": "", - "parent_team_read_slug": "", - "privacy": "closed", - "slug": "django-tasks-scheduler" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - } - ] - }, - { - "mode": "managed", - "type": "github_team_members", - "name": "org_team_members", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "Admins", - "schema_version": 0, - "attributes": { - "id": "9763562", - "members": [ - { - "role": "maintainer", - "username": "Stormheg" - }, - { - "role": "maintainer", - "username": "cunla" - }, - { - "role": "maintainer", - "username": "ryancheley" - }, - { - "role": "maintainer", - "username": "tim-schilling" - }, - { - "role": "maintainer", - "username": "williln" - } - ], - "team_id": "9763562" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.org_teams" - ] - }, - { - "index_key": "security-team", - "schema_version": 0, - "attributes": { - "id": "10641823", - "members": [ - { - "role": "maintainer", - "username": "matthiask" - }, - { - "role": "maintainer", - "username": "tim-schilling" - } - ], - "team_id": "10641823" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.org_teams" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team_members", - "name": "repo_admin_members", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "id": "9757650", - "members": [ - { - "role": "maintainer", - "username": "Stormheg" - }, - { - "role": "maintainer", - "username": "cunla" - }, - { - "role": "maintainer", - "username": "ryancheley" - }, - { - "role": "maintainer", - "username": "tim-schilling" - }, - { - "role": "maintainer", - "username": "williln" - } - ], - "team_id": "9757650" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "id": "10870432", - "members": [ - { - "role": "member", - "username": "Natim" - }, - { - "role": "member", - "username": "pfouque" - } - ], - "team_id": "10870432" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "id": "10707221", - "members": [ - { - "role": "maintainer", - "username": "cunla" - } - ], - "team_id": "10707221" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team_members", - "name": "repo_committer_team_members", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "id": "9757668", - "members": [ - { - "role": "member", - "username": "priyapahwa" - } - ], - "team_id": "9757668" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.repo_committer_team", - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team_members", - "name": "repo_team_members", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "id": "9757678", - "members": [ - { - "role": "maintainer", - "username": "Stormheg" - }, - { - "role": "maintainer", - "username": "cunla" - }, - { - "role": "maintainer", - "username": "ryancheley" - }, - { - "role": "maintainer", - "username": "tim-schilling" - }, - { - "role": "maintainer", - "username": "williln" - }, - { - "role": "member", - "username": "priyapahwa" - } - ], - "team_id": "9757678" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "id": "10870431", - "members": [ - { - "role": "member", - "username": "Natim" - }, - { - "role": "member", - "username": "pfouque" - } - ], - "team_id": "10870431" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "id": "10707217", - "members": [ - { - "role": "maintainer", - "username": "cunla" - } - ], - "team_id": "10707217" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team_repository", - "name": "repo_admin_team_access", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "etag": "W/\"da33cd3b9b9134fb8ea24d7867d757cb1de9e15b123c2c4df5b2c8c3d6a485f5\"", - "id": "9757650:django-commons-playground", - "permission": "admin", - "repository": "django-commons-playground", - "team_id": "9757650" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "etag": "W/\"dce7d47b6a828d5f542cca631e4c5a8222f1913a299d6d809ed52daa307bd1cf\"", - "id": "10870432:django-fsm-2", - "permission": "admin", - "repository": "django-fsm-2", - "team_id": "10870432" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "etag": "W/\"5c5c2855f168a59fa2ca0709d3adc0d702c32854033dc4107bf5b103edca8193\"", - "id": "10707221:django-tasks-scheduler", - "permission": "admin", - "repository": "django-tasks-scheduler", - "team_id": "10707221" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_admin_team", - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team_repository", - "name": "repo_committer_team_access", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "etag": "W/\"c519dfa2d6a7c3e89407c0925842fd79ae89c8e60d3c0595104e7d46994c58d7\"", - "id": "9757668:django-commons-playground", - "permission": "maintain", - "repository": "django-commons-playground", - "team_id": "9757668" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.repo_committer_team", - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "etag": "W/\"cbbb2b80f733615553832dbc1e00dc7ce7bddd8ed3d94360913a3c7315215a89\"", - "id": "10870433:django-fsm-2", - "permission": "maintain", - "repository": "django-fsm-2", - "team_id": "10870433" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_committer_team", - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "etag": "W/\"abda702c41fd63d07207c174573e57cec2fac112f01ec3b0daefee6f7f08ced7\"", - "id": "10707220:django-tasks-scheduler", - "permission": "maintain", - "repository": "django-tasks-scheduler", - "team_id": "10707220" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_committer_team", - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team_repository", - "name": "repo_team_access", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "etag": "W/\"edf92491fb3070648735a9d3a693e143aa7fce20174435fcb12c90b8bd5d75eb\"", - "id": "9757678:django-commons-playground", - "permission": "triage", - "repository": "django-commons-playground", - "team_id": "9757678" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "etag": "W/\"b1d24c1d6584448edc62748a79e94fa160edee170a76f8d65cdd821f71b646c7\"", - "id": "10870431:django-fsm-2", - "permission": "triage", - "repository": "django-fsm-2", - "team_id": "10870431" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "etag": "W/\"b05b621d93a54d8cbb7e994b9771365abe1f9b309afc128e3853682ed01c39cc\"", - "id": "10707217:django-tasks-scheduler", - "permission": "triage", - "repository": "django-tasks-scheduler", - "team_id": "10707217" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - } - ] - }, - { - "mode": "managed", - "type": "github_team_settings", - "name": "this", - "provider": "provider[\"registry.terraform.io/integrations/github\"]", - "instances": [ - { - "index_key": "django-commons-playground", - "schema_version": 0, - "attributes": { - "id": "T_kwDOCaaRBM4AlOPu", - "review_request_delegation": [ - { - "algorithm": "LOAD_BALANCE", - "member_count": 2, - "notify": false - } - ], - "team_id": "9757678", - "team_slug": "django-commons-playground", - "team_uid": "T_kwDOCaaRBM4AlOPu" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-fsm-2", - "schema_version": 0, - "attributes": { - "id": "T_kwDOCaaRBM4Apd6f", - "review_request_delegation": [ - { - "algorithm": "LOAD_BALANCE", - "member_count": 2, - "notify": false - } - ], - "team_id": "10870431", - "team_slug": "django-fsm-2", - "team_uid": "T_kwDOCaaRBM4Apd6f" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - }, - { - "index_key": "django-tasks-scheduler", - "schema_version": 0, - "attributes": { - "id": "T_kwDOCaaRBM4Ao2ER", - "review_request_delegation": [ - { - "algorithm": "LOAD_BALANCE", - "member_count": 2, - "notify": false - } - ], - "team_id": "10707217", - "team_slug": "django-tasks-scheduler", - "team_uid": "T_kwDOCaaRBM4Ao2ER" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "github_team.repo_team" - ] - } - ] - } - ], - "check_results": null -} diff --git a/terraform/variables.tf b/terraform/variables.tf deleted file mode 100644 index b05c444..0000000 --- a/terraform/variables.tf +++ /dev/null @@ -1,74 +0,0 @@ -# Input Variables -# https://www.terraform.io/language/values/variables - -variable "admins" { - description = "A set of admins to add to the organization" - type = set(string) -} - -variable "github_token" { - description = "The GitHub token used for managing the organization" - type = string - sensitive = true -} - -variable "members" { - description = "A set of members to add to the organization" - type = set(string) - default = [] -} - -variable "repositories" { - description = "Map of repositories to create" - type = map(object({ - description = string - allow_auto_merge = optional(bool, false) - allow_merge_commit = optional(bool, false) - allow_rebase_merge = optional(bool, false) - allow_squash_merge = optional(bool, true) - allow_update_branch = optional(bool, true) - delete_branch_on_merge = optional(bool, true) - has_discussions = optional(bool, true) - has_downloads = optional(bool, true) - homepage_url = optional(string, "") - has_wiki = optional(bool, false) - is_template = optional(bool, false) - push_allowances = optional(list(string), []) - enable_branch_protection = optional(bool, true) - required_status_checks_contexts = optional(list(string), []) - template = optional(string) - topics = optional(list(string)) - visibility = optional(string, "public") - is_django_commons_repo = optional(bool, false) # Do not create teams for repository - admins = optional(set(string), []) # Members of the repository's admin and repository teams. Have admin permissions - committers = optional(set(string), []) - # Members of the repository's committers and repository teams. Have write permissions - members = optional(set(string), []) # Members of the repository team. Have triage permissions - - # The following are valid combinations for the merge commit title and message: PR_TITLE and PR_BODY, PR_TITLE and BLANK, MERGE_MESAGE and PR_TITLE. (invalid_merge_commit_setting_combo)}] - merge_commit_title = optional(string, null) - merge_commit_message = optional(string, null) - squash_merge_commit_title = optional(string, null) - squash_merge_commit_message = optional(string, null) - })) -} - -variable "organization_teams" { - description = "Map of Django Commons organization teams to manage" - type = map(object({ - description = string - maintainers = optional(set(string), []) - members = optional(set(string), []) - permission = optional(string, null) - privacy = optional(string, "closed") - review_request_delegation = optional(bool, false) - })) -} - -variable "organization_secrets" { - description = "Map of secrets to add to the organization" - type = map(object({ - description = string - visibility = string - })) -}