> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerform.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Layerform helps engineers create reusable environment stacks using plain Terraform files.

<div className="flex justify-center items-center">
  <img className="block dark:hidden w-96" src="https://mintcdn.com/ergomake-83/br_QNJl4feQWyGIg/images/hero-light.png?fit=max&auto=format&n=br_QNJl4feQWyGIg&q=85&s=39752b9957133232cc31fe17897c381d" alt="Hero Light" width="384px" data-path="images/hero-light.png" />

  <img className="hidden dark:block w-96" width="384px" src="https://mintcdn.com/ergomake-83/br_QNJl4feQWyGIg/images/hero-dark.png?fit=max&auto=format&n=br_QNJl4feQWyGIg&q=85&s=01f016b7787a267a165f8e3f2621894e" alt="Hero Dark" data-path="images/hero-dark.png" />
</div>

When using Layerform, engineers encapsulate each part of their infrastructure into layer definitions.

Engineers can then create development infrastructure by stacking each of those layers. Layerform's magic is that layers can share the same base layers, allowing for easy and inexpensive reuse.

Layerform also has features to make it easy to develop and test software in the cloud.

<Note>
  For those interested in development environments: we don't want to run your
  text-editor and local tools. You still run those on your machine. What we do
  is allow you to create your own "staging" environment.
</Note>

## Installation

To install Layerform, you can use `go install`.

```
$ go install github.com/ergomake/layerform@latest
```

## Tutorial

Follow along and learn how to provision infrastructure layers using Layerform. Engineers can then use those layers to create development infrastructure for themselves.

In this tutorial, we'll create layers for running the Elastic Stack (Elasticsearch, Kibana, and Beats) on top of Kubernetes.

<CardGroup cols={2}>
  <Card title="Tutorial overview" icon="map" href="/tutorial/overview">
    Understand how we'll use Layerform to create development environments
    for the Elastic Stack and learn about the advantages of using layers.
  </Card>

  <Card title="Your first layer definitions" icon="layer-group" href="/tutorial/layer-definitions">
    Create layer definitions for Kubernetes, Elasticsearch, Kibana, and
    Beats.
  </Card>

  <Card title="Provisioning your first layer definitions" icon="cloud-arrow-up" href="/tutorial/provisioning">
    Provision an S3 back-end with the Elastic Stack layer definitions so
    that developers can use them to spin up development environments later.
  </Card>

  <Card title="Running the dev infrastructure" icon="window" href="/tutorial/running">
    Learn how to run the development infrastructure for the Elastic Stack
    using the layer definitions we've created.
  </Card>
</CardGroup>

## Reference

Read about the different parts of Layerform and how it works.

<CardGroup cols={2}>
  <Card title="Layer definitions" icon="pen-to-square" href="/reference/layer_definitions">
    Learn what are layer definitions and how they work..
  </Card>

  <Card title="Back-ends and provisioning" icon="cloud-arrow-up" href="/reference/backends">
    Learn what is a Layerform back-end and how to use and provision them.
  </Card>

  <Card title="Spawning and killing layers" icon="window" href="/reference/creating_and_deleting">
    Learn how to spawn new layer instances or kill existing ones.
  </Card>

  <Card title="CLI Configs" icon="window" href="/reference/cli_configs">
    Learn how to configure your Layerform CLI.
  </Card>

  <Card title="Inner workings" icon="window" href="/reference/cli_configs">
    Learn how Layerform uses Terraform files and states to spin up
    infrastructure using layers.
  </Card>
</CardGroup>
