atmos.yaml1.9 KB
View on GitHub# atmos:template
# Atmos configuration for [[ .Config.project_name ]] (GCP landing zone).
# https://atmos.tools/cli/configuration
base_path: "./"
components:
terraform:
command: [[ .Config.terraform_command ]]
base_path: "components/terraform"
apply_auto_approve: false
deploy_run_init: true
init_run_reconfigure: true
auto_generate_backend_file: false
stacks:
base_path: "stacks"
included_paths:
- "**/*"
excluded_paths:
- "**/_defaults.yaml"
name_template: "{{ .vars.stage }}"
auth:
identities:
local:
kind: gcp/emulator
emulator: gcp
default: true
# Real GCP instead of the local emulator: run `gcloud auth
# application-default login` once, uncomment this identity and the
# provider below it, and run with `--identity gcp` -- or move
# `default: true` here once configured.
# https://atmos.tools/cli/commands/auth
# gcp:
# kind: gcp/project
# via:
# provider: gcp-adc
# principal:
# project_id: "[[ .Config.gcp_project ]]"
# region: "[[ .Config.region ]]"
# providers:
# gcp-adc:
# kind: gcp/adc
logs:
file: "/dev/stderr"
level: Info
commands:
- name: test
description: Validate stacks, then provision and destroy every environment on the local emulator.
steps:
- atmos validate stacks
- atmos emulator up gcp -s dev
- atmos terraform apply --all -s dev -auto-approve
- atmos terraform destroy --all -s dev -auto-approve
- atmos emulator down gcp -s dev
- atmos emulator up gcp -s staging
- atmos terraform apply --all -s staging -auto-approve
- atmos terraform destroy --all -s staging -auto-approve
- atmos emulator down gcp -s staging
- atmos emulator up gcp -s prod
- atmos terraform apply --all -s prod -auto-approve
- atmos terraform destroy --all -s prod -auto-approve
- atmos emulator down gcp -s prod