1. Packages
  2. AWS Classic
  3. API Docs
  4. lightsail
  5. LbCertificate

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.lightsail.LbCertificate

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    Creates a Lightsail load balancer Certificate resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.Lb("test", {
        name: "test-load-balancer",
        healthCheckPath: "/",
        instancePort: 80,
        tags: {
            foo: "bar",
        },
    });
    const testLbCertificate = new aws.lightsail.LbCertificate("test", {
        name: "test-load-balancer-certificate",
        lbName: test.id,
        domainName: "test.com",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.Lb("test",
        name="test-load-balancer",
        health_check_path="/",
        instance_port=80,
        tags={
            "foo": "bar",
        })
    test_lb_certificate = aws.lightsail.LbCertificate("test",
        name="test-load-balancer-certificate",
        lb_name=test.id,
        domain_name="test.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := lightsail.NewLb(ctx, "test", &lightsail.LbArgs{
    			Name:            pulumi.String("test-load-balancer"),
    			HealthCheckPath: pulumi.String("/"),
    			InstancePort:    pulumi.Int(80),
    			Tags: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lightsail.NewLbCertificate(ctx, "test", &lightsail.LbCertificateArgs{
    			Name:       pulumi.String("test-load-balancer-certificate"),
    			LbName:     test.ID(),
    			DomainName: pulumi.String("test.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.LightSail.Lb("test", new()
        {
            Name = "test-load-balancer",
            HealthCheckPath = "/",
            InstancePort = 80,
            Tags = 
            {
                { "foo", "bar" },
            },
        });
    
        var testLbCertificate = new Aws.LightSail.LbCertificate("test", new()
        {
            Name = "test-load-balancer-certificate",
            LbName = test.Id,
            DomainName = "test.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Lb;
    import com.pulumi.aws.lightsail.LbArgs;
    import com.pulumi.aws.lightsail.LbCertificate;
    import com.pulumi.aws.lightsail.LbCertificateArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new Lb("test", LbArgs.builder()        
                .name("test-load-balancer")
                .healthCheckPath("/")
                .instancePort("80")
                .tags(Map.of("foo", "bar"))
                .build());
    
            var testLbCertificate = new LbCertificate("testLbCertificate", LbCertificateArgs.builder()        
                .name("test-load-balancer-certificate")
                .lbName(test.id())
                .domainName("test.com")
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lightsail:Lb
        properties:
          name: test-load-balancer
          healthCheckPath: /
          instancePort: '80'
          tags:
            foo: bar
      testLbCertificate:
        type: aws:lightsail:LbCertificate
        name: test
        properties:
          name: test-load-balancer-certificate
          lbName: ${test.id}
          domainName: test.com
    

    Create LbCertificate Resource

    new LbCertificate(name: string, args: LbCertificateArgs, opts?: CustomResourceOptions);
    @overload
    def LbCertificate(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      domain_name: Optional[str] = None,
                      lb_name: Optional[str] = None,
                      name: Optional[str] = None,
                      subject_alternative_names: Optional[Sequence[str]] = None)
    @overload
    def LbCertificate(resource_name: str,
                      args: LbCertificateArgs,
                      opts: Optional[ResourceOptions] = None)
    func NewLbCertificate(ctx *Context, name string, args LbCertificateArgs, opts ...ResourceOption) (*LbCertificate, error)
    public LbCertificate(string name, LbCertificateArgs args, CustomResourceOptions? opts = null)
    public LbCertificate(String name, LbCertificateArgs args)
    public LbCertificate(String name, LbCertificateArgs args, CustomResourceOptions options)
    
    type: aws:lightsail:LbCertificate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args LbCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args LbCertificateArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args LbCertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LbCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LbCertificateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    LbCertificate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The LbCertificate resource accepts the following input properties:

    LbName string
    The load balancer name where you want to create the SSL/TLS certificate.
    DomainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    Name string
    The SSL/TLS certificate name.
    SubjectAlternativeNames List<string>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    LbName string
    The load balancer name where you want to create the SSL/TLS certificate.
    DomainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    Name string
    The SSL/TLS certificate name.
    SubjectAlternativeNames []string
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    lbName String
    The load balancer name where you want to create the SSL/TLS certificate.
    domainName String
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    name String
    The SSL/TLS certificate name.
    subjectAlternativeNames List<String>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    lbName string
    The load balancer name where you want to create the SSL/TLS certificate.
    domainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    name string
    The SSL/TLS certificate name.
    subjectAlternativeNames string[]
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    lb_name str
    The load balancer name where you want to create the SSL/TLS certificate.
    domain_name str
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    name str
    The SSL/TLS certificate name.
    subject_alternative_names Sequence[str]
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    lbName String
    The load balancer name where you want to create the SSL/TLS certificate.
    domainName String
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    name String
    The SSL/TLS certificate name.
    subjectAlternativeNames List<String>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LbCertificate resource produces the following output properties:

    Arn string
    The ARN of the lightsail certificate.
    CreatedAt string
    The timestamp when the instance was created.
    DomainValidationRecords List<Pulumi.Aws.LightSail.Outputs.LbCertificateDomainValidationRecord>
    Id string
    The provider-assigned unique ID for this managed resource.
    SupportCode string
    Arn string
    The ARN of the lightsail certificate.
    CreatedAt string
    The timestamp when the instance was created.
    DomainValidationRecords []LbCertificateDomainValidationRecord
    Id string
    The provider-assigned unique ID for this managed resource.
    SupportCode string
    arn String
    The ARN of the lightsail certificate.
    createdAt String
    The timestamp when the instance was created.
    domainValidationRecords List<LbCertificateDomainValidationRecord>
    id String
    The provider-assigned unique ID for this managed resource.
    supportCode String
    arn string
    The ARN of the lightsail certificate.
    createdAt string
    The timestamp when the instance was created.
    domainValidationRecords LbCertificateDomainValidationRecord[]
    id string
    The provider-assigned unique ID for this managed resource.
    supportCode string
    arn str
    The ARN of the lightsail certificate.
    created_at str
    The timestamp when the instance was created.
    domain_validation_records Sequence[LbCertificateDomainValidationRecord]
    id str
    The provider-assigned unique ID for this managed resource.
    support_code str
    arn String
    The ARN of the lightsail certificate.
    createdAt String
    The timestamp when the instance was created.
    domainValidationRecords List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    supportCode String

    Look up Existing LbCertificate Resource

    Get an existing LbCertificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LbCertificateState, opts?: CustomResourceOptions): LbCertificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            created_at: Optional[str] = None,
            domain_name: Optional[str] = None,
            domain_validation_records: Optional[Sequence[LbCertificateDomainValidationRecordArgs]] = None,
            lb_name: Optional[str] = None,
            name: Optional[str] = None,
            subject_alternative_names: Optional[Sequence[str]] = None,
            support_code: Optional[str] = None) -> LbCertificate
    func GetLbCertificate(ctx *Context, name string, id IDInput, state *LbCertificateState, opts ...ResourceOption) (*LbCertificate, error)
    public static LbCertificate Get(string name, Input<string> id, LbCertificateState? state, CustomResourceOptions? opts = null)
    public static LbCertificate get(String name, Output<String> id, LbCertificateState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The ARN of the lightsail certificate.
    CreatedAt string
    The timestamp when the instance was created.
    DomainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    DomainValidationRecords List<Pulumi.Aws.LightSail.Inputs.LbCertificateDomainValidationRecord>
    LbName string
    The load balancer name where you want to create the SSL/TLS certificate.
    Name string
    The SSL/TLS certificate name.
    SubjectAlternativeNames List<string>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    SupportCode string
    Arn string
    The ARN of the lightsail certificate.
    CreatedAt string
    The timestamp when the instance was created.
    DomainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    DomainValidationRecords []LbCertificateDomainValidationRecordArgs
    LbName string
    The load balancer name where you want to create the SSL/TLS certificate.
    Name string
    The SSL/TLS certificate name.
    SubjectAlternativeNames []string
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    SupportCode string
    arn String
    The ARN of the lightsail certificate.
    createdAt String
    The timestamp when the instance was created.
    domainName String
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    domainValidationRecords List<LbCertificateDomainValidationRecord>
    lbName String
    The load balancer name where you want to create the SSL/TLS certificate.
    name String
    The SSL/TLS certificate name.
    subjectAlternativeNames List<String>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    supportCode String
    arn string
    The ARN of the lightsail certificate.
    createdAt string
    The timestamp when the instance was created.
    domainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    domainValidationRecords LbCertificateDomainValidationRecord[]
    lbName string
    The load balancer name where you want to create the SSL/TLS certificate.
    name string
    The SSL/TLS certificate name.
    subjectAlternativeNames string[]
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    supportCode string
    arn str
    The ARN of the lightsail certificate.
    created_at str
    The timestamp when the instance was created.
    domain_name str
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    domain_validation_records Sequence[LbCertificateDomainValidationRecordArgs]
    lb_name str
    The load balancer name where you want to create the SSL/TLS certificate.
    name str
    The SSL/TLS certificate name.
    subject_alternative_names Sequence[str]
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    support_code str
    arn String
    The ARN of the lightsail certificate.
    createdAt String
    The timestamp when the instance was created.
    domainName String
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    domainValidationRecords List<Property Map>
    lbName String
    The load balancer name where you want to create the SSL/TLS certificate.
    name String
    The SSL/TLS certificate name.
    subjectAlternativeNames List<String>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    supportCode String

    Supporting Types

    LbCertificateDomainValidationRecord, LbCertificateDomainValidationRecordArgs

    DomainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    ResourceRecordName string
    ResourceRecordType string
    ResourceRecordValue string
    DomainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    ResourceRecordName string
    ResourceRecordType string
    ResourceRecordValue string
    domainName String
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    resourceRecordName String
    resourceRecordType String
    resourceRecordValue String
    domainName string
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    resourceRecordName string
    resourceRecordType string
    resourceRecordValue string
    domain_name str
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    resource_record_name str
    resource_record_type str
    resource_record_value str
    domainName String
    The domain name (e.g., example.com) for your SSL/TLS certificate.
    resourceRecordName String
    resourceRecordType String
    resourceRecordValue String

    Import

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

    $ pulumi import aws:lightsail/lbCertificate:LbCertificate test example-load-balancer,example-load-balancer-certificate
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi