From 020dc81394f21e505b65743761773f815c79b77c Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Thu, 8 Aug 2024 14:51:51 -0400 Subject: [PATCH] chore: update argocd-repo to use 6.0+ github provider (#1031) Co-authored-by: Dan Miller --- modules/argocd-repo/README.md | 4 ++-- modules/argocd-repo/main.tf | 8 +++++--- modules/argocd-repo/versions.tf | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/argocd-repo/README.md b/modules/argocd-repo/README.md index c5342a2de..2e5638192 100644 --- a/modules/argocd-repo/README.md +++ b/modules/argocd-repo/README.md @@ -83,7 +83,7 @@ $ terraform import -var "import_profile_name=eg-mgmt-gbl-corp-admin" -var-file=" |------|---------| | [terraform](#requirement\_terraform) | >= 1.0.0 | | [aws](#requirement\_aws) | >= 4.0 | -| [github](#requirement\_github) | >= 4.0 | +| [github](#requirement\_github) | >= 6.0 | | [random](#requirement\_random) | >= 2.3 | | [tls](#requirement\_tls) | >= 3.0 | @@ -92,7 +92,7 @@ $ terraform import -var "import_profile_name=eg-mgmt-gbl-corp-admin" -var-file=" | Name | Version | |------|---------| | [aws](#provider\_aws) | >= 4.0 | -| [github](#provider\_github) | >= 4.0 | +| [github](#provider\_github) | >= 6.0 | | [tls](#provider\_tls) | >= 3.0 | ## Modules diff --git a/modules/argocd-repo/main.tf b/modules/argocd-repo/main.tf index ede85f1bd..12f2facd3 100644 --- a/modules/argocd-repo/main.tf +++ b/modules/argocd-repo/main.tf @@ -85,9 +85,11 @@ resource "github_branch_protection" "default" { } } - push_restrictions = var.push_restrictions_enabled ? [ - join("", data.github_user.automation_user[*].node_id), - ] : [] + restrict_pushes { + push_allowances = var.push_restrictions_enabled ? [ + join("", data.github_user.automation_user[*].node_id), + ] : [] + } } data "github_team" "default" { diff --git a/modules/argocd-repo/versions.tf b/modules/argocd-repo/versions.tf index 2c76e7b55..5cc992f47 100644 --- a/modules/argocd-repo/versions.tf +++ b/modules/argocd-repo/versions.tf @@ -8,7 +8,7 @@ terraform { } github = { source = "integrations/github" - version = ">= 4.0" + version = ">= 6.0" } tls = { source = "hashicorp/tls"