Kong Provider: Installation & Configuration
The Pulumi Kong provider uses the Kong SDK to manage and provision resources.
Installation
The Kong provider is available as a package in all Pulumi languages:
- JavaScript/TypeScript:
@pulumi/kong
- Python:
pulumi-kong
- Go:
github.com/pulumi/pulumi-kong/sdk/v4/go/kong
- .NET:
Pulumi.Kong
- Java:
com.pulumi/kong
Configuring Credentials
Pulumi relies on the Kong SDK to authenticate requests from your computer to Kong. Your credentials are never sent to pulumi.com. The Pulumi Kong Provider needs to be configured with Kong credentials before it can be used to create resources.
Once the credentials are obtained, there are two ways to communicate your authorization tokens to Pulumi:
Set the environment variable
KONG_ADMIN_ADDR
,KONG_ADMIN_USERNAME
andKONG_ADMIN_PASSWORD
:$ export KONG_ADMIN_ADDR=XXXXXXXXXXXXXX $ export KONG_ADMIN_USERNAME=YYYYYYYYYYYYYY $ export KONG_ADMIN_PASSWORD=YYYYYYYYYYYYYY
Set them using configuration, if you prefer that they be stored alongside your Pulumi stack for easy multi-user access:
$ pulumi config set kong:kongAdminUri XXXXXXXXXXXXXX $ pulumi config set kong:kongAdminUsername YYYYYYYYYYYYYY $ pulumi config set kong:kongAdminPassword YYYYYYYYYYYYYY --secret
Remember to pass --secret
when setting kong:kongAdminPassword
so that it is properly encrypted. The complete list of
configuration parameters is in the Kong provider README.