A Terraform module for provisioning and configuring ArgoCD projects. This module can be used with or without the Project-Octal terraform-kubernetes-argocd module. The only hard requirement is a Kubernetes cluster with a functioning ArgoCD deployment.
Note: This repository has been renamed from terraform-argocd-project
to terraform-kubernetes-argocd-project
to better follow the Terraform module naming convention.
# The namespace the project will reside in
resource "kubernetes_namespace" "kergiva_namespace" {
metadata {
name = local.instance_name
}
}
# Create the ArgoCD Project.
module "project" {
source = "project-octal/argocd-project/kubernetes"
version = "1.0.4"
argocd_namespace = data.terraform_remote_state.infra.outputs.cluster_argocd_namespace
name = local.instance_name
description = local.project_description
destinations = [
{
server = "https://kubernetes.default.svc"
namespace = kubernetes_namespace.kergiva_namespace.metadata.0.name
}
]
permissions = [
{
name = "developer-read-only"
description = "A read-only role for the developers of Kergiva"
policies = [
{
resource = "applications"
action = "get"
object = "*"
}
]
oidc_groups = [
"argocd-kergiva-developers"
]
}
]
}
Name | Version |
---|---|
terraform | >= 0.14.8, < 2.0.0 |
Name | Version |
---|---|
kubernetes | 2.6.1 |
No modules.
Name | Type |
---|---|
kubernetes_manifest.argo_project | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cascade_delete | Set to true if this application should cascade delete | bool |
false |
no |
cluster_resource_whitelist | A list of cluster-scoped resources the project is allowed to access | list(object({ kind : string, group : string })) |
[] |
no |
description | A description for this ArgoCD project | string |
n/a | yes |
destinations | A list of server and namespaces that this project may deploy to. | list(object({ server : string, namespace : string })) |
[ |
no |
name | The name for this ArgoCD project | string |
n/a | yes |
namespace | The name of the target ArgoCD Namespace | string |
n/a | yes |
namespace_resource_blacklist | A list of namespace-scoped resources the project is NOT allowed to access | list(object({ kind : string, group : string })) |
[] |
no |
namespace_resource_whitelist | A list of namespace-scoped resources the project is allowed to access | list(object({ kind : string, group : string })) |
[] |
no |
permissions | A list of roles and their policies to define within ArgoCD | list(object({ |
[] |
no |
source_repos | A list of repositories this project may pull from | list(string) |
[ |
no |
Name | Description |
---|---|
name | n/a |