Blog
  • AI Gateway
  • AI Security
  • AIOps
  • API Security
  • API Gateway
|
    • API Management
    • API Development
    • API Design
    • Automation
    • Service Mesh
    • Insomnia
    • View All Blogs
  1. Home
  2. Blog
  3. Engineering
  4. Terraform Your Way to the Cloud with Konnect Dedicated Cloud Gateways
Engineering
April 16, 2025
4 min read

Terraform Your Way to the Cloud with Konnect Dedicated Cloud Gateways

Declan Keane
Senior Solutions Engineer, Kong

Imagine a world where you could deploy your API gateways across any cloud, enforce enterprise-grade policies, and meet compliance standards all within a single Terraform apply. 

Most teams think about infrastructure as code only in terms of spinning up VMs, networking components, databases, or maybe a Kubernetes cluster. But what if your API platform was just as programmable?

With Kong’s Konnect platform and its support for Terraform, that reality is here today!

Youtube thumbnail

Automate Everything: Kong Gateway + API Management with Terraform Across Any Cloud

Too many organizations manually manage their API gateways and policy enforcement today. As humans, we make mistakes. You’ve got one team manually configuring Kong or another gateway on AWS, another fiddling with policies in Azure, and someone else applying governance rules by hand in GCP. That’s a recipe for drift, inconsistency, and eventual chaos.

What you need is consistency, repeatability, and control across all environments, in all clouds, at all times.

Enter Kong Konnect and the Konnect Terraform Operator

This year is the year of Kong Dedicated Cloud Gateways. There, I said it! Kong’s Dedicated Cloud Gateways (DCGW) give you fully isolated, high-performance API gateways running on dedicated infrastructure. No noisy neighbors, no shared tenancy. Just your APIs, your traffic, and your control. That's huge! 

And because DCGWs are fully managed by Kong but deployed in your preferred cloud region, they give you all the benefits of a hosted solution without giving up performance or reliability. 

Here’s where it gets really powerful: you can provision those Dedicated Cloud Gateways using Terraform across AWS, Azure, and GCP. Across any supported region. Within a couple of minutes, your organization can be serving APIs across the globe.

But it doesn’t stop there. You can also define your Kong Gateway API configurations, routes, rate-limiting policies, authentication methods, and even governance rules all in Terraform code. 

  • Want to do business in Europe? Deploy a new gateway in Ireland.
  • Want to onboard a new API? Define it in a Terraform module.
  • Need to apply global authentication policies? Push a config update with terraform apply.
  • Want to validate compliance across environments? Bake that logic right into your CI/CD pipeline.

With this approach, everything becomes version-controlled, testable, and portable. Your API infrastructure is no longer dependent on tribal knowledge or a handful of screenshots in Confluence. Instead, it’s code. PR reviewed. Auditable. Reproducible.

What it looks like in action

Set up the Dedicated Cloud Control Plane

So here is the link to the Terraform code I’ve written. This is what the file structure should look like. Add your own terraform.tfvars:

What this will do is:

1. Set up a connection to Konnect

  • Configures the Konnect Terraform Provider
  • You can use a Personal Access token or System account token to authenticate

2. Creates the API runtime infrastructure

  • Creates a new Cloud Control plane called “Global Control Plane”
  • Configures gateways in AWS (East) and Azure (West)
  • Enables Autopilot for autoscaling

3. Define and secure the API:

  • Sets our Gateway Services to point to https://httpbin.konghq.com
  • Creates a route for /anything using GET requests.
  • Applies a rate-limiting plugin to that route

    • Allows max 5 requests per minute 

All are managed by code.

Generate Konnect Authentication credentials

Create either a Personal Access token or System account token.

Update terraform.tfvars file with the token.

Note: I’m setting “cloud_gateway_network_id” in control-plane.tf. You can update this with your network IDs or create your own new network in Konnect. The easiest way to get the network ID is by calling the admin api. 

Spin up DCGW in AWS And Azure Using Terraform

Once in the GitHub directory, run:

When prompted, type yes. Once it’s successfully, you should get a message like this:

Log in to Konnect and search for the “Global Control Plane.” It can take a few minutes for the gateways to spin up. Go grab a coffee!

We can see here that we have deployed Kong Gateways across two different cloud providers, AWS and Azure. One on the east and one in a western US-based data center. But they could also be across different regions and even in GCP. 

If you click on “Connect,” it will also give you regional and top-level DNS records for the gateway proxy. Try routing to all of them.

The regional ones (as you might have guessed) will route to the regional gateways. While the top-level one will route to the closest one to you based on latency. I’m on the West Coast, so I'll be routed to the West Coast gateways. While some of my colleagues on the East Coast would be routed to the East Coast ones. 

With the configuration we defined in service-config.tf this will deploy the Gateway Service, Route, and Rate Limiting plugin. All in Terraform as code.

Wrapping it: Your APIs Deserve Better

Most teams are still managing APIs like it’s 2013. You can change that.

