Skip to content
A Terraform provider for the Kong API gateway https://alexashley.github.io/terraform-provider-kong/
Go Lua Makefile Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
docs Adds consumer_by field to oidc plugin (#54) Jan 9, 2019
docsgen
examples
importer
kong-docker
kong
.editorconfig
.gitignore
Makefile
README.md
docker-compose.yml
go.mod
go.sum
main.go

README.md

terraform-provider-kong

CircleCI

A Terraform provider for the api gateway Kong.

Features

  • Supports Kong's Enterprise authentication
  • Resources for individual plugins, including EE-only plugins
  • Import individual consumers, services, routes, or plugins
  • Bulk import tool to ease migrating existing infrastructure into Terraform

Unsupported Resources

No plans to support the legacy API resource.

I also don't intend to add support for the following resources, since I don't currently use them:

That said, PRs are welcome and may I try to implement them once the other resources are mature.

Development

  • install Go 1.11 (this project uses Go modules)
  • install Terraform.
  • docker-compose up --build -d to stand up an instance of Kong 0.14 CE w/ Postgres.
  • make build to create the provider.
  • make example to run the provider against Kong.

Adding a new resource

  • If you're adding a new plugin, use the generic_plugin_resource to abstract the Terraform operations for the plugin.
    • Supply one function that maps the resource to the plugin config (provider.ConfigMapper)
    • And another function to map from the plugin's API representation to Terraform state (provider.ResourceMapper)
  • For all resources, add a new YAML file under docsgen/resource-metadata with information about the resource
    • Documentation is generated by reading the provider, so you must supply a description for each field
You can’t perform that action at this time.