Skip to content

ArgoCD

This module deploys ArgoCD as either the hub or spoke controller. This will deploy the default ArgoCD Helm chart and all the necessary IAM roles and policies.

Examples

Hub

The hub is the controller that manages the spoke clusters. This is where the applications are defined and synced to the spoke clusters.

module "hub" {
  source = "./.."

  enable_hub = true

  cluster_name = "example-cluster"
}

Spoke

The spoke is the controller that manages the applications on the cluster. This is where the applications are deployed and synced from the hub.

module "spoke" {
  source = "./.."

  enable_spoke = true

  cluster_name = "example-cluster"

  cluster_secret_suffix = "sandbox"

  hub_iam_role_arn = "arn:aws:iam::123456789012:role/argocd-example-cluster-hub"
}

Requirements

Name Version
terraform >= 1.7
aws ~> 5.0
helm ~> 2.9

Providers

Name Version
aws ~> 5.0
helm ~> 2.9

Modules

No modules.

Resources

Name Type
aws_eks_access_entry.argocd_spoke resource
aws_eks_access_policy_association.argocd_spoke resource
aws_eks_pod_identity_association.argocd_application_controller resource
aws_eks_pod_identity_association.argocd_applicationset_controller resource
aws_eks_pod_identity_association.argocd_server resource
aws_iam_policy.argocd_controller resource
aws_iam_role.argocd_controller resource
aws_iam_role.argocd_spoke resource
aws_iam_role_policy_attachment.argocd_controller resource
helm_release.argocd resource
aws_eks_cluster.cluster data source
aws_iam_policy_document.argocd_controller data source
aws_iam_policy_document.argocd_controller_assume_role data source
aws_iam_policy_document.argocd_spoke data source

Inputs

Name Description Type Default Required
cluster_name Name of the EKS cluster string n/a yes
create Create the ArgoCD resources bool true no
enable_hub Enable ArgoCD Hub bool false no
enable_spoke Enable ArgoCD Spoke bool false no
helm_set Set values to pass to the Helm chart
list(object({
name = string
value = string
}))
[] no
helm_values Values to pass to the Helm chart list(string) [] no
helm_version Version of the Helm chart to install string "7.8.26" no
hub_iam_role_arn (Deprecated, use hub_iam_role_arns) IAM Role ARN for ArgoCD Hub. This is required for spoke clusters string null no
hub_iam_role_arns A list of ArgoCD Hub IAM Role ARNs, enabling hubs to access spoke clusters. This is required for spoke clusters. list(string) null no
hub_iam_role_name IAM Role Name for ArgoCD Hub. This is referenced by the Spoke clusters string "argocd-controller" no
namespace Namespace to deploy ArgoCD string "argocd" no
tags A map of tags to add to all resources map(string) {} no

Outputs

Name Description
cluster_name Name of the EKS cluster
hub_iam_role_arn IAM Role ARN for ArgoCD
spoke_iam_role_arn IAM Role ARN for ArgoCD Spoke