Skip to content

Commit

Permalink
adding environments
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Oct 25, 2024
1 parent 663360a commit a2fe8aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion repolist.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ module "repo_list" {

module "workspace" {
source = "HappyPathway/workspace/github"
for_each = tomap({ for repo in var.repolist : repo.name => repo })
for_each = tomap({ for repo in var.repolist : repo.name => repo if repo.workspace })
runner_group = "229685449397"
repo_name = each.value.name
repo_org = each.value.repo_org
reviewers = 1
reviewers_users = keys(local.collaborators)
protected_branches = true
custom_branch_policies = true
environment = "default"
Expand Down
1 change: 1 addition & 0 deletions varfiles/default.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ repolist = [
repo_topics = [
"terraform-tools"
]
workspace = true
},
{
description = "Managing AWS Github Runner Image"
Expand Down
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ variable "repolist" {
enforce_prs = optional(bool, false)
repo_topics = optional(list(string), ["terraform-workspace"])
is_private = optional(bool, false)
workspace = optional(bool, false)
}))
default = []
}
4 changes: 0 additions & 4 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
terraform {
required_providers {
random = {
source = "integrations/github"
version = ">= 6.3.0"
}
aws = {
source = "hashicorp/aws"
version = ">= 2.0.0"
Expand Down

0 comments on commit a2fe8aa

Please sign in to comment.