diff --git a/_home/dot_sz.shrc.d/32_gcp.shortcuts b/_home/dot_sz.shrc.d/32_gcp.shortcuts index 216ce19..c7a288a 100644 --- a/_home/dot_sz.shrc.d/32_gcp.shortcuts +++ b/_home/dot_sz.shrc.d/32_gcp.shortcuts @@ -48,6 +48,9 @@ function gcp_get_stack() { '&& { gcloud compute networks subnets list --filter="name:$N" | ' "sed --unbuffered s/^/Subnets..:\ /g ; } " \ '&& { gcloud compute disks list --filter="name:$N" | ' "sed --unbuffered s/^/Disks....:\ /g ; } " \ '&& { gcloud compute instances list --filter="name:$N" | ' "sed --unbuffered s/^/Instances:\ /g ; } " \ + '&& { gcloud compute network-firewall-policies get-effective-firewalls --network="$N-network"' \ + " | sed --unbuffered s/^/Firewall:\ /g ; } " \ + ) ;}" [ $# -ge 2 ] && _cmd="watch -n${2} '${_cmd}'" [[ -n ${SZ_DEBUG} ]] && printf "Executing: \n\t$_cmd\n\n" diff --git a/_home/dot_sz.shrc.d/33_terraform.shortcuts b/_home/dot_sz.shrc.d/33_terraform.shortcuts index a1b3f8f..3054556 100644 --- a/_home/dot_sz.shrc.d/33_terraform.shortcuts +++ b/_home/dot_sz.shrc.d/33_terraform.shortcuts @@ -90,10 +90,14 @@ if [[ -x $TERRAFORM_BIN ]]; then echo "Could not find environment variables matching: $(echo "^TF_${PATTERN}")" } || { unset $TOCLEAR - echo "Cleared the following vars: $TOCLEAR" + echo "Cleared the following vars: $(echo "$TOCLEAR" | xargs echo)" } } + function get-tf-env-plan() { + set | grep '^TF\(_\(VAR_[a-z]\)\|\([A-Z_]TARGET=\)\)' | grep '\b=' + } + function clear-tf-env-vars() { clear-tf-env 'VAR_[a-z]' }