ListenerCertificate
Provides a Load Balancer Listener Certificate resource.
This resource is for additional certificates and does not replace the default certificate on the listener.
Note:
aws.alb.ListenerCertificateis known asaws.lb.ListenerCertificate. The functionality is identical.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var exampleCertificate = new Aws.Acm.Certificate("exampleCertificate", new Aws.Acm.CertificateArgs
{
});
var frontEndLoadBalancer = new Aws.LB.LoadBalancer("frontEndLoadBalancer", new Aws.LB.LoadBalancerArgs
{
});
var frontEndListener = new Aws.LB.Listener("frontEndListener", new Aws.LB.ListenerArgs
{
});
var exampleListenerCertificate = new Aws.LB.ListenerCertificate("exampleListenerCertificate", new Aws.LB.ListenerCertificateArgs
{
CertificateArn = exampleCertificate.Arn,
ListenerArn = frontEndListener.Arn,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/acm"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleCertificate, err := acm.NewCertificate(ctx, "exampleCertificate", nil)
if err != nil {
return err
}
_, err = lb.NewLoadBalancer(ctx, "frontEndLoadBalancer", nil)
if err != nil {
return err
}
frontEndListener, err := lb.NewListener(ctx, "frontEndListener", nil)
if err != nil {
return err
}
_, err = lb.NewListenerCertificate(ctx, "exampleListenerCertificate", &lb.ListenerCertificateArgs{
CertificateArn: exampleCertificate.Arn,
ListenerArn: frontEndListener.Arn,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example_certificate = aws.acm.Certificate("exampleCertificate")
front_end_load_balancer = aws.lb.LoadBalancer("frontEndLoadBalancer")
front_end_listener = aws.lb.Listener("frontEndListener")
example_listener_certificate = aws.lb.ListenerCertificate("exampleListenerCertificate",
certificate_arn=example_certificate.arn,
listener_arn=front_end_listener.arn)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleCertificate = new aws.acm.Certificate("example", {});
const frontEndLoadBalancer = new aws.lb.LoadBalancer("front_end", {});
const frontEndListener = new aws.lb.Listener("front_end", {});
const exampleListenerCertificate = new aws.lb.ListenerCertificate("example", {
certificateArn: exampleCertificate.arn,
listenerArn: frontEndListener.arn,
});Deprecated: aws.applicationloadbalancing.ListenerCertificate has been deprecated in favor of aws.alb.ListenerCertificate
Create a ListenerCertificate Resource
new ListenerCertificate(name: string, args: ListenerCertificateArgs, opts?: CustomResourceOptions);def ListenerCertificate(resource_name, opts=None, certificate_arn=None, listener_arn=None, __props__=None);func NewListenerCertificate(ctx *Context, name string, args ListenerCertificateArgs, opts ...ResourceOption) (*ListenerCertificate, error)public ListenerCertificate(string name, ListenerCertificateArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ListenerCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ListenerCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ListenerCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ListenerCertificate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ListenerCertificate resource accepts the following input properties:
- Certificate
Arn string The ARN of the certificate to attach to the listener.
- Listener
Arn string The ARN of the listener to which to attach the certificate.
- Certificate
Arn string The ARN of the certificate to attach to the listener.
- Listener
Arn string The ARN of the listener to which to attach the certificate.
- certificate
Arn string The ARN of the certificate to attach to the listener.
- listener
Arn string The ARN of the listener to which to attach the certificate.
- certificate_
arn str The ARN of the certificate to attach to the listener.
- listener_
arn str The ARN of the listener to which to attach the certificate.
Outputs
All input properties are implicitly available as output properties. Additionally, the ListenerCertificate resource produces the following output properties:
Look up an Existing ListenerCertificate Resource
Get an existing ListenerCertificate 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?: ListenerCertificateState, opts?: CustomResourceOptions): ListenerCertificatestatic get(resource_name, id, opts=None, certificate_arn=None, listener_arn=None, __props__=None);func GetListenerCertificate(ctx *Context, name string, id IDInput, state *ListenerCertificateState, opts ...ResourceOption) (*ListenerCertificate, error)public static ListenerCertificate Get(string name, Input<string> id, ListenerCertificateState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Certificate
Arn string The ARN of the certificate to attach to the listener.
- Listener
Arn string The ARN of the listener to which to attach the certificate.
- Certificate
Arn string The ARN of the certificate to attach to the listener.
- Listener
Arn string The ARN of the listener to which to attach the certificate.
- certificate
Arn string The ARN of the certificate to attach to the listener.
- listener
Arn string The ARN of the listener to which to attach the certificate.
- certificate_
arn str The ARN of the certificate to attach to the listener.
- listener_
arn str The ARN of the listener to which to attach the certificate.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.