amazon-web-servicesterraformterraform-provider-aws

How to get the ARN (Amazon Resource Name) of SSL certificate without using ACM (AWS Certificate Manager)?


I'm using Terraform to create an Elastic Beanstalk environment in AWS Ningxia region, which is located in China.

One thing that confuses me is how to get the value of the SSLCertificateArns?

  setting {
    namespace = "aws:elbv2:listener:443"
    name      = "SSLCertificateArns"
    value     = "arn:aws:acm:cn-northwest-1:012345678912:certificate/????????-????-????-????-????????????"  # Where to get this value?
  }

AWS China currently doesn't provide Certificate Manager service.

I created the certificate by using Let's Encrypt, then uploading the certificate by clicking on a classic load balancer's SSL Certificate column:

enter image description here


Solution

  • When you upload the certificate from ELB configuration, it saves at IAM certificates list instead of ACM. You should be able to see the certificate using below command:

    aws iam list-server-certificates

    https://docs.aws.amazon.com/cli/latest/reference/iam/list-server-certificates.html