Skip to content

Commit 6d8ae17

Browse files
committed
revert changes
1 parent 517dec3 commit 6d8ae17

File tree

3 files changed

+31
-32
lines changed

3 files changed

+31
-32
lines changed

src/provider-github.tf

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,38 @@ variable "github_token_override" {
1717
default = null
1818
}
1919

20+
# GitHub App Authentication Variables
21+
variable "github_app_enabled" {
22+
type = bool
23+
description = "Whether to use GitHub App authentication instead of PAT"
24+
default = false
25+
}
26+
27+
variable "github_app_id" {
28+
type = string
29+
description = "The ID of the GitHub App to use for authentication"
30+
default = null
31+
}
32+
33+
variable "github_app_installation_id" {
34+
type = string
35+
description = "The Installation ID of the GitHub App to use for authentication"
36+
default = null
37+
}
38+
39+
variable "ssm_github_app_private_key" {
40+
type = string
41+
description = "SSM path to the GitHub App private key"
42+
default = "/argocd/github/app_private_key"
43+
}
44+
2045
locals {
21-
github_token = local.create_github_webhook ? (
22-
var.github_app_enabled ? null : coalesce(var.github_token_override, try(data.aws_ssm_parameter.github_api_key[0].value, null))
23-
) : ""
46+
github_token = var.github_app_enabled ? null : coalesce(var.github_token_override, try(data.aws_ssm_parameter.github_api_key[0].value, null))
2447
}
2548

2649
# SSM Parameter for PAT Authentication
2750
data "aws_ssm_parameter" "github_api_key" {
28-
count = local.create_github_webhook && !var.github_app_enabled ? 1 : 0
51+
count = !var.github_app_enabled ? 1 : 0
2952
name = var.ssm_github_api_key
3053
with_decryption = true
3154
}
@@ -39,9 +62,9 @@ data "aws_ssm_parameter" "github_app_private_key" {
3962

4063
# We will only need the github provider if we are creating the GitHub webhook with github_repository_webhook.
4164
provider "github" {
42-
base_url = local.create_github_webhook ? var.github_base_url : null
43-
owner = local.create_github_webhook ? var.github_organization : null
44-
token = local.create_github_webhook ? local.github_token : null
65+
base_url = var.github_base_url
66+
owner = var.github_organization
67+
token = local.github_token
4568

4669
dynamic "app_auth" {
4770
for_each = local.create_github_webhook && var.github_app_enabled ? [1] : []

src/resources/argocd-values.yaml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ server:
2828

2929
ingress:
3030
enabled: true
31-
ingressClassName: alb-argocd-ext
31+
ingressClassName: alb
3232
annotations:
3333
cert-manager.io/cluster-issuer: ${cert_issuer}
3434
external-dns.alpha.kubernetes.io/hostname: ${ingress_host}

src/variables-argocd.tf

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -225,27 +225,3 @@ variable "github_deploy_keys_enabled" {
225225
Alternatively, you can use a GitHub App to access this desired state repository configured with `var.github_app_enabled`, `var.github_app_id`, and `var.github_app_installation_id`.
226226
EOT
227227
}
228-
229-
variable "github_app_enabled" {
230-
type = bool
231-
description = "Whether to use GitHub App authentication for Argo CD repositories both for webhooks and syncing (depending on `var.github_deploy_keys_enabled`)"
232-
default = false
233-
}
234-
235-
variable "github_app_id" {
236-
type = string
237-
description = "The ID of the GitHub App to use for Argo CD repository authentication"
238-
default = null
239-
}
240-
241-
variable "github_app_installation_id" {
242-
type = string
243-
description = "The Installation ID of the GitHub App to use for Argo CD repository authentication"
244-
default = null
245-
}
246-
247-
variable "ssm_github_app_private_key" {
248-
type = string
249-
description = "SSM path to the GitHub App private key for Argo CD repository authentication"
250-
default = "/argocd/github/app_private_key"
251-
}

0 commit comments

Comments
 (0)