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
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
# vim swap files
**/*.sw[po]

# don't commit terraform state or lock. the repo code is the only state we care about.
# the provider state cache is auto-upgraded by default to ensure compatibility with upstream cloud provider APIs
**/.terraform.lock.hcl
**/.terraform

# IDE Folders
**/.vscode

# Mac Finder cache
**/.DS_Store

# Plan output
plan-output.txt

# Generated pre-commit configuration
Expand Down
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,12 @@ have changed. Re-run `make test` to refresh it and run the checks.

- `images` - Contains tfroot-runner image and canonical pre-commit config
- `shared-workflows` - Contains the reusable OpenTofu workflow

## Import ID Formats

Use the provider's resource-specific ID format when adopting existing GitHub
objects:

- repositories: `<repository>`
- `main` branch protections: `<repository>:main`
- Actions secrets: `<repository>/<secret-name>`
2 changes: 0 additions & 2 deletions gh-iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resource "github_membership" "admin" {
role = "admin"
}

# Teams for ArgoCD RBAC integration
resource "github_team" "admins" {
name = "admins"
description = "ArgoCD administrators"
Expand All @@ -16,7 +15,6 @@ resource "github_team" "developers" {
privacy = "closed"
}

# Team memberships
resource "github_team_membership" "admins_xnoto" {
team_id = github_team.admins.id
username = "xnoto"
Expand Down
8 changes: 0 additions & 8 deletions gh-protections.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
/*
import {
for_each = local.github_repositories
to = github_branch_protection.protections[each.key]
id = "${each.key}:main"
}
*/

resource "github_branch_protection" "protections" {
for_each = toset([for repo in local.github_repositories : repo if !contains(local.archived_github_repositories, repo)])
repository_id = github_repository.repositories[each.key].node_id
Expand Down
8 changes: 0 additions & 8 deletions gh-repositories.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
/*
import {
for_each = local.github_repositories
to = github_repository.repositories[each.key]
id = each.key
}
*/

resource "github_repository" "repositories" {
for_each = local.github_repositories
name = each.key
Expand Down
8 changes: 0 additions & 8 deletions gh-secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ locals {
])
}

/*
import {
for_each = { for pair in local.secret_repo_pairs : "${pair.repository}_${pair.name}" => pair }
to = github_actions_secret.secrets["${each.value.repository}_${each.value.name}"]
id = "${each.value.repository}/${each.value.name}"
}
*/

resource "github_actions_secret" "secrets" {
for_each = { for pair in local.secret_repo_pairs : "${pair.repository}_${pair.name}" => pair }
repository = each.value.repository
Expand Down
2 changes: 2 additions & 0 deletions opencode.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"aws-prod": {"enabled": false},
"grafana": {"enabled": false},
"terraform-docs": {"enabled": false},
"argocd-makeitwork": {"enabled": true},
"argocd-staging-eks": {"enabled": false},
"argocd-prod-eks": {"enabled": false}
},
Expand All @@ -30,6 +31,7 @@
"aws-prod_*": false,
"grafana_*": false,
"terraform-docs_*": false,
"argocd-makeitwork_*": true,
"argocd-staging-eks_*": false,
"argocd-prod-eks_*": false
}
Expand Down
Loading