Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can argocd_application labels be modified? #398

Open
ionPr opened this issue Jun 6, 2024 · 5 comments
Open

Can argocd_application labels be modified? #398

ionPr opened this issue Jun 6, 2024 · 5 comments
Labels
on-hold Issues or Pull Requests with this label will never be considered stale question Further information is requested

Comments

@ionPr
Copy link

ionPr commented Jun 6, 2024

Question

Hello,

I have deployed a set of argocd_applications and have already set some metadata.labels on them. I am currently trying to use the same code to update the labels but the changes are not picked up. If I delete the existing application and deploy it again the correct new labels are applied.
My question is, is this the expected behavior? I was not able to find any error or significant message in any of the ArgoCD pods.

Thank you!

Terraform Version, ArgoCD Provider Version and ArgoCD Version

Terraform version: v1.7.3. v1.8.5
ArgoCD provider version: 6.0.3, 6.1.1
ArgoCD version: 2.9.5. 2.11.0
@ionPr ionPr added the question Further information is requested label Jun 6, 2024
@ionPr
Copy link
Author

ionPr commented Jun 6, 2024

Forgot to mention that the labels are simple strings that do not contain any special characters.

Copy link

github-actions bot commented Oct 2, 2024

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.

@github-actions github-actions bot added the Stale label Oct 2, 2024
@mkilchhofer
Copy link
Collaborator

Hi @ionPr

Could you share an example TF code of your application definition?

@github-actions github-actions bot removed the Stale label Oct 14, 2024
Copy link

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.

@github-actions github-actions bot added the Stale label Dec 13, 2024
@the-technat the-technat added on-hold Issues or Pull Requests with this label will never be considered stale and removed Stale labels Dec 14, 2024
@mkilchhofer mkilchhofer added Stale on-hold Issues or Pull Requests with this label will never be considered stale and removed on-hold Issues or Pull Requests with this label will never be considered stale Stale labels Dec 14, 2024
@lush
Copy link

lush commented Jan 8, 2025

Hi @ionPr

Could you share an example TF code of your application definition?

Hi @mkilchhofer, for example the following helm application uses two labels test and foo

# Helm application
resource "argocd_application" "helm" {
  metadata {
    name      = "helm-app"
    namespace = "argocd"
    labels = {
      test = "4real"
      foo = "bar"
    }
  }

  spec {
    [..]
  }
}

The Labels are created correctly initially. But if I want the deploy/update the helm application and change or remove labels like this...

# Helm application
resource "argocd_application" "helm" {
[..]
    labels = {
      test = "ofcoursenot"
    }

...the label test is not touched/changed and the label foo is still there and will not removed.

I hope that helps for understanding. Thanks in advance for looking into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold Issues or Pull Requests with this label will never be considered stale question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants