79128210

Date: 2024-10-26 09:33:35
Score: 1
Natty:
Report link

While it's technically possible to use a single Terraform project with two modules (Infrastructure and App), this approach may not be ideal. A better approach is to use Terraform to set up the Kubernetes cluster, with the output of this module being a kubeconfig file. You could then use this kubeconfig file with tools that are better suited for application deployment, such as Helm charts, Kustomize, or Argo CD.

Using Terraform for application deployment leads to complexity in managing resource states. Terraform treats resources as immutable, but Kubernetes resources often require updates (for example rolling deployments), which can conflict with Terraform's model.

Furthermore, separating your code into two independent workflows will improve security and help you dissociate the application lifecycle from the infrastructure lifecycle, which should have different rhythms in their evolutions.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: startx