Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def wrap = { fn->
}
}

final Long XOR_CONST = 3735928559 // 0xdeadbeef
final Long XOR_CONST = 4919 // 0x1337 see https://en.wikipedia.org/wiki/Leet
(captcha_problem, captcha_hash) = get_captcha(XOR_CONST)

/** Gather properties from user parameters */
Expand Down
11 changes: 10 additions & 1 deletion bin/terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ EOF
# http://redsymbol.net/articles/bash-exit-traps/
trap clean_root_owned_docker_files EXIT

function import() {
local -i retcode
#shellcheck disable=SC2086
$DOCKER_TERRAFORM import "$@"
}

function show() {
local -i retcode
#shellcheck disable=SC2086
Expand Down Expand Up @@ -173,8 +179,11 @@ show)
output)
Message="Executing terraform output."
;;
import)
Message="Executing terraform import."
;;
*)
echo 'Unrecognized verb "'"$verb"'" specified. Use plan, plan-destroy, apply, or show' 1>&2
echo 'Unrecognized verb "'"$verb"'" specified. Use apply, plan, plan-destroy, import, output or show' 1>&2
exit 1
;;
esac
Expand Down
3 changes: 2 additions & 1 deletion terraform/newrelic.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ provider "newrelic" {

# Create an alert policy
resource "newrelic_alert_policy" "alert" {
name = "Alert"
name = "Alert"
count = "${length(var.newrelic_apm_entities) > 0 ? (var.newrelic_alerts ? 1 : 0) : 0}"
}

# Add a condition
Expand Down