tls_certificate (Data Source)

Get information about the TLS certificates securing a host.

Use this data source to get information, such as SHA1 fingerprint or serial number, about the TLS certificates that protects a URL.

Example Usage

URL Usage

resource "aws_eks_cluster" "example" {
  name = "example"
}

data "tls_certificate" "example" {
  url = aws_eks_cluster.example.identity[0].oidc[0].issuer
}

resource "aws_iam_openid_connect_provider" "example" {
  client_id_list  = ["sts.amazonaws.com"]
  thumbprint_list = [data.tls_certificate.example.certificates[0].sha1_fingerprint]
  url             = aws_eks_cluster.example.identity[0].oidc[0].issuer
}

Content Usage

data "tls_certificate" "example_content" {
  content = file("example.pem")
}

Schema

Optional

Read-Only

Nested Schema for certificates

Read-Only: