aws logo
AWS Classic v5.41.0, May 15 23

aws.applicationloadbalancing.ListenerCertificate

Explore with Pulumi AI

Deprecated:

aws.applicationloadbalancing.ListenerCertificate has been deprecated in favor of aws.alb.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.ListenerCertificate is known as aws.lb.ListenerCertificate. The functionality is identical.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var exampleCertificate = new Aws.Acm.Certificate("exampleCertificate");

    // ...
    var frontEndLoadBalancer = new Aws.LB.LoadBalancer("frontEndLoadBalancer");

    // ...
    var frontEndListener = new Aws.LB.Listener("frontEndListener");

    // ...
    var exampleListenerCertificate = new Aws.LB.ListenerCertificate("exampleListenerCertificate", new()
    {
        ListenerArn = frontEndListener.Arn,
        CertificateArn = exampleCertificate.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/acm"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lb"
	"github.com/pulumi/pulumi/sdk/v3/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{
			ListenerArn:    frontEndListener.Arn,
			CertificateArn: exampleCertificate.Arn,
		})
		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.acm.Certificate;
import com.pulumi.aws.lb.LoadBalancer;
import com.pulumi.aws.lb.Listener;
import com.pulumi.aws.lb.ListenerCertificate;
import com.pulumi.aws.lb.ListenerCertificateArgs;
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 exampleCertificate = new Certificate("exampleCertificate");

        var frontEndLoadBalancer = new LoadBalancer("frontEndLoadBalancer");

        var frontEndListener = new Listener("frontEndListener");

        var exampleListenerCertificate = new ListenerCertificate("exampleListenerCertificate", ListenerCertificateArgs.builder()        
            .listenerArn(frontEndListener.arn())
            .certificateArn(exampleCertificate.arn())
            .build());

    }
}
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",
    listener_arn=front_end_listener.arn,
    certificate_arn=example_certificate.arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleCertificate = new aws.acm.Certificate("exampleCertificate", {});
// ...
const frontEndLoadBalancer = new aws.lb.LoadBalancer("frontEndLoadBalancer", {});
// ...
const frontEndListener = new aws.lb.Listener("frontEndListener", {});
// ...
const exampleListenerCertificate = new aws.lb.ListenerCertificate("exampleListenerCertificate", {
    listenerArn: frontEndListener.arn,
    certificateArn: exampleCertificate.arn,
});
resources:
  exampleCertificate:
    type: aws:acm:Certificate
  frontEndLoadBalancer:
    type: aws:lb:LoadBalancer
  frontEndListener:
    type: aws:lb:Listener
  exampleListenerCertificate:
    type: aws:lb:ListenerCertificate
    properties:
      listenerArn: ${frontEndListener.arn}
      certificateArn: ${exampleCertificate.arn}

Create ListenerCertificate Resource

new ListenerCertificate(name: string, args: ListenerCertificateArgs, opts?: CustomResourceOptions);
@overload
def ListenerCertificate(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        certificate_arn: Optional[str] = None,
                        listener_arn: Optional[str] = None)
@overload
def ListenerCertificate(resource_name: str,
                        args: ListenerCertificateArgs,
                        opts: Optional[ResourceOptions] = None)
func NewListenerCertificate(ctx *Context, name string, args ListenerCertificateArgs, opts ...ResourceOption) (*ListenerCertificate, error)
public ListenerCertificate(string name, ListenerCertificateArgs args, CustomResourceOptions? opts = null)
public ListenerCertificate(String name, ListenerCertificateArgs args)
public ListenerCertificate(String name, ListenerCertificateArgs args, CustomResourceOptions options)
type: aws:applicationloadbalancing:ListenerCertificate
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args ListenerCertificateArgs
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 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.
name String
The unique name of the resource.
args ListenerCertificateArgs
The arguments to resource properties.
options 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 Architecture and Concepts docs.

Inputs

The ListenerCertificate resource accepts the following input properties:

CertificateArn string

The ARN of the certificate to attach to the listener.

ListenerArn string

The ARN of the listener to which to attach the certificate.

CertificateArn string

The ARN of the certificate to attach to the listener.

ListenerArn string

The ARN of the listener to which to attach the certificate.

certificateArn String

The ARN of the certificate to attach to the listener.

listenerArn String

The ARN of the listener to which to attach the certificate.

certificateArn string

The ARN of the certificate to attach to the listener.

listenerArn 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.

certificateArn String

The ARN of the certificate to attach to the listener.

listenerArn String

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:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up 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): ListenerCertificate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        certificate_arn: Optional[str] = None,
        listener_arn: Optional[str] = None) -> ListenerCertificate
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)
public static ListenerCertificate get(String name, Output<String> id, ListenerCertificateState 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:
CertificateArn string

The ARN of the certificate to attach to the listener.

ListenerArn string

The ARN of the listener to which to attach the certificate.

CertificateArn string

The ARN of the certificate to attach to the listener.

ListenerArn string

The ARN of the listener to which to attach the certificate.

certificateArn String

The ARN of the certificate to attach to the listener.

listenerArn String

The ARN of the listener to which to attach the certificate.

certificateArn string

The ARN of the certificate to attach to the listener.

listenerArn 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.

certificateArn String

The ARN of the certificate to attach to the listener.

listenerArn String

The ARN of the listener to which to attach the certificate.

Import

Listener Certificates can be imported by using the listener arn and certificate arn, separated by an underscore (_), e.g.,

 $ pulumi import aws:applicationloadbalancing/listenerCertificate:ListenerCertificate example arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/test/8e4497da625e2d8a/9ab28ade35828f96/67b3d2d36dd7c26b_arn:aws:iam::123456789012:server-certificate/tf-acc-test-6453083910015726063

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.