How can I integrate Terraform resources with ArgoCD for K8s deployment?

0
0
Asked By TechieBreeze42 On

We're setting up a Kubernetes infrastructure and using tools like Karpenter, Traefik, and Velero, managed via Terraform. Currently, these tools are installed through a Helm resource where we also set up roles and policies with Terraform. However, we want to transition to using ArgoCD to automatically detect changes and release new versions. The challenge lies in the ArgoCD application manifests that require dynamic references to Terraform outputs like roles and policies. What are the best methods to integrate Terraform resources into ArgoCD files for smooth deployment?

3 Answers

Answered By HelmEnthusiast On

You could set up a job to make Terraform output its generated values and commit them directly to the Git repository that ArgoCD monitors. That way, ArgoCD can always be in sync with the latest Terraform outputs!

Answered By FluxMaster On

Have you thought about using Flux? It allows you to do the dynamic substitution easily with config maps and secrets through the `substitutefrom` parameter in the Flux kustomization resource. This might be worth looking into!

Answered By CrossplaneFan123 On

If you're a fan of Crossplane, you might want to check out the Terraform provider it offers. This allows you to mix it with your existing configurations, keeping everything managed by ArgoCD. Just be cautious about controlling who can set configurations since automatic syncing can complicate things. It’s an interesting path, though definitely not the simplest one!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.