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
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!
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!
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
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String