Deploy Another App
We can provision more than one instance of the same Terraform component (with the same or different settings) into the same environment by defining many Atmos components that provide configuration for the Terraform component.
For example, the following config shows how to define two Atmos components, station/1
and station/2
, which both point to the same Terraform component components/terraform/weather
.
station/1
and station/2
naming convention doesn't have any inherent meaning. Atmos simply interprets them as two different strings. Feel free to use whatever format you prefer.stacks/deploy/dev.yaml
In this example, we've included more information than necessary to demonstrate the concept. For instance, we explicitly added inherits
to show how you can use multiple inheritance to merge multiple baseline configurations. We also specified the component path in both instances, even though it's already defined in the baseline configuration. This redundancy is just to emphasize that both are pointing to the same component.
Then we can execute the following atmos
commands to provision the two stations into the dev
environment:
# Provision the first weather station
atmos terraform apply station/1 -s dev
# Provision the second weather station
atmos terraform apply station/2 --stack dev
-s
flag to specify the stack name, or the long form --stack
. They both do the same thingSweet! You’ve just finished your first Atmos QuickStart tutorial. Now you're at a crossroads with two options: you can continue to the bonus materials for some extra credit, or dive deeper into the core concepts and learn the Atmos Fundamentals.