Certificate

Provides a lightsail certificate.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = new Aws.LightSail.Certificate("test", new()
    {
        DomainName = "testdomain.com",
        SubjectAlternativeNames = new[]
        {
            "www.testdomain.com",
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lightsail"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lightsail.NewCertificate(ctx, "test", &lightsail.CertificateArgs{
			DomainName: pulumi.String("testdomain.com"),
			SubjectAlternativeNames: pulumi.StringArray{
				pulumi.String("www.testdomain.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lightsail.Certificate;
import com.pulumi.aws.lightsail.CertificateArgs;
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 Certificate("test", CertificateArgs.builder()        
            .domainName("testdomain.com")
            .subjectAlternativeNames("www.testdomain.com")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test = aws.lightsail.Certificate("test",
    domain_name="testdomain.com",
    subject_alternative_names=["www.testdomain.com"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.lightsail.Certificate("test", {
    domainName: "testdomain.com",
    subjectAlternativeNames: ["www.testdomain.com"],
});
resources:
  test:
    type: aws:lightsail:Certificate
    properties:
      domainName: testdomain.com
      subjectAlternativeNames:
        - www.testdomain.com

Create Certificate Resource

new Certificate(name: string, args?: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                domain_name: Optional[str] = None,
                name: Optional[str] = None,
                subject_alternative_names: Optional[Sequence[str]] = None,
                tags: Optional[Mapping[str, str]] = None)
@overload
def Certificate(resource_name: str,
                args: Optional[CertificateArgs] = None,
                opts: Optional[ResourceOptions] = None)
func NewCertificate(ctx *Context, name string, args *CertificateArgs, opts ...ResourceOption) (*Certificate, error)
public Certificate(string name, CertificateArgs? args = null, CustomResourceOptions? opts = null)
public Certificate(String name, CertificateArgs args)
public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
type: aws:lightsail:Certificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CertificateArgs
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 CertificateArgs
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 CertificateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CertificateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CertificateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Certificate 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 Certificate resource accepts the following input properties:

DomainName string

A domain name for which the certificate should be issued.

Name string

The name of the Lightsail load balancer.

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.

Tags Dictionary<string, string>

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

DomainName string

A domain name for which the certificate should be issued.

Name string

The name of the Lightsail load balancer.

SubjectAlternativeNames []string

Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.

Tags map[string]string

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

domainName String

A domain name for which the certificate should be issued.

name String

The name of the Lightsail load balancer.

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.

tags Map<String,String>

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

domainName string

A domain name for which the certificate should be issued.

name string

The name of the Lightsail load balancer.

subjectAlternativeNames string[]

Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.

tags {[key: string]: string}

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

domain_name str

A domain name for which the certificate should be issued.

name str

The name of the Lightsail load balancer.

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.

tags Mapping[str, str]

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

domainName String

A domain name for which the certificate should be issued.

name String

The name of the Lightsail load balancer.

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.

tags Map<String>

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

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

Arn string

The ARN of the lightsail certificate.

CreatedAt string

The timestamp when the instance was created.

DomainValidationOptions List<Pulumi.Aws.LightSail.Outputs.CertificateDomainValidationOption>

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

The ARN of the lightsail certificate.

CreatedAt string

The timestamp when the instance was created.

DomainValidationOptions []CertificateDomainValidationOption

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the lightsail certificate.

createdAt String

The timestamp when the instance was created.

domainValidationOptions List<CertificateDomainValidationOption>

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

The ARN of the lightsail certificate.

createdAt string

The timestamp when the instance was created.

domainValidationOptions CertificateDomainValidationOption[]

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

The ARN of the lightsail certificate.

created_at str

The timestamp when the instance was created.

domain_validation_options Sequence[CertificateDomainValidationOption]

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the lightsail certificate.

createdAt String

The timestamp when the instance was created.

domainValidationOptions List<Property Map>

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up Existing Certificate Resource

Get an existing Certificate 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?: CertificateState, opts?: CustomResourceOptions): Certificate
@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_options: Optional[Sequence[CertificateDomainValidationOptionArgs]] = None,
        name: Optional[str] = None,
        subject_alternative_names: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> Certificate
func GetCertificate(ctx *Context, name string, id IDInput, state *CertificateState, opts ...ResourceOption) (*Certificate, error)
public static Certificate Get(string name, Input<string> id, CertificateState? state, CustomResourceOptions? opts = null)
public static Certificate get(String name, Output<String> id, CertificateState 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

A domain name for which the certificate should be issued.

DomainValidationOptions List<Pulumi.Aws.LightSail.Inputs.CertificateDomainValidationOptionArgs>

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

Name string

The name of the Lightsail load balancer.

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.

Tags Dictionary<string, string>

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

The ARN of the lightsail certificate.

CreatedAt string

The timestamp when the instance was created.

DomainName string

A domain name for which the certificate should be issued.

DomainValidationOptions []CertificateDomainValidationOptionArgs

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

Name string

The name of the Lightsail load balancer.

SubjectAlternativeNames []string

Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.

Tags map[string]string

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the lightsail certificate.

createdAt String

The timestamp when the instance was created.

domainName String

A domain name for which the certificate should be issued.

domainValidationOptions List<CertificateDomainValidationOptionArgs>

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

name String

The name of the Lightsail load balancer.

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.

tags Map<String,String>

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

The ARN of the lightsail certificate.

createdAt string

The timestamp when the instance was created.

domainName string

A domain name for which the certificate should be issued.

domainValidationOptions CertificateDomainValidationOptionArgs[]

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

name string

The name of the Lightsail load balancer.

subjectAlternativeNames string[]

Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.

tags {[key: string]: string}

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

The ARN of the lightsail certificate.

created_at str

The timestamp when the instance was created.

domain_name str

A domain name for which the certificate should be issued.

domain_validation_options Sequence[CertificateDomainValidationOptionArgs]

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

name str

The name of the Lightsail load balancer.

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.

tags Mapping[str, str]

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the lightsail certificate.

createdAt String

The timestamp when the instance was created.

domainName String

A domain name for which the certificate should be issued.

domainValidationOptions List<Property Map>

Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.

name String

The name of the Lightsail load balancer.

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.

tags Map<String>

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Supporting Types

CertificateDomainValidationOption

DomainName string

A domain name for which the certificate should be issued.

ResourceRecordName string
ResourceRecordType string
ResourceRecordValue string
DomainName string

A domain name for which the certificate should be issued.

ResourceRecordName string
ResourceRecordType string
ResourceRecordValue string
domainName String

A domain name for which the certificate should be issued.

resourceRecordName String
resourceRecordType String
resourceRecordValue String
domainName string

A domain name for which the certificate should be issued.

resourceRecordName string
resourceRecordType string
resourceRecordValue string
domain_name str

A domain name for which the certificate should be issued.

resource_record_name str
resource_record_type str
resource_record_value str
domainName String

A domain name for which the certificate should be issued.

resourceRecordName String
resourceRecordType String
resourceRecordValue String

Import

aws_lightsail_certificate can be imported using the certificate name, e.g.

 $ pulumi import aws:lightsail/certificate:Certificate test CertificateName

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.