From 20e9ec68d287892960eaeefa1352cf1d01bf1d87 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Wed, 5 Apr 2023 01:52:45 -0400 Subject: [PATCH] Improve docs on cloud playbook --- skylab/infra/playbooks/cloud.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/skylab/infra/playbooks/cloud.yml b/skylab/infra/playbooks/cloud.yml index 19b9df6..9577f4b 100644 --- a/skylab/infra/playbooks/cloud.yml +++ b/skylab/infra/playbooks/cloud.yml @@ -14,6 +14,11 @@ suffix: tfplan register: _tfplan_tempfile + # Generating a plan file before yeeting a deployment into the + # wind helps to ensure that the syntax is correct, backend and + # state are valid, and all the plumbing is working as expected. + # We don't want errors when we deploy, so it's better to + # generate the plan first - name: Initialize terraform backend and generate plan file community.general.terraform: state: planned @@ -24,6 +29,8 @@ init_reconfigure: true plan_file: "{{ _tfplan_tempfile.path }}" + # TODO: update to take DO token from invocation args rather than + # implicit env var - name: Apply terraform plan community.general.terraform: state: present