terraform-provider-argocd
terraform-provider-argocd copied to clipboard
add support for finalizers in metadata.
Description
we recently had a use case of migration from one appset to another and needed an ability to set a finalizer on the appset
Potential Terraform Configuration
resource "argocd_application_set" "services-test" {
metadata {
name = "appsetname"
finalizers = [
- final
]
}
spec {
generator {
git {
repo_url = "server"
revision = "master"
file {
path = "clusters/*/*/*/values.yaml"
}
}
}
template {
metadata {
name = "{{path[3]}}-{{path[2]}}"
labels = {
env = "{{path[1]}}"
}
}
spec {
project = "default"
revision_history_limit = 3
source {
repo_url = "server"
target_revision = "master"
path = "charts/"
helm {
release_name = "{{path[3]}}"
value_files = ["values.yaml", "../../clusters/{{path[1]}}/{{path[2]}}/{{path[3]}}/values.yaml"]
parameter {
name = "clusterName"
value = "{{path[2]}}"
}
}
}
destination {
name = "{{path[2]}}"
namespace = "{{path[3]}}"
}
sync_policy {
sync_options = [
"ServerSideApply=true",
"CreateNamespace=true"
]
}
}
}
}
}
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