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

# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import Fn, Token, TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.aws.eks_cluster import EksCluster
from imports.aws.iam_openid_connect_provider import IamOpenidConnectProvider
from imports.tls.data_tls_certificate import DataTlsCertificate
class MyConvertedCode(TerraformStack):
    def __init__(self, scope, name, *, roleArn, vpcConfig):
        super().__init__(scope, name)
        example = EksCluster(self, "example",
            name="example",
            role_arn=role_arn,
            vpc_config=vpc_config
        )
        data_tls_certificate_example = DataTlsCertificate(self, "example_1",
            url=Token.as_string(
                Fn.lookup_nested(example.identity, ["0", "oidc", "0", "issuer"]))
        )
        # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.
        data_tls_certificate_example.override_logical_id("example")
        aws_iam_openid_connect_provider_example = IamOpenidConnectProvider(self, "example_2",
            client_id_list=["sts.amazonaws.com"],
            thumbprint_list=[
                Token.as_string(
                    Fn.lookup_nested(data_tls_certificate_example.certificates, ["0", "sha1_fingerprint"
                    ]))
            ],
            url=Token.as_string(
                Fn.lookup_nested(example.identity, ["0", "oidc", "0", "issuer"]))
        )
        # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.
        aws_iam_openid_connect_provider_example.override_logical_id("example")

Content Usage

# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import Fn, Token, TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.tls.data_tls_certificate import DataTlsCertificate
class MyConvertedCode(TerraformStack):
    def __init__(self, scope, name):
        super().__init__(scope, name)
        DataTlsCertificate(self, "example_content",
            content=Token.as_string(Fn.file("example.pem"))
        )

Schema

Optional

Read-Only

Nested Schema for certificates

Read-Only: