Skip to content

Commit 151998f

Browse files
RoseSecurityaknysh
andauthored
feat: support for multiple Argo CD service types (cloudposse/terraform-aws-components#1020)
Co-authored-by: Andriy Knysh <[email protected]>
1 parent 5383b6c commit 151998f

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

src/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ Reference: https://stackoverflow.com/questions/75046330/argo-cd-error-server-sec
580580
| <a name="input_saml_enabled"></a> [saml\_enabled](#input\_saml\_enabled) | Toggles SAML integration in the deployed chart | `bool` | `false` | no |
581581
| <a name="input_saml_rbac_scopes"></a> [saml\_rbac\_scopes](#input\_saml\_rbac\_scopes) | SAML RBAC scopes to request | `string` | `"[email,groups]"` | no |
582582
| <a name="input_saml_sso_providers"></a> [saml\_sso\_providers](#input\_saml\_sso\_providers) | SAML SSO providers components | <pre>map(object({<br> component = string<br> environment = optional(string, null)<br> }))</pre> | `{}` | no |
583+
| <a name="input_service_type"></a> [service\_type](#input\_service\_type) | Service type for exposing the ArgoCD service. The available type values and their behaviors are:<br> ClusterIP: Exposes the Service on a cluster-internal IP. Choosing this value makes the Service only reachable from within the cluster.<br> NodePort: Exposes the Service on each Node's IP at a static port (the NodePort).<br> LoadBalancer: Exposes the Service externally using a cloud provider's load balancer. | `string` | `"NodePort"` | no |
583584
| <a name="input_slack_notifications"></a> [slack\_notifications](#input\_slack\_notifications) | ArgoCD Slack notification configuration. Requires Slack Bot created with token stored at the given SSM Parameter path.<br><br>See: https://argocd-notifications.readthedocs.io/en/stable/services/slack/ | <pre>object({<br> token_ssm_path = optional(string, "/argocd/notifications/notifiers/slack/token")<br> api_url = optional(string, null)<br> username = optional(string, "ArgoCD")<br> icon = optional(string, null)<br> })</pre> | `{}` | no |
584585
| <a name="input_slack_notifications_enabled"></a> [slack\_notifications\_enabled](#input\_slack\_notifications\_enabled) | Whether or not to enable Slack notifications. See `var.slack_notifications.` | `bool` | `false` | no |
585586
| <a name="input_ssm_github_api_key"></a> [ssm\_github\_api\_key](#input\_ssm\_github\_api\_key) | SSM path to the GitHub API key | `string` | `"/argocd/github/api_key"` | no |

src/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ module "argocd" {
162162
oidc_rbac_scopes = var.oidc_rbac_scopes
163163
saml_enabled = local.saml_enabled
164164
saml_rbac_scopes = var.saml_rbac_scopes
165+
service_type = var.service_type
165166
rbac_default_policy = var.argocd_rbac_default_policy
166167
rbac_policies = var.argocd_rbac_policies
167168
rbac_groups = var.argocd_rbac_groups

src/resources/argocd-values.yaml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ server:
6666
https: false
6767

6868
service:
69-
type: NodePort
69+
type: ${service_type}
7070

7171
secret:
7272
create: true

src/variables-argocd.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,17 @@ variable "saml_rbac_scopes" {
143143
default = "[email,groups]"
144144
}
145145

146+
variable "service_type" {
147+
type = string
148+
default = "NodePort"
149+
description = <<-EOT
150+
Service type for exposing the ArgoCD service. The available type values and their behaviors are:
151+
ClusterIP: Exposes the Service on a cluster-internal IP. Choosing this value makes the Service only reachable from within the cluster.
152+
NodePort: Exposes the Service on each Node's IP at a static port (the NodePort).
153+
LoadBalancer: Exposes the Service externally using a cloud provider's load balancer.
154+
EOT
155+
}
156+
146157
variable "argocd_rbac_policies" {
147158
type = list(string)
148159
default = []

0 commit comments

Comments
 (0)