Terraform template to install Kong with AWS resources and Docker.
- Terraform version > 0.12
- Terraform provider.aws => v2.26.0
This template is tested with Kong enterprise, thus we hosted the pre-baked image in our own dockerhub repository.
Disclaimer : Please purchase a valid license if you intend to run Kong Enterprise
For your testing, You can retrive the latest Kong CE docker images @ https://hub.docker.com/_/kong.
Please refer to secret.tfvars.example for the required variables.
Prior to running this terraform please ensure the following is present.
- A Public hosted zone in route 53 (For example, gemsapi.io)
- A Certificate under Amazon Certificate Manager (For example, *.gemsapi.io)
- AWS access key and secret key
- Pem file for ssh into the provisioned EC2 Instance (For example, awskong.pem)
- Download the latest version of Terraform
- Terraform init
- Terraform plan
- Terraform apply
- Terraform destroy (to remove)
To init terraform run the following command :
terraform init -backend-config="access_key=<access key here>" -backend-config="secret_key=<secret key here>"
For plan ,apply and destroy run with the flag -var-file=secret.tfvars
where your local secret.tfvars will override default values in vars.tf
Examples :
terraform plan -var-file=secret.tfvars
terraform apply -var-file=secret.tfvars
terraform destroy -var-file=secret.tfvars