1Password / connect

Access your 1Password secrets using a 1Password Connect Server
https://developer.1password.com/docs/connect
149 stars 28 forks source link

Terraform Configuration Not Connecting #47

Open ntotten opened 1 year ago

ntotten commented 1 year ago

I have a relatively straightforward configuration of 1password connect setup in terraform. The server seems to boot without any errors but I do not show any connections in the 1password dashboard.

resource "kubernetes_namespace" "op_connect" {
  provider = kubernetes.default-cluster
  metadata {
    name = "op-connect"
  }

  lifecycle {
    ignore_changes = [
      metadata[0].labels,
    ]
  }
}

resource "helm_release" "op_connect" {
  provider   = helm.default-cluster
  name       = "op-connect"
  namespace  = kubernetes_namespace.op_connect.metadata[0].name
  repository = "https://1password.github.io/connect-helm-charts/"
  chart      = "connect"
  version    = "1.8.1"
  set_sensitive {
    name  = "connect.credentials_base64"
    type  = "string"
    value = var.connect_credentials
  }

  set_sensitive {
    name  = "operator.token.value"
    type  = "string"
    value = var.operator_token
  }

  # Deploy the Kubernetes Operator alongside the Connect Server
  set {
    name  = "operator.create"
    value = true
  }
}

The variables are injected using Terraform cloud. The value of credentials_base64 was encoded using the script on the ESC Fargate doc:

cat 1password-credentials.json | base64 | tr '/+' '_-' | tr -d '=' | tr -d '\n'

The logs don't seem to have any errors.

image

Any ideas on what could be wrong would be appreciated.