Learn how to run the development infrastructure for the Elastic Stack using the layer definitions we’ve created.
layerform spawn elastic_stack my_layer
to spawn an instance of the elastic_stack
layer whose ID is my_layer
.
Given the elastic_stack
layer depends on an instance of the base
layer, layerform
will take care of spawning a new one for you because there are no existing instances of the base
layer. Then, it’ll spawn your elastic_stack
layer.
base
layer, it’ll receive the name default
, because no other instances of the base
layer existed before.
Now, if someone else in the team wants to spawn Elasticsearch and Kibana instances, they can run layerform spawn elastic_stack another_layer
to create an instance of elastic_stack
whose ID is another_layer
.
In that case, an instance of the base
layer with ID default
will already exist. Therefore, Layerform will spawn the elastic_stack
layer on top of it.
default
.Whenever an underlying layer with ID default
does not exist, Layerform will create one and apply the target layer on top of it.layerform kill elastic_stack my_layer
. This command will cause Layerform to tear down the instance of the elastic_stack
layer whose ID is my_layer
.
base
layer when there’s still another_layer
on top of it. If you try to do that by running layerform kill base default
you’ll see an error.
That error happens because you can only destroy a layer instance when no other instances depend on it.
To actually destroy the base
layer with ID default
, you must first destroy another_layer
running layerform kill elastic_stack another_layer
.
layerform kill base default
.
~/.layerform/config
file and use the same back-end. Make sure to also give everyone permissions to read and write from that bucket, and have their AWS credentials configured in their machines.