Resource: aws_lightsail_lb_certificate

Creates a Lightsail load balancer Certificate resource.

Example Usage

resource "aws_lightsail_lb" "test" {
  name              = "test-load-balancer"
  health_check_path = "/"
  instance_port     = "80"
  tags = {
    foo = "bar"
  }
}

resource "aws_lightsail_lb_certificate" "test" {
  name        = "test-load-balancer-certificate"
  lb_name     = aws_lightsail_lb.test.id
  domain_name = "test.com"
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import aws_lightsail_lb_certificate using the id attribute. For example:

import {
  to = aws_lightsail_lb_certificate.test
  id = "example-load-balancer,example-load-balancer-certificate"
}

Using terraform import, import aws_lightsail_lb_certificate using the id attribute. For example:

% terraform import aws_lightsail_lb_certificate.test example-load-balancer,example-load-balancer-certificate