terraform-provider-argocd
terraform-provider-argocd copied to clipboard
Add support of templatePatch in ApplicationSet (on ArgoCD 2.10)
Description
A new parameter named templatePatch
allow to add more control on Application template in ApplicationSet. More information here
Potential Terraform Configuration
locals {
mytemplate = <<EOT
spec:
source:
helm:
valueFiles:
{{- range $valueFile := .valueFiles }}
- {{ $valueFile }}
{{- end }}
{{- if .autoSync }}
syncPolicy:
automated:
prune: {{ .prune }}
{{- end }}
EOT
project = "my-project"
}
resource "argocd_application_set" "test" {
metadata {
name = "my-applicationset"
namespace = "argocd"
}
spec {
generator {
clusters {
selector {
match_labels = {
"env" = "qa"
}
}
}
}
go_template = true
templatePatch = local.mytemplate
template {
metadata {
name = "test-{{ .name }}"
}
spec {
destination {
namespace = "my-ns"
server = "{{ .server }}"
}
project = local.project
source {
repo_url = "{{ .url }}"
path = "{{ .chart }}"
target_revision = "{{ .branch }}"
}
}
source {
repo_url = "{{ .url }}"
ref = "local"
target_revision = "{{ .branch }}"
path = ""
}
}
}
}
References
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Hey, I would like to work on this, I'll try to open a PR this weekend
Hi, @dtrouillet, @onematchfox, in order to use templatePatch from the go package we need to update to argocd go dep to 2.10 at least, is there some guide on how to upgrade dependency of the project? i've tried some thing but it is breaking the build, seems to be some transitive dependency
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
not stale
@dtrouillet is there a plan to upgrade the argocd dep to 2.10+ ?
@KyriosGN0 would you mind opening an issue for the dep update? Then we can discuss about the update there.
But from my point of view it's something we have to do soon as it's also sort of linked to #443