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