From 64216b82e9c88489c4473b1ca77b9ae9cb553813 Mon Sep 17 00:00:00 2001 From: David Arnold <10138997+djaboxx@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:28:50 -0700 Subject: [PATCH 01/21] Add README.md --- README.md | 97 ------------------------------------------------------- 1 file changed, 97 deletions(-) diff --git a/README.md b/README.md index 52a6a1e..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,97 +0,0 @@ -# terraform-github-repo -Module to automate creation of -* github related resources - * repo - * default branch - * branch protection rule for main branch - * default codeowners and backend.tf file - * team access - - -## Requirements - -| Name | Version | -|------|---------| -| [github](#requirement\_github) | >= 6.2.2 | - -## Providers - -| Name | Version | -|------|---------| -| [github](#provider\_github) | 6.2.3 | - -## Modules - -No modules. - -## Resources - -| Name | Type | -|------|------| -| [github_actions_secret.secret](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_secret) | resource | -| [github_actions_variable.variable](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_variable) | resource | -| [github_branch.branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch) | resource | -| [github_branch_default.default_main_branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_default) | resource | -| [github_branch_protection.main](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection) | resource | -| [github_repository.repo](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository) | resource | -| [github_repository_collaborator.collaborators](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_collaborator) | resource | -| [github_repository_file.codeowners](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource | -| [github_repository_file.extra_files](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource | -| [github_repository_file.managed_extra_files](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource | -| [github_team_repository.admin](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource | -| [github_organization_teams.root_teams](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/organization_teams) | data source | -| [github_ref.ref](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/ref) | data source | -| [github_repository.template_repo](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/repository) | data source | -| [github_user.pull_request_bypassers](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/user) | data source | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [additional\_codeowners](#input\_additional\_codeowners) | Enable adding of Codeowner Teams | `list(any)` | `[]` | no | -| [admin\_teams](#input\_admin\_teams) | Admin Teams | `list(any)` | `[]` | no | -| [archive\_on\_destroy](#input\_archive\_on\_destroy) | n/a | `bool` | `true` | no | -| [archived](#input\_archived) | n/a | `bool` | `false` | no | -| [collaborators](#input\_collaborators) | list of repo callaborators | `map(string)` | `{}` | no | -| [create\_codeowners](#input\_create\_codeowners) | n/a | `bool` | `true` | no | -| [enforce\_prs](#input\_enforce\_prs) | n/a | `bool` | `true` | no | -| [extra\_files](#input\_extra\_files) | Extra Files |
list(object({
path = string,
content = string
})) | `[]` | no |
-| [force\_name](#input\_force\_name) | Force Naming of Repo. If forced, archive management will not operate on this repo | `bool` | `false` | no |
-| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | n/a | `bool` | `false` | no |
-| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | n/a | `bool` | `false` | no |
-| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | n/a | `bool` | `true` | no |
-| [github\_auto\_init](#input\_github\_auto\_init) | n/a | `bool` | `true` | no |
-| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no |
-| [github\_default\_branch](#input\_github\_default\_branch) | n/a | `string` | `"main"` | no |
-| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | n/a | `bool` | `true` | no |
-| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | n/a | `bool` | `true` | no |
-| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | n/a | `bool` | `true` | no |
-| [github\_has\_issues](#input\_github\_has\_issues) | n/a | `bool` | `false` | no |
-| [github\_has\_projects](#input\_github\_has\_projects) | n/a | `bool` | `true` | no |
-| [github\_has\_wiki](#input\_github\_has\_wiki) | n/a | `bool` | `true` | no |
-| [github\_is\_private](#input\_github\_is\_private) | n/a | `bool` | `true` | no |
-| [github\_org\_teams](#input\_github\_org\_teams) | provide module with list of teams so that module does not need to look them up | `list(any)` | `null` | no |
-| [github\_push\_restrictions](#input\_github\_push\_restrictions) | Github Push Restrictions | `list(any)` | `[]` | no |
-| [github\_repo\_description](#input\_github\_repo\_description) | n/a | `any` | `null` | no |
-| [github\_repo\_topics](#input\_github\_repo\_topics) | Github Repo Topics | `list(any)` | `[]` | no |
-| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | n/a | `bool` | `true` | no |
-| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | n/a | `number` | `1` | no |
-| [is\_template](#input\_is\_template) | n/a | `bool` | `false` | no |
-| [managed\_extra\_files](#input\_managed\_extra\_files) | Managed Extra Files. Changes to Content will be updated | list(object({
path = string,
content = string
})) | `[]` | no |
-| [name](#input\_name) | Name of the terraform workspace and optionally github repo | `any` | n/a | yes |
-| [prefix](#input\_prefix) | n/a | `any` | `null` | no |
-| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | n/a | `list(any)` | `[]` | no |
-| [repo\_org](#input\_repo\_org) | n/a | `any` | `null` | no |
-| [required\_status\_checks](#input\_required\_status\_checks) | Required Status Checksobject({
contexts = list(string)
strict = optional(bool, false)
}) | `null` | no |
-| [secrets](#input\_secrets) | Github Action Secrets | list(object({
name = string,
value = string
})) | `[]` | no |
-| [template\_repo](#input\_template\_repo) | n/a | `any` | `null` | no |
-| [template\_repo\_org](#input\_template\_repo\_org) | n/a | `any` | `null` | no |
-| [vars](#input\_vars) | Github Action Vars | list(object({
name = string,
value = string
})) | `[]` | no |
-| [vulnerability\_alerts](#input\_vulnerability\_alerts) | n/a | `bool` | `false` | no |
-
-## Outputs
-
-| Name | Description |
-|------|-------------|
-| [github\_repo](#output\_github\_repo) | n/a |
-
\ No newline at end of file
From 42ce2884f359cb179159b5006152f7bce4f6df57 Mon Sep 17 00:00:00 2001
From: djaboxx list(object({
path = string,
content = string
})) | `[]` | no |
+| [force\_name](#input\_force\_name) | Force Naming of Repo. If forced, archive management will not operate on this repo | `bool` | `false` | no |
+| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | n/a | `bool` | `false` | no |
+| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | n/a | `bool` | `false` | no |
+| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | n/a | `bool` | `true` | no |
+| [github\_auto\_init](#input\_github\_auto\_init) | n/a | `bool` | `true` | no |
+| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no |
+| [github\_default\_branch](#input\_github\_default\_branch) | n/a | `string` | `"main"` | no |
+| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | n/a | `bool` | `true` | no |
+| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | n/a | `bool` | `true` | no |
+| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | n/a | `bool` | `true` | no |
+| [github\_has\_issues](#input\_github\_has\_issues) | n/a | `bool` | `false` | no |
+| [github\_has\_projects](#input\_github\_has\_projects) | n/a | `bool` | `true` | no |
+| [github\_has\_wiki](#input\_github\_has\_wiki) | n/a | `bool` | `true` | no |
+| [github\_is\_private](#input\_github\_is\_private) | n/a | `bool` | `true` | no |
+| [github\_org\_teams](#input\_github\_org\_teams) | provide module with list of teams so that module does not need to look them up | `list(any)` | `null` | no |
+| [github\_push\_restrictions](#input\_github\_push\_restrictions) | Github Push Restrictions | `list(any)` | `[]` | no |
+| [github\_repo\_description](#input\_github\_repo\_description) | n/a | `any` | `null` | no |
+| [github\_repo\_topics](#input\_github\_repo\_topics) | Github Repo Topics | `list(any)` | `[]` | no |
+| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | n/a | `bool` | `true` | no |
+| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | n/a | `number` | `1` | no |
+| [is\_template](#input\_is\_template) | n/a | `bool` | `false` | no |
+| [managed\_extra\_files](#input\_managed\_extra\_files) | Managed Extra Files. Changes to Content will be updated | list(object({
path = string,
content = string
})) | `[]` | no |
+| [name](#input\_name) | Name of the terraform workspace and optionally github repo | `any` | n/a | yes |
+| [prefix](#input\_prefix) | n/a | `any` | `null` | no |
+| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | n/a | `list(any)` | `[]` | no |
+| [repo\_org](#input\_repo\_org) | n/a | `any` | `null` | no |
+| [required\_status\_checks](#input\_required\_status\_checks) | Required Status Checksobject({
contexts = list(string)
strict = optional(bool, false)
}) | `null` | no |
+| [secrets](#input\_secrets) | Github Action Secrets | list(object({
name = string,
value = string
})) | `[]` | no |
+| [template\_repo](#input\_template\_repo) | n/a | `any` | `null` | no |
+| [template\_repo\_org](#input\_template\_repo\_org) | n/a | `any` | `null` | no |
+| [vars](#input\_vars) | Github Action Vars | list(object({
name = string,
value = string
})) | `[]` | no |
+| [vulnerability\_alerts](#input\_vulnerability\_alerts) | n/a | `bool` | `false` | no |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| [github\_repo](#output\_github\_repo) | n/a |
+
\ No newline at end of file
From 9470e63b28591391e489af5756593f9ce973d51d Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Thu, 12 Sep 2024 11:47:53 -0700
Subject: [PATCH 03/21] Update README.md
---
README.md | 88 -------------------------------------------------------
1 file changed, 88 deletions(-)
diff --git a/README.md b/README.md
index fa2674f..e69de29 100644
--- a/README.md
+++ b/README.md
@@ -1,88 +0,0 @@
-
-## Requirements
-
-| Name | Version |
-|------|---------|
-| [github](#requirement\_github) | >= 6.2.2 |
-
-## Providers
-
-| Name | Version |
-|------|---------|
-| [github](#provider\_github) | 6.2.3 |
-
-## Modules
-
-No modules.
-
-## Resources
-
-| Name | Type |
-|------|------|
-| [github_actions_secret.secret](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_secret) | resource |
-| [github_actions_variable.variable](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_variable) | resource |
-| [github_branch.branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch) | resource |
-| [github_branch_default.default_main_branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_default) | resource |
-| [github_branch_protection.main](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection) | resource |
-| [github_repository.repo](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository) | resource |
-| [github_repository_collaborator.collaborators](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_collaborator) | resource |
-| [github_repository_file.codeowners](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource |
-| [github_repository_file.extra_files](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource |
-| [github_repository_file.managed_extra_files](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource |
-| [github_team_repository.admin](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource |
-| [github_organization_teams.root_teams](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/organization_teams) | data source |
-| [github_ref.ref](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/ref) | data source |
-| [github_repository.template_repo](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/repository) | data source |
-| [github_user.pull_request_bypassers](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/user) | data source |
-
-## Inputs
-
-| Name | Description | Type | Default | Required |
-|------|-------------|------|---------|:--------:|
-| [additional\_codeowners](#input\_additional\_codeowners) | Enable adding of Codeowner Teams | `list(any)` | `[]` | no |
-| [admin\_teams](#input\_admin\_teams) | Admin Teams | `list(any)` | `[]` | no |
-| [archive\_on\_destroy](#input\_archive\_on\_destroy) | n/a | `bool` | `true` | no |
-| [archived](#input\_archived) | n/a | `bool` | `false` | no |
-| [collaborators](#input\_collaborators) | list of repo callaborators | `map(string)` | `{}` | no |
-| [create\_codeowners](#input\_create\_codeowners) | n/a | `bool` | `true` | no |
-| [enforce\_prs](#input\_enforce\_prs) | n/a | `bool` | `true` | no |
-| [extra\_files](#input\_extra\_files) | Extra Files | list(object({
path = string,
content = string
})) | `[]` | no |
-| [force\_name](#input\_force\_name) | Force Naming of Repo. If forced, archive management will not operate on this repo | `bool` | `false` | no |
-| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | n/a | `bool` | `false` | no |
-| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | n/a | `bool` | `false` | no |
-| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | n/a | `bool` | `true` | no |
-| [github\_auto\_init](#input\_github\_auto\_init) | n/a | `bool` | `true` | no |
-| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no |
-| [github\_default\_branch](#input\_github\_default\_branch) | n/a | `string` | `"main"` | no |
-| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | n/a | `bool` | `true` | no |
-| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | n/a | `bool` | `true` | no |
-| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | n/a | `bool` | `true` | no |
-| [github\_has\_issues](#input\_github\_has\_issues) | n/a | `bool` | `false` | no |
-| [github\_has\_projects](#input\_github\_has\_projects) | n/a | `bool` | `true` | no |
-| [github\_has\_wiki](#input\_github\_has\_wiki) | n/a | `bool` | `true` | no |
-| [github\_is\_private](#input\_github\_is\_private) | n/a | `bool` | `true` | no |
-| [github\_org\_teams](#input\_github\_org\_teams) | provide module with list of teams so that module does not need to look them up | `list(any)` | `null` | no |
-| [github\_push\_restrictions](#input\_github\_push\_restrictions) | Github Push Restrictions | `list(any)` | `[]` | no |
-| [github\_repo\_description](#input\_github\_repo\_description) | n/a | `any` | `null` | no |
-| [github\_repo\_topics](#input\_github\_repo\_topics) | Github Repo Topics | `list(any)` | `[]` | no |
-| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | n/a | `bool` | `true` | no |
-| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | n/a | `number` | `1` | no |
-| [is\_template](#input\_is\_template) | n/a | `bool` | `false` | no |
-| [managed\_extra\_files](#input\_managed\_extra\_files) | Managed Extra Files. Changes to Content will be updated | list(object({
path = string,
content = string
})) | `[]` | no |
-| [name](#input\_name) | Name of the terraform workspace and optionally github repo | `any` | n/a | yes |
-| [prefix](#input\_prefix) | n/a | `any` | `null` | no |
-| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | n/a | `list(any)` | `[]` | no |
-| [repo\_org](#input\_repo\_org) | n/a | `any` | `null` | no |
-| [required\_status\_checks](#input\_required\_status\_checks) | Required Status Checksobject({
contexts = list(string)
strict = optional(bool, false)
}) | `null` | no |
-| [secrets](#input\_secrets) | Github Action Secrets | list(object({
name = string,
value = string
})) | `[]` | no |
-| [template\_repo](#input\_template\_repo) | n/a | `any` | `null` | no |
-| [template\_repo\_org](#input\_template\_repo\_org) | n/a | `any` | `null` | no |
-| [vars](#input\_vars) | Github Action Vars | list(object({
name = string,
value = string
})) | `[]` | no |
-| [vulnerability\_alerts](#input\_vulnerability\_alerts) | n/a | `bool` | `false` | no |
-
-## Outputs
-
-| Name | Description |
-|------|-------------|
-| [github\_repo](#output\_github\_repo) | n/a |
-
\ No newline at end of file
From 99c7ab023a253a8a92cd8ff7cc99ffa5f6c7699c Mon Sep 17 00:00:00 2001
From: djaboxx list(object({
path = string,
content = string
})) | `[]` | no |
+| [force\_name](#input\_force\_name) | Force Naming of Repo. If forced, archive management will not operate on this repo | `bool` | `false` | no |
+| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | n/a | `bool` | `false` | no |
+| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | n/a | `bool` | `false` | no |
+| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | n/a | `bool` | `true` | no |
+| [github\_auto\_init](#input\_github\_auto\_init) | n/a | `bool` | `true` | no |
+| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no |
+| [github\_default\_branch](#input\_github\_default\_branch) | n/a | `string` | `"main"` | no |
+| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | n/a | `bool` | `true` | no |
+| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | n/a | `bool` | `true` | no |
+| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | n/a | `bool` | `true` | no |
+| [github\_has\_issues](#input\_github\_has\_issues) | n/a | `bool` | `false` | no |
+| [github\_has\_projects](#input\_github\_has\_projects) | n/a | `bool` | `true` | no |
+| [github\_has\_wiki](#input\_github\_has\_wiki) | n/a | `bool` | `true` | no |
+| [github\_is\_private](#input\_github\_is\_private) | n/a | `bool` | `true` | no |
+| [github\_org\_teams](#input\_github\_org\_teams) | provide module with list of teams so that module does not need to look them up | `list(any)` | `null` | no |
+| [github\_push\_restrictions](#input\_github\_push\_restrictions) | Github Push Restrictions | `list(any)` | `[]` | no |
+| [github\_repo\_description](#input\_github\_repo\_description) | n/a | `any` | `null` | no |
+| [github\_repo\_topics](#input\_github\_repo\_topics) | Github Repo Topics | `list(any)` | `[]` | no |
+| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | n/a | `bool` | `true` | no |
+| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | n/a | `number` | `1` | no |
+| [is\_template](#input\_is\_template) | n/a | `bool` | `false` | no |
+| [managed\_extra\_files](#input\_managed\_extra\_files) | Managed Extra Files. Changes to Content will be updated | list(object({
path = string,
content = string
})) | `[]` | no |
+| [name](#input\_name) | Name of the terraform workspace and optionally github repo | `any` | n/a | yes |
+| [prefix](#input\_prefix) | n/a | `any` | `null` | no |
+| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | n/a | `list(any)` | `[]` | no |
+| [repo\_org](#input\_repo\_org) | n/a | `any` | `null` | no |
+| [required\_status\_checks](#input\_required\_status\_checks) | Required Status Checksobject({
contexts = list(string)
strict = optional(bool, false)
}) | `null` | no |
+| [secrets](#input\_secrets) | Github Action Secrets | list(object({
name = string,
value = string
})) | `[]` | no |
+| [template\_repo](#input\_template\_repo) | n/a | `any` | `null` | no |
+| [template\_repo\_org](#input\_template\_repo\_org) | n/a | `any` | `null` | no |
+| [vars](#input\_vars) | Github Action Vars | list(object({
name = string,
value = string
})) | `[]` | no |
+| [vulnerability\_alerts](#input\_vulnerability\_alerts) | n/a | `bool` | `false` | no |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| [github\_repo](#output\_github\_repo) | n/a |
+
\ No newline at end of file
From 4aa3d428ed158e3f0817cf5a67f19980e1d0c20c Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Thu, 12 Sep 2024 11:48:59 -0700
Subject: [PATCH 05/21] Update .github/workflows/modtest-dev.yaml
---
.github/workflows/modtest-dev.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/modtest-dev.yaml b/.github/workflows/modtest-dev.yaml
index f7e89d3..c98e5f1 100644
--- a/.github/workflows/modtest-dev.yaml
+++ b/.github/workflows/modtest-dev.yaml
@@ -2,6 +2,9 @@ name: "ModTest: dev"
on:
pull_request:
+ push:
+ branches:
+ - main
jobs:
modtest:
From bd3584f237177d1b2459408c63e614fedb005b87 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Wed, 18 Sep 2024 10:58:41 -0700
Subject: [PATCH 06/21] Update .github/workflows/terraform.yaml
From f8a165974c9d1ab472bc637705951a7bad254b6c Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Wed, 18 Sep 2024 10:58:42 -0700
Subject: [PATCH 07/21] Update CODEOWNERS
From 297e15ca928eb6c9c1299827445ef7ab23d27d89 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Wed, 18 Sep 2024 10:58:44 -0700
Subject: [PATCH 08/21] Update README.md
From 984b5fdfdf821002c2271cbd85e594bede29f7d6 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Wed, 18 Sep 2024 10:58:57 -0700
Subject: [PATCH 09/21] Update .github/workflows/modtest-dev.yaml
From d02284444eba9adfde38b9cb5d0a6cf680aeb8db Mon Sep 17 00:00:00 2001
From: djaboxx list(object({
path = string,
content = string
})) | `[]` | no |
-| [force\_name](#input\_force\_name) | Force Naming of Repo. If forced, archive management will not operate on this repo | `bool` | `false` | no |
-| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | n/a | `bool` | `false` | no |
-| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | n/a | `bool` | `false` | no |
-| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | n/a | `bool` | `true` | no |
-| [github\_auto\_init](#input\_github\_auto\_init) | n/a | `bool` | `true` | no |
-| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no |
-| [github\_default\_branch](#input\_github\_default\_branch) | n/a | `string` | `"main"` | no |
-| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | n/a | `bool` | `true` | no |
-| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | n/a | `bool` | `true` | no |
-| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | n/a | `bool` | `true` | no |
-| [github\_has\_issues](#input\_github\_has\_issues) | n/a | `bool` | `false` | no |
-| [github\_has\_projects](#input\_github\_has\_projects) | n/a | `bool` | `true` | no |
-| [github\_has\_wiki](#input\_github\_has\_wiki) | n/a | `bool` | `true` | no |
-| [github\_is\_private](#input\_github\_is\_private) | n/a | `bool` | `true` | no |
-| [github\_org\_teams](#input\_github\_org\_teams) | provide module with list of teams so that module does not need to look them up | `list(any)` | `null` | no |
-| [github\_push\_restrictions](#input\_github\_push\_restrictions) | Github Push Restrictions | `list(any)` | `[]` | no |
-| [github\_repo\_description](#input\_github\_repo\_description) | n/a | `any` | `null` | no |
-| [github\_repo\_topics](#input\_github\_repo\_topics) | Github Repo Topics | `list(any)` | `[]` | no |
-| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | n/a | `bool` | `true` | no |
-| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | n/a | `number` | `1` | no |
-| [is\_template](#input\_is\_template) | n/a | `bool` | `false` | no |
-| [managed\_extra\_files](#input\_managed\_extra\_files) | Managed Extra Files. Changes to Content will be updated | list(object({
path = string,
content = string
})) | `[]` | no |
-| [name](#input\_name) | Name of the terraform workspace and optionally github repo | `any` | n/a | yes |
-| [prefix](#input\_prefix) | n/a | `any` | `null` | no |
-| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | n/a | `list(any)` | `[]` | no |
-| [repo\_org](#input\_repo\_org) | n/a | `any` | `null` | no |
-| [required\_status\_checks](#input\_required\_status\_checks) | Required Status Checksobject({
contexts = list(string)
strict = optional(bool, false)
}) | `null` | no |
-| [secrets](#input\_secrets) | Github Action Secrets | list(object({
name = string,
value = string
})) | `[]` | no |
-| [template\_repo](#input\_template\_repo) | n/a | `any` | `null` | no |
-| [template\_repo\_org](#input\_template\_repo\_org) | n/a | `any` | `null` | no |
-| [vars](#input\_vars) | Github Action Vars | list(object({
name = string,
value = string
})) | `[]` | no |
-| [vulnerability\_alerts](#input\_vulnerability\_alerts) | n/a | `bool` | `false` | no |
-
-## Outputs
-
-| Name | Description |
-|------|-------------|
-| [github\_repo](#output\_github\_repo) | n/a |
-
\ No newline at end of file
From 73571976314c341f38e8c04f4e8ffa09d1c94f55 Mon Sep 17 00:00:00 2001
From: djaboxx list(object({
path = string,
content = string
})) | `[]` | no |
+| [force\_name](#input\_force\_name) | Force Naming of Repo. If forced, archive management will not operate on this repo | `bool` | `false` | no |
+| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | n/a | `bool` | `false` | no |
+| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | n/a | `bool` | `false` | no |
+| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | n/a | `bool` | `true` | no |
+| [github\_auto\_init](#input\_github\_auto\_init) | n/a | `bool` | `true` | no |
+| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no |
+| [github\_default\_branch](#input\_github\_default\_branch) | n/a | `string` | `"main"` | no |
+| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | n/a | `bool` | `true` | no |
+| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | n/a | `bool` | `true` | no |
+| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | n/a | `bool` | `true` | no |
+| [github\_has\_issues](#input\_github\_has\_issues) | n/a | `bool` | `false` | no |
+| [github\_has\_projects](#input\_github\_has\_projects) | n/a | `bool` | `true` | no |
+| [github\_has\_wiki](#input\_github\_has\_wiki) | n/a | `bool` | `true` | no |
+| [github\_is\_private](#input\_github\_is\_private) | n/a | `bool` | `true` | no |
+| [github\_org\_teams](#input\_github\_org\_teams) | provide module with list of teams so that module does not need to look them up | `list(any)` | `null` | no |
+| [github\_push\_restrictions](#input\_github\_push\_restrictions) | Github Push Restrictions | `list(any)` | `[]` | no |
+| [github\_repo\_description](#input\_github\_repo\_description) | n/a | `any` | `null` | no |
+| [github\_repo\_topics](#input\_github\_repo\_topics) | Github Repo Topics | `list(any)` | `[]` | no |
+| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | n/a | `bool` | `true` | no |
+| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | n/a | `number` | `1` | no |
+| [is\_template](#input\_is\_template) | n/a | `bool` | `false` | no |
+| [managed\_extra\_files](#input\_managed\_extra\_files) | Managed Extra Files. Changes to Content will be updated | list(object({
path = string,
content = string
})) | `[]` | no |
+| [name](#input\_name) | Name of the terraform workspace and optionally github repo | `any` | n/a | yes |
+| [prefix](#input\_prefix) | n/a | `any` | `null` | no |
+| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | n/a | `list(any)` | `[]` | no |
+| [repo\_org](#input\_repo\_org) | n/a | `any` | `null` | no |
+| [required\_status\_checks](#input\_required\_status\_checks) | Required Status Checksobject({
contexts = list(string)
strict = optional(bool, false)
}) | `null` | no |
+| [secrets](#input\_secrets) | Github Action Secrets | list(object({
name = string,
value = string
})) | `[]` | no |
+| [template\_repo](#input\_template\_repo) | n/a | `any` | `null` | no |
+| [template\_repo\_org](#input\_template\_repo\_org) | n/a | `any` | `null` | no |
+| [vars](#input\_vars) | Github Action Vars | list(object({
name = string,
value = string
})) | `[]` | no |
+| [vulnerability\_alerts](#input\_vulnerability\_alerts) | n/a | `bool` | `false` | no |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| [github\_repo](#output\_github\_repo) | n/a |
+
\ No newline at end of file
From 8deaeec74d3df5f87cc326f74c4eb16156b633c3 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Wed, 25 Sep 2024 12:25:05 -0700
Subject: [PATCH 14/21] Add README.md
---
README.md | 87 ++-----------------------------------------------------
1 file changed, 2 insertions(+), 85 deletions(-)
diff --git a/README.md b/README.md
index cf60864..11c4c27 100644
--- a/README.md
+++ b/README.md
@@ -1,88 +1,5 @@
-
-## Requirements
-| Name | Version |
-|------|---------|
-| [github](#requirement\_github) | >= 6.2.2 |
+[](https://github.com/HappyPathway/terraform-github-repo/actions/workflows/terraform.yaml)
-## Providers
-| Name | Version |
-|------|---------|
-| [github](#provider\_github) | 6.3.0 |
-
-## Modules
-
-No modules.
-
-## Resources
-
-| Name | Type |
-|------|------|
-| [github_actions_secret.secret](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_secret) | resource |
-| [github_actions_variable.variable](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_variable) | resource |
-| [github_branch.branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch) | resource |
-| [github_branch_default.default_main_branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_default) | resource |
-| [github_branch_protection.main](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection) | resource |
-| [github_repository.repo](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository) | resource |
-| [github_repository_collaborator.collaborators](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_collaborator) | resource |
-| [github_repository_file.codeowners](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource |
-| [github_repository_file.extra_files](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource |
-| [github_repository_file.managed_extra_files](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource |
-| [github_team_repository.admin](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource |
-| [github_organization_teams.root_teams](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/organization_teams) | data source |
-| [github_ref.ref](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/ref) | data source |
-| [github_repository.template_repo](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/repository) | data source |
-| [github_user.pull_request_bypassers](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/user) | data source |
-
-## Inputs
-
-| Name | Description | Type | Default | Required |
-|------|-------------|------|---------|:--------:|
-| [additional\_codeowners](#input\_additional\_codeowners) | Enable adding of Codeowner Teams | `list(any)` | `[]` | no |
-| [admin\_teams](#input\_admin\_teams) | Admin Teams | `list(any)` | `[]` | no |
-| [archive\_on\_destroy](#input\_archive\_on\_destroy) | n/a | `bool` | `true` | no |
-| [archived](#input\_archived) | n/a | `bool` | `false` | no |
-| [collaborators](#input\_collaborators) | list of repo callaborators | `map(string)` | `{}` | no |
-| [create\_codeowners](#input\_create\_codeowners) | n/a | `bool` | `true` | no |
-| [enforce\_prs](#input\_enforce\_prs) | n/a | `bool` | `true` | no |
-| [extra\_files](#input\_extra\_files) | Extra Files | list(object({
path = string,
content = string
})) | `[]` | no |
-| [force\_name](#input\_force\_name) | Force Naming of Repo. If forced, archive management will not operate on this repo | `bool` | `false` | no |
-| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | n/a | `bool` | `false` | no |
-| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | n/a | `bool` | `false` | no |
-| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | n/a | `bool` | `true` | no |
-| [github\_auto\_init](#input\_github\_auto\_init) | n/a | `bool` | `true` | no |
-| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no |
-| [github\_default\_branch](#input\_github\_default\_branch) | n/a | `string` | `"main"` | no |
-| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | n/a | `bool` | `true` | no |
-| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | n/a | `bool` | `true` | no |
-| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | n/a | `bool` | `true` | no |
-| [github\_has\_issues](#input\_github\_has\_issues) | n/a | `bool` | `false` | no |
-| [github\_has\_projects](#input\_github\_has\_projects) | n/a | `bool` | `true` | no |
-| [github\_has\_wiki](#input\_github\_has\_wiki) | n/a | `bool` | `true` | no |
-| [github\_is\_private](#input\_github\_is\_private) | n/a | `bool` | `true` | no |
-| [github\_org\_teams](#input\_github\_org\_teams) | provide module with list of teams so that module does not need to look them up | `list(any)` | `null` | no |
-| [github\_push\_restrictions](#input\_github\_push\_restrictions) | Github Push Restrictions | `list(any)` | `[]` | no |
-| [github\_repo\_description](#input\_github\_repo\_description) | n/a | `any` | `null` | no |
-| [github\_repo\_topics](#input\_github\_repo\_topics) | Github Repo Topics | `list(any)` | `[]` | no |
-| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | n/a | `bool` | `true` | no |
-| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | n/a | `number` | `1` | no |
-| [is\_template](#input\_is\_template) | n/a | `bool` | `false` | no |
-| [managed\_extra\_files](#input\_managed\_extra\_files) | Managed Extra Files. Changes to Content will be updated | list(object({
path = string,
content = string
})) | `[]` | no |
-| [name](#input\_name) | Name of the terraform workspace and optionally github repo | `any` | n/a | yes |
-| [prefix](#input\_prefix) | n/a | `any` | `null` | no |
-| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | n/a | `list(any)` | `[]` | no |
-| [repo\_org](#input\_repo\_org) | n/a | `any` | `null` | no |
-| [required\_status\_checks](#input\_required\_status\_checks) | Required Status Checksobject({
contexts = list(string)
strict = optional(bool, false)
}) | `null` | no |
-| [secrets](#input\_secrets) | Github Action Secrets | list(object({
name = string,
value = string
})) | `[]` | no |
-| [template\_repo](#input\_template\_repo) | n/a | `any` | `null` | no |
-| [template\_repo\_org](#input\_template\_repo\_org) | n/a | `any` | `null` | no |
-| [vars](#input\_vars) | Github Action Vars | list(object({
name = string,
value = string
})) | `[]` | no |
-| [vulnerability\_alerts](#input\_vulnerability\_alerts) | n/a | `bool` | `false` | no |
-
-## Outputs
-
-| Name | Description |
-|------|-------------|
-| [github\_repo](#output\_github\_repo) | n/a |
-
\ No newline at end of file
+[](https://github.com/HappyPathway/terraform-github-repo/actions/workflows/modtest-dev.yaml)
From 9cc2fae30b5b7b40323b20a679f66f6e78023f0f Mon Sep 17 00:00:00 2001
From: djaboxx list(object({
path = string,
content = string
})) | `[]` | no |
+| [force\_name](#input\_force\_name) | Force Naming of Repo. If forced, archive management will not operate on this repo | `bool` | `false` | no |
+| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | n/a | `bool` | `false` | no |
+| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | n/a | `bool` | `false` | no |
+| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | n/a | `bool` | `true` | no |
+| [github\_auto\_init](#input\_github\_auto\_init) | n/a | `bool` | `true` | no |
+| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no |
+| [github\_default\_branch](#input\_github\_default\_branch) | n/a | `string` | `"main"` | no |
+| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | n/a | `bool` | `true` | no |
+| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | n/a | `bool` | `true` | no |
+| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | n/a | `bool` | `true` | no |
+| [github\_has\_issues](#input\_github\_has\_issues) | n/a | `bool` | `false` | no |
+| [github\_has\_projects](#input\_github\_has\_projects) | n/a | `bool` | `true` | no |
+| [github\_has\_wiki](#input\_github\_has\_wiki) | n/a | `bool` | `true` | no |
+| [github\_is\_private](#input\_github\_is\_private) | n/a | `bool` | `true` | no |
+| [github\_org\_teams](#input\_github\_org\_teams) | provide module with list of teams so that module does not need to look them up | `list(any)` | `null` | no |
+| [github\_push\_restrictions](#input\_github\_push\_restrictions) | Github Push Restrictions | `list(any)` | `[]` | no |
+| [github\_repo\_description](#input\_github\_repo\_description) | n/a | `any` | `null` | no |
+| [github\_repo\_topics](#input\_github\_repo\_topics) | Github Repo Topics | `list(any)` | `[]` | no |
+| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | n/a | `bool` | `true` | no |
+| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | n/a | `number` | `1` | no |
+| [is\_template](#input\_is\_template) | n/a | `bool` | `false` | no |
+| [managed\_extra\_files](#input\_managed\_extra\_files) | Managed Extra Files. Changes to Content will be updated | list(object({
path = string,
content = string
})) | `[]` | no |
+| [name](#input\_name) | Name of the terraform workspace and optionally github repo | `any` | n/a | yes |
+| [prefix](#input\_prefix) | n/a | `any` | `null` | no |
+| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | n/a | `list(any)` | `[]` | no |
+| [repo\_org](#input\_repo\_org) | n/a | `any` | `null` | no |
+| [required\_status\_checks](#input\_required\_status\_checks) | Required Status Checksobject({
contexts = list(string)
strict = optional(bool, false)
}) | `null` | no |
+| [secrets](#input\_secrets) | Github Action Secrets | list(object({
name = string,
value = string
})) | `[]` | no |
+| [template\_repo](#input\_template\_repo) | n/a | `any` | `null` | no |
+| [template\_repo\_org](#input\_template\_repo\_org) | n/a | `any` | `null` | no |
+| [vars](#input\_vars) | Github Action Vars | list(object({
name = string,
value = string
})) | `[]` | no |
+| [vulnerability\_alerts](#input\_vulnerability\_alerts) | n/a | `bool` | `false` | no |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| [github\_repo](#output\_github\_repo) | n/a |
+
\ No newline at end of file
From 13ef109fdf7698bc88cd71ca2b16418eed32a119 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Wed, 16 Oct 2024 23:13:18 -0700
Subject: [PATCH 16/21] Update .github/workflows/terraform.yaml
---
.github/workflows/terraform.yaml | 77 ++++++++++++++++++++++++++------
1 file changed, 64 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/terraform.yaml b/.github/workflows/terraform.yaml
index 3c54a0d..0df3f90 100644
--- a/.github/workflows/terraform.yaml
+++ b/.github/workflows/terraform.yaml
@@ -1,28 +1,79 @@
-name: "Gtag"
+name: "Terraform Validate"
on:
workflow_dispatch:
- pull_request:
push:
branches:
- main
-
+
+env:
+ GITHUB_OWNER: ${{ vars.GH_ORG }}
+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
+ GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
+ TF_WORKSPACE: happypathway
+ TFE_TOKEN: ${{ secrets.TFE_TOKEN }}
+
jobs:
- terraform:
+ setup-terraform:
+ outputs:
+ commit_sha: ${{ steps.checkout.outputs.commit }}
+
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v4
+ id: checkout
+
+ - name: Setup Terraform
+ uses: hashicorp/setup-terraform@v3.1.2
+ with:
+ terraform_version: ${{ vars.terraform_version }}
+ cli_config_credentials_token: ${{ secrets.TFE_TOKEN }}
+ cli_config_credentials_hostname: ${{ vars.terraform_api }}
+
+ - name: terraform init
+ run: terraform init -upgrade
+
+ - uses: actions/upload-artifact@master
+ name: Archive Configuration
+ if: github.ref == 'refs/heads/main'
+ with:
+ name: terraform_dir
+ path: .terraform
+ retention-days: 1
+ include-hidden-files: true
+
+ - uses: actions/upload-artifact@master
+ name: Archive Lockfile
+ if: github.ref == 'refs/heads/main'
+ with:
+ name: terraform_lockfile
+ path: .terraform.lock.hcl
+ retention-days: 1
+ include-hidden-files: true
+
+ terraform-validate:
+ needs: setup-terraform
uses: HappyPathway/centralized-actions/.github/workflows/terraform-test.yml@main
with:
- terraform_version: ${{vars.TERRAFORM_VERSION}}
- terraform_api: ${{vars.TERRAFORM_API}}
- github_username: ${{vars.GH_USERNAME}}
- github_email: ${{vars.GH_EMAIL}}
- github_org: ${{ vars.GH_ORG }}
+ terraform_version: ${{ vars.terraform_version }}
+ terraform_api: ${{ vars.terraform_api }}
+ github_username: ${{ github.actor }}
+ github_email: ${{ github.actor }}@roknsound.com
+ github_org: ${{ github.repository_owner }}
+ setup_terraform: true
+ terraform_init: false
+ cache: ${{ github.workspace }}
+ download_cache: true
+ commit_sha: ${{ needs.setup-terraform.outputs.commit_sha }}
secrets:
TFE_TOKEN: ${{ secrets.TFE_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
-
+ GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
+
gtag:
- if: ${{ github.event_name }} != "pull_request"
- needs: terraform
+ needs: terraform-validate
+ if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: HappyPathway/centralized-actions/.github/workflows/gtag.yml@main
with:
patch: true
@@ -30,4 +81,4 @@ jobs:
github_username: ${{ vars.GH_USERNAME }}
github_email: ${{ vars.GH_EMAIL }}
secrets:
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
\ No newline at end of file
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
From 607e6dcf22f561a30a83b7cae530c562cfaf225a Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Mon, 21 Oct 2024 11:14:55 -0700
Subject: [PATCH 17/21] Update versions.tf
---
versions.tf | 1 -
1 file changed, 1 deletion(-)
diff --git a/versions.tf b/versions.tf
index 9fecb91..73db9d5 100644
--- a/versions.tf
+++ b/versions.tf
@@ -2,7 +2,6 @@ terraform {
required_providers {
github = {
source = "integrations/github"
- version = ">= 6.2.2"
}
}
}
From 92d216ca3fba19819a8665da4c24f27c596732f6 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Tue, 29 Oct 2024 11:32:30 -0700
Subject: [PATCH 18/21] Update github_team_access.tf
---
github_team_access.tf | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/github_team_access.tf b/github_team_access.tf
index f825ff8..c530e6a 100644
--- a/github_team_access.tf
+++ b/github_team_access.tf
@@ -24,4 +24,7 @@ resource "github_team_repository" "admin" {
team_id
]
}
-}
\ No newline at end of file
+ depends_on = [
+ github_repository.repo
+ ]
+}
From 8a3f1e141377f563f8945dc1eee3d1e4346b68d1 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Tue, 29 Oct 2024 11:32:47 -0700
Subject: [PATCH 19/21] Update collaborators.tf
---
collaborators.tf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/collaborators.tf b/collaborators.tf
index d8680ac..5ffe416 100644
--- a/collaborators.tf
+++ b/collaborators.tf
@@ -4,4 +4,7 @@ resource "github_repository_collaborator" "collaborators" {
repository = github_repository.repo.name
username = each.key
permission = each.value
+ depends_on = [
+ github_repository.repo
+ ]
}
From 1f4aacf30d1a4bddb1c16687fc8407956998c692 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Tue, 5 Nov 2024 20:08:22 -0800
Subject: [PATCH 20/21] Update github_repo.tf (#11)
* Update github_repo.tf
* Update variables.tf
---
github_repo.tf | 3 ++-
variables.tf | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/github_repo.tf b/github_repo.tf
index b2bd8f0..c000836 100644
--- a/github_repo.tf
+++ b/github_repo.tf
@@ -17,9 +17,10 @@ resource "github_repository" "repo" {
has_issues = var.github_has_issues
has_wiki = var.github_has_wiki
topics = var.github_repo_topics
- gitignore_template = "Terraform"
+ gitignore_template = var.gitignore_template
is_template = var.is_template
archived = var.archived
+ homepage_url = var.homepage_url
vulnerability_alerts = var.vulnerability_alerts
lifecycle {
ignore_changes = [
diff --git a/variables.tf b/variables.tf
index ad7de82..86f8989 100644
--- a/variables.tf
+++ b/variables.tf
@@ -203,3 +203,11 @@ variable "vulnerability_alerts" {
type = bool
default = false
}
+
+variable gitignore_template {
+ default = null
+}
+
+variable homepage_url {
+ default = null
+}
From 24539365e330ab75229fa8721d491287e84a4093 Mon Sep 17 00:00:00 2001
From: David Arnold <10138997+djaboxx@users.noreply.github.com>
Date: Tue, 3 Dec 2024 17:03:49 -0800
Subject: [PATCH 21/21] Update variables.tf
---
variables.tf | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/variables.tf b/variables.tf
index 86f8989..4e066ca 100644
--- a/variables.tf
+++ b/variables.tf
@@ -211,3 +211,27 @@ variable gitignore_template {
variable homepage_url {
default = null
}
+
+variable security_and_analysis {
+ description = <