From b0a878976765cfa16cb818d9358ae0e4e4d5fa3c Mon Sep 17 00:00:00 2001 From: Antonis Stamatiou Date: Wed, 29 Jan 2025 14:57:15 +0200 Subject: [PATCH] fix: Final fix for Github (#812) --- aws/eks-customer/github.tf | 5 -- aws/eks-customer/providers.tf | 4 -- aws/eks-customer/remove-utility.tf | 8 ++- aws/eks-customer/scripts/deploy-utility.sh | 4 +- aws/eks-customer/scripts/remove-utility.sh | 2 + aws/eks-customer/scripts/utils.sh | 62 +++++++++++++++++----- aws/eks-customer/utility.tf | 3 +- 7 files changed, 62 insertions(+), 26 deletions(-) delete mode 100644 aws/eks-customer/github.tf diff --git a/aws/eks-customer/github.tf b/aws/eks-customer/github.tf deleted file mode 100644 index 2e2252ef..00000000 --- a/aws/eks-customer/github.tf +++ /dev/null @@ -1,5 +0,0 @@ -data "github_app_token" "this" { - app_id = var.github_app_id - installation_id = var.github_app_installation_id - pem_file = file(var.github_app_pem_key_path) -} diff --git a/aws/eks-customer/providers.tf b/aws/eks-customer/providers.tf index b4cd4493..b648227b 100644 --- a/aws/eks-customer/providers.tf +++ b/aws/eks-customer/providers.tf @@ -21,9 +21,5 @@ terraform { source = "hashicorp/random" version = ">= 3.6.2" } - github = { - source = "integrations/github" - version = "~> 6.0" - } } } diff --git a/aws/eks-customer/remove-utility.tf b/aws/eks-customer/remove-utility.tf index 7969c915..ac8f6113 100644 --- a/aws/eks-customer/remove-utility.tf +++ b/aws/eks-customer/remove-utility.tf @@ -5,11 +5,13 @@ resource "null_resource" "remove-utilities" { gitops_repo_url = var.gitops_repo_url gitops_repo_username = var.gitops_repo_username gitops_repo_email = var.gitops_repo_email - github_token = data.github_app_token.this.token github_app_installation_id = var.github_app_installation_id + github_app_id = var.github_app_id + github_app_pem_file = var.github_app_pem_key_path environment = var.environment cluster_name = module.eks.cluster_name } + provisioner "local-exec" { when = destroy command = <