kong.ConsumerKeyAuth
Explore with Pulumi AI
# kong.ConsumerKeyAuth
Resource that allows you to configure the Key Authentication plugin for a consumer.
Example Usage
using Pulumi;
using Kong = Pulumi.Kong;
class MyStack : Stack
{
public MyStack()
{
var myConsumer = new Kong.Consumer("myConsumer", new Kong.ConsumerArgs
{
Username = "User1",
CustomId = "123",
});
var keyAuthPlugin = new Kong.Plugin("keyAuthPlugin", new Kong.PluginArgs
{
});
var consumerKeyAuth = new Kong.ConsumerKeyAuth("consumerKeyAuth", new Kong.ConsumerKeyAuthArgs
{
ConsumerId = myConsumer.Id,
Key = "secret",
Tags =
{
"myTag",
"anotherTag",
},
});
}
}
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 {
myConsumer, err := kong.NewConsumer(ctx, "myConsumer", &kong.ConsumerArgs{
Username: pulumi.String("User1"),
CustomId: pulumi.String("123"),
})
if err != nil {
return err
}
_, err = kong.NewPlugin(ctx, "keyAuthPlugin", nil)
if err != nil {
return err
}
_, err = kong.NewConsumerKeyAuth(ctx, "consumerKeyAuth", &kong.ConsumerKeyAuthArgs{
ConsumerId: myConsumer.ID(),
Key: pulumi.String("secret"),
Tags: pulumi.StringArray{
pulumi.String("myTag"),
pulumi.String("anotherTag"),
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_kong as kong
my_consumer = kong.Consumer("myConsumer",
username="User1",
custom_id="123")
key_auth_plugin = kong.Plugin("keyAuthPlugin")
consumer_key_auth = kong.ConsumerKeyAuth("consumerKeyAuth",
consumer_id=my_consumer.id,
key="secret",
tags=[
"myTag",
"anotherTag",
])
import * as pulumi from "@pulumi/pulumi";
import * as kong from "@pulumi/kong";
const myConsumer = new kong.Consumer("myConsumer", {
username: "User1",
customId: "123",
});
const keyAuthPlugin = new kong.Plugin("keyAuthPlugin", {});
const consumerKeyAuth = new kong.ConsumerKeyAuth("consumerKeyAuth", {
consumerId: myConsumer.id,
key: "secret",
tags: [
"myTag",
"anotherTag",
],
});
Coming soon!
Create ConsumerKeyAuth Resource
new ConsumerKeyAuth(name: string, args: ConsumerKeyAuthArgs, opts?: CustomResourceOptions);
@overload
def ConsumerKeyAuth(resource_name: str,
opts: Optional[ResourceOptions] = None,
consumer_id: Optional[str] = None,
key: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
@overload
def ConsumerKeyAuth(resource_name: str,
args: ConsumerKeyAuthArgs,
opts: Optional[ResourceOptions] = None)
func NewConsumerKeyAuth(ctx *Context, name string, args ConsumerKeyAuthArgs, opts ...ResourceOption) (*ConsumerKeyAuth, error)
public ConsumerKeyAuth(string name, ConsumerKeyAuthArgs args, CustomResourceOptions? opts = null)
public ConsumerKeyAuth(String name, ConsumerKeyAuthArgs args)
public ConsumerKeyAuth(String name, ConsumerKeyAuthArgs args, CustomResourceOptions options)
type: kong:ConsumerKeyAuth
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConsumerKeyAuthArgs
- 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 ConsumerKeyAuthArgs
- 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 ConsumerKeyAuthArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConsumerKeyAuthArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConsumerKeyAuthArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ConsumerKeyAuth 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 ConsumerKeyAuth resource accepts the following input properties:
- Consumer
Id string the id of the consumer to associate the credentials to
- Key string
Unique key to authenticate the client; if omitted the plugin will generate one
- List<string>
A list of strings associated with the consumer key auth for grouping and filtering
- Consumer
Id string the id of the consumer to associate the credentials to
- Key string
Unique key to authenticate the client; if omitted the plugin will generate one
- []string
A list of strings associated with the consumer key auth for grouping and filtering
- consumer
Id String the id of the consumer to associate the credentials to
- key String
Unique key to authenticate the client; if omitted the plugin will generate one
- List<String>
A list of strings associated with the consumer key auth for grouping and filtering
- consumer
Id string the id of the consumer to associate the credentials to
- key string
Unique key to authenticate the client; if omitted the plugin will generate one
- string[]
A list of strings associated with the consumer key auth for grouping and filtering
- consumer_
id str the id of the consumer to associate the credentials to
- key str
Unique key to authenticate the client; if omitted the plugin will generate one
- Sequence[str]
A list of strings associated with the consumer key auth for grouping and filtering
- consumer
Id String the id of the consumer to associate the credentials to
- key String
Unique key to authenticate the client; if omitted the plugin will generate one
- List<String>
A list of strings associated with the consumer key auth for grouping and filtering
Outputs
All input properties are implicitly available as output properties. Additionally, the ConsumerKeyAuth 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 ConsumerKeyAuth Resource
Get an existing ConsumerKeyAuth 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?: ConsumerKeyAuthState, opts?: CustomResourceOptions): ConsumerKeyAuth
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
consumer_id: Optional[str] = None,
key: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> ConsumerKeyAuth
func GetConsumerKeyAuth(ctx *Context, name string, id IDInput, state *ConsumerKeyAuthState, opts ...ResourceOption) (*ConsumerKeyAuth, error)
public static ConsumerKeyAuth Get(string name, Input<string> id, ConsumerKeyAuthState? state, CustomResourceOptions? opts = null)
public static ConsumerKeyAuth get(String name, Output<String> id, ConsumerKeyAuthState 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.
- Consumer
Id string the id of the consumer to associate the credentials to
- Key string
Unique key to authenticate the client; if omitted the plugin will generate one
- List<string>
A list of strings associated with the consumer key auth for grouping and filtering
- Consumer
Id string the id of the consumer to associate the credentials to
- Key string
Unique key to authenticate the client; if omitted the plugin will generate one
- []string
A list of strings associated with the consumer key auth for grouping and filtering
- consumer
Id String the id of the consumer to associate the credentials to
- key String
Unique key to authenticate the client; if omitted the plugin will generate one
- List<String>
A list of strings associated with the consumer key auth for grouping and filtering
- consumer
Id string the id of the consumer to associate the credentials to
- key string
Unique key to authenticate the client; if omitted the plugin will generate one
- string[]
A list of strings associated with the consumer key auth for grouping and filtering
- consumer_
id str the id of the consumer to associate the credentials to
- key str
Unique key to authenticate the client; if omitted the plugin will generate one
- Sequence[str]
A list of strings associated with the consumer key auth for grouping and filtering
- consumer
Id String the id of the consumer to associate the credentials to
- key String
Unique key to authenticate the client; if omitted the plugin will generate one
- List<String>
A list of strings associated with the consumer key auth for grouping and filtering
Package Details
- Repository
- Kong pulumi/pulumi-kong
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
kong
Terraform Provider.