Link Search Menu Expand Document

Table of contents

KloudFormation

KloudFormation is a one-to-one mapping of Amazon’s CloudFormation generated into a Kotlin library allowing users to write type safe stacks in Kotlin.

KloudFormation can be invoked in many ways allowing any project to use it, not just Kotlin projects.

Benefits Include

  • Type Safety
  • Code Completion
  • Stacks as Code
  • Modular Templating
  • Up to Date

Full List of Resources here

This is what it looks like

val template = KloudFormationTemplate.create {
    val topic = topic()
    bucket {
        bucketName(topic.TopicName())
    }
}

This is what it Produces

AWSTemplateFormatVersion: "2010-09-09"
Resources:
    Topic:
     Type: "AWS::SNS::Topic"
    Bucket:
     Type: "AWS::S3::Bucket"
     Properties:
       BucketName:
         Fn::GetAtt:
         - "Topic"
         - "TopicName"

Get Started

Any project can use KloudFormation. To get the best experience, it is recommended to use an IDE with code completion like IntelliJ IDEA

If using Linux or Mac you can install and run KloudFormation as follows:

$ curl -sSL https://install.kloudformation.hexlabs.io | bash

Then this to see how it works:

$ kloudformation help

For Reference Material: See Reference

To Invert a CloudFormation Template into Kloudformation: See Inverting CloudFormation

For Advanced Material like Templatisation of KloudFormation: See Advanced

For getting started with KloudFormation and your particular build tool: See links below


Table of contents