aws.lightsail.LbCertificate
Explore with Pulumi AI
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LbCertificate(name: string, args: LbCertificateArgs, opts?: CustomResourceOptions);
@overload
def LbCertificate(resource_name: str,
args: LbCertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LbCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
lb_name: Optional[str] = None,
domain_name: Optional[str] = None,
name: Optional[str] = None,
subject_alternative_names: Optional[Sequence[str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var lbCertificateResource = new Aws.LightSail.LbCertificate("lbCertificateResource", new()
{
LbName = "string",
DomainName = "string",
Name = "string",
SubjectAlternativeNames = new[]
{
"string",
},
});
example, err := lightsail.NewLbCertificate(ctx, "lbCertificateResource", &lightsail.LbCertificateArgs{
LbName: pulumi.String("string"),
DomainName: pulumi.String("string"),
Name: pulumi.String("string"),
SubjectAlternativeNames: pulumi.StringArray{
pulumi.String("string"),
},
})
var lbCertificateResource = new LbCertificate("lbCertificateResource", LbCertificateArgs.builder()
.lbName("string")
.domainName("string")
.name("string")
.subjectAlternativeNames("string")
.build());
lb_certificate_resource = aws.lightsail.LbCertificate("lbCertificateResource",
lb_name="string",
domain_name="string",
name="string",
subject_alternative_names=["string"])
const lbCertificateResource = new aws.lightsail.LbCertificate("lbCertificateResource", {
lbName: "string",
domainName: "string",
name: "string",
subjectAlternativeNames: ["string"],
});
type: aws:lightsail:LbCertificate
properties:
domainName: string
lbName: string
name: string
subjectAlternativeNames:
- string
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:
- Lb
Name string - The load balancer name where you want to create the SSL/TLS certificate.
- Domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- Name string
- The SSL/TLS certificate name.
- Subject
Alternative List<string>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name.
- Lb
Name string - The load balancer name where you want to create the SSL/TLS certificate.
- Domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- Name string
- The SSL/TLS certificate name.
- Subject
Alternative []stringNames - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name.
- lb
Name String - The load balancer name where you want to create the SSL/TLS certificate.
- domain
Name String - The domain name (e.g., example.com) for your SSL/TLS certificate.
- name String
- The SSL/TLS certificate name.
- subject
Alternative List<String>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name.
- lb
Name string - The load balancer name where you want to create the SSL/TLS certificate.
- domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- name string
- The SSL/TLS certificate name.
- subject
Alternative string[]Names - 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_ Sequence[str]names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name.
- lb
Name String - The load balancer name where you want to create the SSL/TLS certificate.
- domain
Name String - The domain name (e.g., example.com) for your SSL/TLS certificate.
- name String
- The SSL/TLS certificate name.
- subject
Alternative List<String>Names - 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.
- Created
At string - The timestamp when the instance was created.
- Domain
Validation List<Pulumi.Records Aws. Light Sail. Outputs. Lb Certificate Domain Validation Record> - Id string
- The provider-assigned unique ID for this managed resource.
- Support
Code string
- Arn string
- The ARN of the lightsail certificate.
- Created
At string - The timestamp when the instance was created.
- Domain
Validation []LbRecords Certificate Domain Validation Record - Id string
- The provider-assigned unique ID for this managed resource.
- Support
Code string
- arn String
- The ARN of the lightsail certificate.
- created
At String - The timestamp when the instance was created.
- domain
Validation List<LbRecords Certificate Domain Validation Record> - id String
- The provider-assigned unique ID for this managed resource.
- support
Code String
- arn string
- The ARN of the lightsail certificate.
- created
At string - The timestamp when the instance was created.
- domain
Validation LbRecords Certificate Domain Validation Record[] - id string
- The provider-assigned unique ID for this managed resource.
- support
Code string
- arn str
- The ARN of the lightsail certificate.
- created_
at str - The timestamp when the instance was created.
- domain_
validation_ Sequence[Lbrecords Certificate Domain Validation Record] - id str
- The provider-assigned unique ID for this managed resource.
- support_
code str
- arn String
- The ARN of the lightsail certificate.
- created
At String - The timestamp when the instance was created.
- domain
Validation List<Property Map>Records - id String
- The provider-assigned unique ID for this managed resource.
- support
Code 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.
- Arn string
- The ARN of the lightsail certificate.
- Created
At string - The timestamp when the instance was created.
- Domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- Domain
Validation List<Pulumi.Records Aws. Light Sail. Inputs. Lb Certificate Domain Validation Record> - Lb
Name string - The load balancer name where you want to create the SSL/TLS certificate.
- Name string
- The SSL/TLS certificate name.
- Subject
Alternative List<string>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - Support
Code string
- Arn string
- The ARN of the lightsail certificate.
- Created
At string - The timestamp when the instance was created.
- Domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- Domain
Validation []LbRecords Certificate Domain Validation Record Args - Lb
Name string - The load balancer name where you want to create the SSL/TLS certificate.
- Name string
- The SSL/TLS certificate name.
- Subject
Alternative []stringNames - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - Support
Code string
- arn String
- The ARN of the lightsail certificate.
- created
At String - The timestamp when the instance was created.
- domain
Name String - The domain name (e.g., example.com) for your SSL/TLS certificate.
- domain
Validation List<LbRecords Certificate Domain Validation Record> - lb
Name String - The load balancer name where you want to create the SSL/TLS certificate.
- name String
- The SSL/TLS certificate name.
- subject
Alternative List<String>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - support
Code String
- arn string
- The ARN of the lightsail certificate.
- created
At string - The timestamp when the instance was created.
- domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- domain
Validation LbRecords Certificate Domain Validation Record[] - lb
Name string - The load balancer name where you want to create the SSL/TLS certificate.
- name string
- The SSL/TLS certificate name.
- subject
Alternative string[]Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - support
Code 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_ Sequence[Lbrecords Certificate Domain Validation Record Args] - 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_ Sequence[str]names - 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.
- created
At String - The timestamp when the instance was created.
- domain
Name String - The domain name (e.g., example.com) for your SSL/TLS certificate.
- domain
Validation List<Property Map>Records - lb
Name String - The load balancer name where you want to create the SSL/TLS certificate.
- name String
- The SSL/TLS certificate name.
- subject
Alternative List<String>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - support
Code String
Supporting Types
LbCertificateDomainValidationRecord, LbCertificateDomainValidationRecordArgs
- Domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- Resource
Record stringName - Resource
Record stringType - Resource
Record stringValue
- Domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- Resource
Record stringName - Resource
Record stringType - Resource
Record stringValue
- domain
Name String - The domain name (e.g., example.com) for your SSL/TLS certificate.
- resource
Record StringName - resource
Record StringType - resource
Record StringValue
- domain
Name string - The domain name (e.g., example.com) for your SSL/TLS certificate.
- resource
Record stringName - resource
Record stringType - resource
Record stringValue
- domain_
name str - The domain name (e.g., example.com) for your SSL/TLS certificate.
- resource_
record_ strname - resource_
record_ strtype - resource_
record_ strvalue
- domain
Name String - The domain name (e.g., example.com) for your SSL/TLS certificate.
- resource
Record StringName - resource
Record StringType - resource
Record StringValue
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.