Skip to content

Instantly share code, notes, and snippets.

@dvishniakov
dvishniakov / output.tf
Created April 13, 2018 18:32
Running an empty destroy with an interpolated output in module fails
2018/04/13 18:25:25 [INFO] Terraform version: 0.11.7 41e50bd32a8825a84535e353c3674af8ce799161
2018/04/13 18:25:25 [INFO] Go runtime version: go1.10.1
2018/04/13 18:25:25 [INFO] CLI args: []string{"/bin/terraform", "apply", "-input=false", "terraform.plan"}
2018/04/13 18:25:25 [DEBUG] Attempting to open CLI config file: EDITED
2018/04/13 18:25:25 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/04/13 18:25:25 [INFO] CLI command args: []string{"apply", "-input=false", "terraform.plan"}
2018/04/13 18:25:25 [INFO] command: initializing local backend from plan (not set)
2018/04/13 18:25:25 [DEBUG] checking for provider in "."
2018/04/13 18:25:25 [DEBUG] checking for provider in "/bin"
2018/04/13 18:25:25 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
#!/usr/bin/env bash
#from https://gist.github.com/dvishniakov/86c83ef891d200674522c791589d42b3
# Provides stack trace when error occurs or when manually called
# $1 is message
# $2 is command
# ${ContinueOnErrors} controls whether to continue or stop script if error is catched.
# it helps during batch processing. -o errexit/errtrace also affects this
errexit() {
local errno=$? # non-zero when this function is called via trap