Skip to content

argocd_cluster.config.tls_client_config.ca_cert is never in sync on terraform apply #756

@flaviomoringa

Description

@flaviomoringa

Hi, my argocd terraform is always out of sync regarding the ca_cert of the cluster, seems that is changed on every terraform apply, which it isn't. Am I missing something in my config?

Thanks

Terraform Version, ArgoCD Provider Version and ArgoCD Version

Terraform version: v1.3.2
ArgoCD provider version: v7.11.2
ArgoCD version: v3.1.8+becb020

Affected Resource(s)

  • argocd_cluster

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use an online file storage service and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public release key.
provider "argocd" {
  server_addr = "argocd.euc1.cicd.mywebsite.com:443"
  auth_token  = var.argocd_auth_token
  insecure    = false
  grpc_web    = true
}

resource "argocd_cluster" "this" {
  server = module.eks.cluster_endpoint
  name   = format("dh-io-%s-%s-%s-%s", var.tenant_name, var.cluster_name, local.dns_region, var.environment)

  config {
    bearer_token = data.kubernetes_secret_v1.argocd_manager.data.token
    tls_client_config {
      ca_data = base64decode(module.eks.cluster_certificate_authority_data)
    }
  }
}

Debug Output

Panic Output

Steps to Reproduce

Expected Behavior

No changes found

Actual Behavior

# argocd_cluster.this will be updated in-place
  ~ resource "argocd_cluster" "this" {
        id         = "https://xxxxxxxxxxxxxxxxxx.gr7.eu-central-1.eks.amazonaws.com/hosting-cluster1-euc1-nprd"
        name       = "hosting-cluster1-euc1-nprd"
        # (4 unchanged attributes hidden)

      ~ config {
            # (3 unchanged attributes hidden)

          ~ tls_client_config {
              + ca_data  = <<-EOT
                    -----BEGIN CERTIFICATE-----
                    XXXXXXXXXXXXXXXXXXXXX
                    -----END CERTIFICATE-----
                EOT
                # (1 unchanged attribute hidden)
            }
        }
    }

Important Factoids

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions