diff --git a/infra/host/host.tf b/infra/host/host.tf index 7f40245..80e721b 100644 --- a/infra/host/host.tf +++ b/infra/host/host.tf @@ -58,7 +58,7 @@ resource "aws_instance" "host" { } output "public_ips" { - value = "${join(\",\", aws_instance.node.*.public_ip)}" + value = "${join(\",\", aws_instance.host.*.public_ip)}" } output "name" { diff --git a/module/cell.bash b/module/cell.bash index a8568f2..b18e0d7 100644 --- a/module/cell.bash +++ b/module/cell.bash @@ -18,6 +18,7 @@ init() { cmd-export cell-plan plan cmd-export cell-destroy destroy cmd-export cell-output output + cmd-export cell-taint taint cmd-export cell-bake bake } @@ -28,7 +29,8 @@ coreos-ami() { user-ami() { declare region="$1" name="$2" - aws ec2 --region "$region" \ + aws --output json \ + ec2 --region "$region" \ describe-images \ --owners self \ --filters "Name=name,Values=$name" \ @@ -38,7 +40,7 @@ user-ami() { cell-rundir() { if [[ ! "$cell_rundir" ]]; then mkdir -p "$GUN_ROOT/.gun/runs" - cell_rundir="$(ls -1Ut $GUN_ROOT/.gun/runs/ | grep "$GUN_PROFILE-" | head -n 1)" + cell_rundir="$GUN_ROOT/.gun/runs/$(ls -1Ut $GUN_ROOT/.gun/runs/ | grep "$GUN_PROFILE-" | head -n 1)" fi echo "${cell_rundir:?}" } @@ -89,6 +91,17 @@ cell-output() { popd > /dev/null } +cell-taint() { + declare name="$1" target="$2" + if [[ ! "$target" ]]; then + target=".cell" + fi + pushd "$(cell-rundir)/$target" > /dev/null + # XXX include additional options + terraform taint $name + popd > /dev/null +} + #cell-init() { # local stack_dir="$(dirname $BASH_SOURCE)/stack" # cp -r $stack_dir/* .