kong.Certificate
Explore with Pulumi AI
# kong.Certificate
For more information on creating certificates in Kong see their documentation
Example Usage
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"],
});
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"])
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Kong = Pulumi.Kong;
return await Deployment.RunAsync(() =>
{
var certificate = new Kong.Certificate("certificate", new()
{
Cert = "public key --- 123 ----",
PrivateKey = "private key --- 456 ----",
Snis = new[]
{
"foo.com",
"bar.com",
},
Tags = new[]
{
"myTag",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.kong.Certificate;
import com.pulumi.kong.CertificateArgs;
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 certificate = new Certificate("certificate", CertificateArgs.builder()
.certificate("public key --- 123 ----")
.privateKey("private key --- 456 ----")
.snis(
"foo.com",
"bar.com")
.tags("myTag")
.build());
}
}
resources:
certificate:
type: kong:Certificate
properties:
certificate: public key --- 123 ----
privateKey: private key --- 456 ----
snis:
- foo.com
- bar.com
tags:
- myTag
Create Certificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: str,
args: CertificateArgs,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var certificateResource = new Kong.Certificate("certificateResource", new()
{
Cert = "string",
PrivateKey = "string",
Snis = new[]
{
"string",
},
Tags = new[]
{
"string",
},
});
example, err := kong.NewCertificate(ctx, "certificateResource", &kong.CertificateArgs{
Certificate: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
Snis: pulumi.StringArray{
pulumi.String("string"),
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var certificateResource = new Certificate("certificateResource", CertificateArgs.builder()
.certificate("string")
.privateKey("string")
.snis("string")
.tags("string")
.build());
certificate_resource = kong.Certificate("certificateResource",
certificate="string",
private_key="string",
snis=["string"],
tags=["string"])
const certificateResource = new kong.Certificate("certificateResource", {
certificate: "string",
privateKey: "string",
snis: ["string"],
tags: ["string"],
});
type: kong:Certificate
properties:
certificate: string
privateKey: string
snis:
- string
tags:
- string
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. - Private
Key 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
- List<string>
- Certificate string
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - Private
Key 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
- []string
- certificate String
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - private
Key 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
- List<String>
- certificate string
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - private
Key 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
- 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
- Sequence[str]
- certificate String
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - private
Key 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
- 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.
- Cert string
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - Private
Key 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
- List<string>
- Certificate string
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - Private
Key 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
- []string
- certificate String
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - private
Key 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
- List<String>
- certificate string
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - private
Key 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
- 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
- Sequence[str]
- certificate String
- should be the public key of your certificate it is mapped to the
Cert
parameter on the Kong API. - private
Key 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
- List<String>
Import
To import a certificate:
$ pulumi import kong:index/certificate:Certificate <certifcate_identifier> <certificate_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Kong pulumi/pulumi-kong
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
kong
Terraform Provider.