Need help with terraform-provider-kong?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

kevholditch
160 Stars 70 Forks MIT License 147 Commits 8 Opened issues

Description

kong provider for terraform

Services available

!
?

Need anything else?

Contributors list

Terraform Provider Kong

The Kong Terraform Provider tested against real Kong!

v5.0.0
of the provider supports Terraform
0.12

IMPORTANT

The provider has been updated to support Kong

v2.X
, there were some breaking changes made between Kong
v1
and
v2
. To use Kong
v1
use provider version
v6.X.X
. That version will no longer be maintained.

Requirements

Usage

First, install the desired plugin release following Terraform's Third-party plugin docs.

To configure the provider:

hcl
provider "kong" {
    kong_admin_uri = "http://myKong:8001"
}

Optionally you can configure Username and Password for BasicAuth:

hcl
provider "kong" {
    kong_admin_uri  = "http://myKong:8001"
    kong_admin_username = "youruser"
    kong_admin_password = "yourpass"
}

You can use environment variables to set the provider properties instead. The following table shows all of the config options, the corresponding environment variables and their property defaults if you do not set them. When using the

kong_api_key
parameter ensure that the key name parameter in the key-auth plugin is set to
apikey
.

| Provider property | Env variable | Default if not set | Use | |:-------------------------------|:------------------------------|:----------------------|:--------------------------------------------------------------------------------| | kongadminuri | KONGADMINADDR | http://localhost:8001 | The url of the kong admin api | | kongadminusername | KONGADMINUSERNAME | not set | Username for the kong admin api | | kongadminpassword | KONGADMINPASSWORD | not set | Password for the kong admin api | | tlsskipverify | TLSSKIPVERIFY | false | Whether to skip tls certificate verification for the kong api when using https | | kongapikey | KONGAPIKEY | not set | API key used to secure the kong admin API | | kongadmintoken | KONGADMINTOKEN | not set | API key used to secure the kong admin API in the Enterprise Edition | | strictpluginsmatch | STRICTPLUGINSMATCH | false | Should plugins

config_json
field strictly match plugin configuration |

Documentation

For documentation on how to use the provider see the documentation on the Hashicorp Terraform Registry for this provider

Contributing

I would love to get contributions to the project so please feel free to submit a PR. To setup your dev station you need go and docker installed.

Once you have cloned the repository the

env TF_ACC=1 make
command will build the code and run all of the tests. If they all pass then you are good to go!

If when you run the make command you get the following error:

goimports needs running on the following files:
Then all you need to do is run
make goimports
this will reformat all of the code (I know awesome)!!

Please write tests for your new feature/bug fix, PRs will only be accepted with covering tests and where all tests pass. If you want to start work on a feature feel free to open a PR early so we can discuss it or if you need help.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.