argoproj-labs / terraform-provider-argocd

Terraform provider for Argo CD
Mozilla Public License 2.0
402 stars 88 forks source link

Support Kustomize patches #356

Open dorsegal opened 10 months ago

dorsegal commented 10 months ago

Argocd allow to define patches in application CRD https://argo-cd.readthedocs.io/en/stable/user-guide/kustomize/#patches

According to latest version I don't see patches as one of the attributes https://registry.terraform.io/providers/oboukili/argocd/latest/docs/resources/application#nestedblock--spec--source--kustomize

It will be much helpful to implement this.

chidambaram27 commented 9 months ago

planned to have the patches attribute like the mentioned example

kustomize {
  patches {
      target {
          kind = "Deployment"
          name = "the-deployment"
      }
      patch = <<-EOT
            - op: replace
          path: /spec/template/spec/containers/0/name
          value: the-container-1
      EOT
       }
 }

This block can be repeated in case multiple patches needed