Terraform Provider Integration


Terraform Provider Integration

Terraform is an open-source infrastructure as code tool that provides a consistent CLI workflow to manage hundreds of cloud services by codifying cloud APIs into declarative configuration files. This integration allows you to use a Terraform provider to interact with the Kion API.

At its core, Terraform can be compared to a model kit constructor. It enables you to define a plan, or a blueprint, for the infrastructure you want to build. Once you've defined the plan, Terraform steps in and constructs the actual infrastructure based on that blueprint. It's like having an automated builder that follows your instructions to create your desired environment.

A crucial concept in Terraform is the provider. Think of the provider as the instruction manual that guides Terraform in constructing your infrastructure. Each provider is specific to a particular system or service and instructs Terraform on how to build the components of that system. In the case of the Kion Terraform provider, it acts as the instruction manual for the Kion application, ensuring that your plans are translated into actions that Kion understands.

Using the Kion Terraform Provider

For usage examples, schema, resources, and data sources, see Terraform's article Kion Provider.

To use Kion with Terraform, copy the following code into your Terraform configuration.

 terraform {
 	required_providers {
 		Kion = {
			source = "Kionsoftware/Kion"
			version = "0.3.0"

provider "Kion" {
  # Configuration options

The following video demonstrates how to configure the Terraform provider, and how to create an IAM policy in Kion via Terraform.

Creating Resources with the Terraform Provider

Currently, Terraform provider can create and manage the following types of resources in Kion. For the schema for each resource, see Terraform's article Kion Provider.

  • AWS CloudFormation templates
  • AWS IAM policies
  • AWS service control policies
  • Azure ARM templates
  • Azure policies and roles
  • Google Cloud IAM roles
  • Cloud rules
  • Compliance standards and checks
  • Funding sources
  • Labels
  • OUs and projects
  • Cloud access roles
  • SAML group associations
  • User groups

The following video demonstrates how to create OUs and projects in Kion via Terraform.

Importing Resources into Terraform

The following video demonstrates how to take a cloud rule that was created in Kion and import it into Terraform. Once imported, the cloud rule can be modified and managed in Terraform.

Deleting Resources via Terraform

The following video demonstrates two ways to delete resources in Kion via Terraform.