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

Terraform block #202

Closed
alionur07 opened this issue Aug 19, 2022 · 0 comments · Fixed by #268
Closed

Terraform block #202

alionur07 opened this issue Aug 19, 2022 · 0 comments · Fixed by #268

Comments

@alionur07
Copy link

alionur07 commented Aug 19, 2022

I would like to connect argocd cluster with terraform but i cannot use kubernetes block due to " server_addr " is required. I would like to use kubernetes block like below but i got " kubernetes block not expected here" error. Maybe i am using the kubernetes block the wrong way. Could you please help me about this?

provider "argocd" {
  context = "../../../../.kube/config"
  kubernetes {
    host                   = var.endpoint
    cluster_ca_certificate = var.kubeconfig-certificate-authority-data
    exec {
        api_version = "client.authentication.k8s.io/v1beta1"
        command     = "aws"
        args = [
            "eks",
            "get-token",
            "--cluster-name",
            var.cluster_name
            ]
        }
    }
  server_addr = "argocd.${data.local_file.argocd_server_addr.content}.cluster.local:443"  # env ARGOCD_SERVER input
  #auth_token  = "1234..."          # env ARGOCD_AUTH_TOKEN
  username  = "admin"            # env ARGOCD_AUTH_USERNAME
  password  = data.local_file.argocd_server_password.content             # env ARGOCD_AUTH_PASSWORD
  insecure  = true              # env ARGOCD_INSECURE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant