We’re excited to announce support of physical environments in the Terraform Provider for Kosli!
What’s Included
Environment Management:
Full lifecycle support for creating, updating, and managing physical environments types:
K8S, ECS, S3, docker, server, and lambda.
Manage legacy environments as IaC:
Import your existing physical environments to have Terraform manage them.
Example
Here’s a simple example on how you can provision a Kubernetes environment using Terraform:
main.tf
terraform {
required_providers {
kosli = {
source = "kosli-dev/kosli"
version = "~> 0.2"
}
}
}
provider "kosli" {
org = "my-org"
# preferably use KOSLI_API_TOKEN for auth (requires admin permissions)
# alternatively:
# api_token = var.api_token
}
# Basic K8S environment
resource "kosli_environment" "production_k8s" {
name = "production-k8s"
type = "K8S"
description = "Production Kubernetes cluster"
include_scaling = true
}
Just run:
terraform initterraform planterraform apply- Done!
What’s Next
This is only the start of the journey managing Kosli resources at scale. We have much more coming up:
- Logical environments to aggregate physical environments
- Environment policies
- Documentation on Kosli Terraform provider (in docs.kosli.com)
- Follow milestone v0.3.0 for details
Full documentation and examples: https://registry.terraform.io/providers/kosli-dev/kosli/latest
View on GitHub: https://github.com/kosli-dev/terraform-provider-kosli/releases/tag/v0.2.0