By combining Kong’s Dedicated Cloud Gateways, Konnect, and Terraform, you can see tremendous value

  • Automation: Automating gateway provisioning, API lifecycle, policy enforcement, and governance reduces manual errors and increases efficiency.
  • Consistency and Repeatability: Using Terraform ensures consistent configurations across all environments and clouds, eliminating drift and chaos.
  • Multi-Cloud Deployment: Deploying API gateways across multiple clouds (AWS, Azure, GCP) and regions provides flexibility and global reach.
  • Scalability: Enabling Autopilot for autoscaling ensures the API infrastructure can handle varying traffic loads.
  • Version Control and Auditability: Managing API infrastructure as code allows for version control, PR reviews, and auditing, improving security and compliance.
  • Reduced Tribal Knowledge Dependence: Infrastructure is defined in code, reducing reliance on individual knowledge and improving maintainability.
  • Faster Deployment: Provisioning gateways and configuring APIs using Terraform is quicker than manual methods, enabling faster time-to-market.
  • Cost Efficiency: Optimized resource utilization and reduced manual effort can lead to cost savings.

All from a single source of truth. Have more questions or need a real demo? Let's chat! Or learn more about Kong Konnect with Terraform here. 

Unleash the power of APIs with Kong Konnect

Learn MoreGet a Demo
Kong KonnectCloudMulti CloudAutomation

More on this topic

Webinars

[Tech Talk] A Developer's Guide to Multi-Cloud API Operations with Kong Konnect

Webinars

Quarterly Platform Updates & Roadmap Webinar

See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

Get a Demo
Topics
Kong KonnectCloudMulti CloudAutomation
Share on Social
Declan Keane
Senior Solutions Engineer, Kong

Recommended posts

Kong Konnect Dedicated Cloud Gateways Add Azure Support

Kong Logo
Product ReleasesSeptember 11, 2024

It’s no secret that building global API infrastructure is a daunting task. In April, we announced the general availability of Kong Konnect Dedicated Cloud Gateways — a fully managed, multi-region API management solution that makes setting up globa

Josh Wigginton

Kong Konnect is now available on the Google Cloud Marketplace

Kong Logo
EngineeringJanuary 8, 2024

Now you can find and purchase Kong Konnect through the Google Cloud Marketplace! Kong Konnect is the unified API platform that allows you to manage multiple gateways across service meshes, ingress, cloud, and Kubernetes providers no matter where t

Erin Choi

Use ChatGPT to Develop a SOAP/XML Custom Kong Konnect Plugin

Kong Logo
EngineeringAugust 1, 2023

Today, APIs are based on modern communication patterns: REST, GraphQL, or gRPC. But two decades ago, the majority of Web Services were developed with SOAP/XML. In this blog, we’ll explain how Kong Konnect can manage SOAP/XML Web Services by creat

Jerome Guillaume

Enabling Multi-Region for Kong Konnect Cloud

Kong Logo
EngineeringOctober 5, 2022

Since the initial launch of Kong Konnect Cloud, one common feature request has (unsurprisingly) been Multi-Region support. Many customers look for SaaS solutions that support a distributed service architecture. Even at its inception, our goal was to

Nick Anderson

A Cloud Native + Infrastructure as Code Love Story

Kong Logo
EngineeringNovember 17, 2021

We love abstractions. We want to make things easier for developers, teams and end users. In doing that, sometimes we build things a little bit too complex for those who don't already understand the pain points for which the abstraction layers were b

Kat Cosgrove

How to Automate Deployment of Microservices With an API Gateway to a Multi-Cloud Environment

Kong Logo
EngineeringMay 20, 2020

In today’s enterprise computing landscape, multi-cloud organizations are quickly becoming the norm rather than the exception. By leveraging an API-first strategy with a microservice-based architecture, companies can achieve significant speed to mark

Mike Bilodeau

AI Voice Agents with Kong AI Gateway and Cerebras

Kong Logo
EngineeringNovember 24, 2025

Kong Gateway is an API gateway and a core component of the Kong Konnect platform . Built on a plugin-based extensibility model, it centralizes essential functions such as proxying, routing, load balancing, and health checking, efficiently manag

Claudio Acquaviva

Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

Get a Demo
Powering the API world

Increase developer productivity, security, and performance at scale with the unified platform for API management, AI gateways, service mesh, and ingress controller.

Sign up for Kong newsletter

    • Platform
    • Kong Konnect
    • Kong Gateway
    • Kong AI Gateway
    • Kong Insomnia
    • Developer Portal
    • Gateway Manager
    • Cloud Gateway
    • Get a Demo
    • Explore More
    • Open Banking API Solutions
    • API Governance Solutions
    • Istio API Gateway Integration
    • Kubernetes API Management
    • API Gateway: Build vs Buy
    • Kong vs Postman
    • Kong vs MuleSoft
    • Kong vs Apigee
    • Documentation
    • Kong Konnect Docs
    • Kong Gateway Docs
    • Kong Mesh Docs
    • Kong AI Gateway
    • Kong Insomnia Docs
    • Kong Plugin Hub
    • Open Source
    • Kong Gateway
    • Kuma
    • Insomnia
    • Kong Community
    • Company
    • About Kong
    • Customers
    • Careers
    • Press
    • Events
    • Contact
    • Pricing
  • Terms
  • Privacy
  • Trust and Compliance
  • © Kong Inc. 2026