Data Source: aws_iam_server_certificate

Use this data source to lookup information about IAM Server Certificates.

Example Usage

data "aws_iam_server_certificate" "my-domain" {
  name_prefix = "my-domain.org"
  latest      = true
}

resource "aws_elb" "elb" {
  name = "my-domain-elb"

  listener {
    instance_port      = 8000
    instance_protocol  = "https"
    lb_port            = 443
    lb_protocol        = "https"
    ssl_certificate_id = data.aws_iam_server_certificate.my-domain.arn
  }
}

Argument Reference

Attribute Reference

This data source exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import an IAM server certificate using name. For example:

import {
  to = aws_iam_server_certificate.example
  id = "example"
}

Using terraform import, import an IAM server certificate using name. For example:

% terraform import aws_iam_server_certificate.example example

Import will read in the certificate body, certificate chain (if it exists), ID, name, path, and ARN. It will not retrieve the private key which is not available through the AWS API.