From 9755920267bc59b3c66739a317d9e1fe081f5519 Mon Sep 17 00:00:00 2001 From: Bob Callaway Date: Fri, 16 Feb 2024 16:40:12 -0500 Subject: [PATCH] use SA in lieu of a mapped user - argocd Signed-off-by: Bob Callaway --- terraform/gcp/modules/argocd/argocd.tf | 33 +++++++++++++++++------ terraform/gcp/modules/argocd/variables.tf | 9 +++++-- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/terraform/gcp/modules/argocd/argocd.tf b/terraform/gcp/modules/argocd/argocd.tf index 1192442fc..8196ba874 100644 --- a/terraform/gcp/modules/argocd/argocd.tf +++ b/terraform/gcp/modules/argocd/argocd.tf @@ -102,7 +102,8 @@ resource "helm_release" "argocd" { depends_on = [ kubectl_manifest.externalsecret_argocd_ssh, - kubectl_manifest.externalsecret_argocd_slack + kubectl_manifest.externalsecret_argocd_slack, + kubectl_manifest.externalsecret_argocd_oauth_client_credentials ] } @@ -123,29 +124,35 @@ resource "helm_release" "argocd_apps" { ] } +# this needs to be manually granted access via admin console +# - Client ID needs to be enabled for domain-wide delegation +# - SA needs to be granted "Groups Reader" role resource "google_service_account" "argocd-directory-api-sa" { account_id = "argocd-directory-api-sa" display_name = "ArgoCD Directory API Service Account" project = var.project_id } -resource "kubectl_manifest" "externalsecret_argocd_directory_api_credentials" { +resource "kubectl_manifest" "externalsecret_argocd_oauth_client_credentials" { yaml_body = <