Skip to content

Extensions

Vladislav.Tankov edited this page Jun 13, 2020 · 7 revisions

Extensions configuration in a Kotless gradle plugin defines different extensions for Kotless pipeline.

Via Extensions API you may add user's Terraform files to generated Terraform code. It may be useful in case you have some resource that cannot be created by Kotless itself, but is used by a Kotless-based application. For example, via Terraform extension, you can create a DynamoDB table that will be used by a Kotless-based application.

At Extensions API you may configure the local runner. For example, you can change port or enable AWS emulation.

Also, via Extensions API, you can enable destroy task in Gradle. It is hidden by default for safety reasons.

kotless {
    //<...> - Kotless config and Web Application config
    extensions {
        local {
            //rewrite default local port
            port = 9090
        }
    
        terraform {
            //Enable back Destroy task
            allowDestroy = true
    
            files {
                // Add a file to deployment code
                add(file("src/main/tf/extensions.tf"))
            }
        }
    }
}