aws.alb.ListenerCertificate
Explore with Pulumi AI
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 asaws.lb.ListenerCertificate
. The functionality is identical.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.acm.Certificate("example", {});
const frontEnd = new aws.lb.LoadBalancer("front_end", {});
const frontEndListener = new aws.lb.Listener("front_end", {});
const exampleListenerCertificate = new aws.lb.ListenerCertificate("example", {
listenerArn: frontEndListener.arn,
certificateArn: example.arn,
});
import pulumi
import pulumi_aws as aws
example = aws.acm.Certificate("example")
front_end = aws.lb.LoadBalancer("front_end")
front_end_listener = aws.lb.Listener("front_end")
example_listener_certificate = aws.lb.ListenerCertificate("example",
listener_arn=front_end_listener.arn,
certificate_arn=example.arn)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/acm"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := acm.NewCertificate(ctx, "example", nil)
if err != nil {
return err
}
_, err = lb.NewLoadBalancer(ctx, "front_end", nil)
if err != nil {
return err
}
frontEndListener, err := lb.NewListener(ctx, "front_end", nil)
if err != nil {
return err
}
_, err = lb.NewListenerCertificate(ctx, "example", &lb.ListenerCertificateArgs{
ListenerArn: frontEndListener.Arn,
CertificateArn: example.Arn,
})
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 example = new Aws.Acm.Certificate("example");
var frontEnd = new Aws.LB.LoadBalancer("front_end");
var frontEndListener = new Aws.LB.Listener("front_end");
var exampleListenerCertificate = new Aws.LB.ListenerCertificate("example", new()
{
ListenerArn = frontEndListener.Arn,
CertificateArn = example.Arn,
});
});
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 example = new Certificate("example");
var frontEnd = new LoadBalancer("frontEnd");
var frontEndListener = new Listener("frontEndListener");
var exampleListenerCertificate = new ListenerCertificate("exampleListenerCertificate", ListenerCertificateArgs.builder()
.listenerArn(frontEndListener.arn())
.certificateArn(example.arn())
.build());
}
}
resources:
example:
type: aws:acm:Certificate
frontEnd:
type: aws:lb:LoadBalancer
name: front_end
frontEndListener:
type: aws:lb:Listener
name: front_end
exampleListenerCertificate:
type: aws:lb:ListenerCertificate
name: example
properties:
listenerArn: ${frontEndListener.arn}
certificateArn: ${example.arn}
Create ListenerCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ListenerCertificate(name: string, args: ListenerCertificateArgs, opts?: CustomResourceOptions);
@overload
def ListenerCertificate(resource_name: str,
args: ListenerCertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ListenerCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
certificate_arn: Optional[str] = None,
listener_arn: Optional[str] = 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:alb:ListenerCertificate
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 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var listenerCertificateResource = new Aws.Alb.ListenerCertificate("listenerCertificateResource", new()
{
CertificateArn = "string",
ListenerArn = "string",
});
example, err := alb.NewListenerCertificate(ctx, "listenerCertificateResource", &alb.ListenerCertificateArgs{
CertificateArn: pulumi.String("string"),
ListenerArn: pulumi.String("string"),
})
var listenerCertificateResource = new ListenerCertificate("listenerCertificateResource", ListenerCertificateArgs.builder()
.certificateArn("string")
.listenerArn("string")
.build());
listener_certificate_resource = aws.alb.ListenerCertificate("listenerCertificateResource",
certificate_arn="string",
listener_arn="string")
const listenerCertificateResource = new aws.alb.ListenerCertificate("listenerCertificateResource", {
certificateArn: "string",
listenerArn: "string",
});
type: aws:alb:ListenerCertificate
properties:
certificateArn: string
listenerArn: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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 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.
- 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.
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.
- 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 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.
- 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.
Import
Using pulumi import
, import Listener Certificates using the listener arn and certificate arn, separated by an underscore (_
). For example:
$ pulumi import aws:alb/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
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.