locals {
  config = {
    "clientId" : var.duo_client_id
    "clientSecret" : var.duo_client_secret
    "apiHost" : var.duo_api_host
    "redirectUri" : var.redirect_uri
    "accessToken" : var.access_token
    "socketPath" : "/app/socket"
    "tlsCert" : var.tls_enabled ? "/etc/ssl/certs/private/tls.crt" : ""
    "tlsKey" : var.tls_enabled ? "/etc/ssl/certs/private/tls.key" : ""
  }
  config_json     = jsonencode(local.config)
  config_checksum = sha256(local.config_json)
}
