kong logo
Kong v4.5.0, Mar 29 22

kong.Certificate

# kong.Certificate

For more information on creating certificates in Kong see their documentation

Example Usage

using Pulumi;
using Kong = Pulumi.Kong;

class MyStack : Stack
{
    public MyStack()
    {
        var certificate = new Kong.Certificate("certificate", new Kong.CertificateArgs
        {
            Certificate = "public key --- 123 ----",
            PrivateKey = "private key --- 456 ----",
            Snis = 
            {
                "foo.com",
                "bar.com",
            },
            Tags = 
            {
                "myTag",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-kong/sdk/v4/go/kong"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kong.NewCertificate(ctx, "certificate", &kong.CertificateArgs{
			Certificate: pulumi.String("public key --- 123 ----"),
			PrivateKey:  pulumi.String("private key --- 456 ----"),
			Snis: pulumi.StringArray{
				pulumi.String("foo.com"),
				pulumi.String("bar.com"),
			},
			Tags: pulumi.StringArray{
				pulumi.String("myTag"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_kong as kong

certificate = kong.Certificate("certificate",
    certificate="public key --- 123 ----",
    private_key="private key --- 456 ----",
    snis=[
        "foo.com",
        "bar.com",
    ],
    tags=["myTag"])
import * as pulumi from "@pulumi/pulumi";
import * as kong from "@pulumi/kong";

const certificate = new kong.Certificate("certificate", {
    certificate: "public key --- 123 ----",
    privateKey: "private key --- 456 ----",
    snis: [
        "foo.com",
        "bar.com",
    ],
    tags: ["myTag"],
});

Coming soon!

Create Certificate Resource

new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                certificate: Optional[str] = None,
                private_key: Optional[str] = None,
                snis: Optional[Sequence[str]] = None,
                tags: Optional[Sequence[str]] = None)
@overload
def Certificate(resource_name: str,
                args: CertificateArgs,
                opts: Optional[ResourceOptions] = None)
func NewCertificate(ctx *Context, name string, args CertificateArgs, opts ...ResourceOption) (*Certificate, error)
public Certificate(string name, CertificateArgs args, CustomResourceOptions? opts = null)
public Certificate(String name, CertificateArgs args)
public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
type: kong: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:

Cert string

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

PrivateKey string

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

Snis List<string>

A list of strings associated with the Certificate for grouping and filtering

Tags List<string>
Certificate string

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

PrivateKey string

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

Snis []string

A list of strings associated with the Certificate for grouping and filtering

Tags []string
certificate String

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

privateKey String

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

snis List<String>

A list of strings associated with the Certificate for grouping and filtering

tags List<String>
certificate string

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

privateKey string

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

snis string[]

A list of strings associated with the Certificate for grouping and filtering

tags string[]
certificate str

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

private_key str

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

snis Sequence[str]

A list of strings associated with the Certificate for grouping and filtering

tags Sequence[str]
certificate String

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

privateKey String

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

snis List<String>

A list of strings associated with the Certificate for grouping and filtering

tags List<String>

Outputs

All input properties are implicitly available as output properties. Additionally, the Certificate 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 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,
        certificate: Optional[str] = None,
        private_key: Optional[str] = None,
        snis: Optional[Sequence[str]] = None,
        tags: Optional[Sequence[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:
Cert string

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

PrivateKey string

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

Snis List<string>

A list of strings associated with the Certificate for grouping and filtering

Tags List<string>
Certificate string

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

PrivateKey string

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

Snis []string

A list of strings associated with the Certificate for grouping and filtering

Tags []string
certificate String

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

privateKey String

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

snis List<String>

A list of strings associated with the Certificate for grouping and filtering

tags List<String>
certificate string

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

privateKey string

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

snis string[]

A list of strings associated with the Certificate for grouping and filtering

tags string[]
certificate str

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

private_key str

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

snis Sequence[str]

A list of strings associated with the Certificate for grouping and filtering

tags Sequence[str]
certificate String

should be the public key of your certificate it is mapped to the Cert parameter on the Kong API.

privateKey String

should be the private key of your certificate it is mapped to the Key parameter on the Kong API.

snis List<String>

A list of strings associated with the Certificate for grouping and filtering

tags List<String>

Import

To import a certificate

 $ pulumi import kong:index/certificate:Certificate <certifcate_identifier> <certificate_id>

Package Details

Repository
Kong pulumi/pulumi-kong
License
Apache-2.0
Notes

This Pulumi package is based on the kong Terraform Provider.