gcp stack output includes firewall
This commit is contained in:
parent
1e2ad899eb
commit
aa5e3a5640
|
@ -48,6 +48,9 @@ function gcp_get_stack() {
|
||||||
'&& { gcloud compute networks subnets list --filter="name:$N" | ' "sed --unbuffered s/^/Subnets..:\ /g ; } " \
|
'&& { 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 disks list --filter="name:$N" | ' "sed --unbuffered s/^/Disks....:\ /g ; } " \
|
||||||
'&& { gcloud compute instances list --filter="name:$N" | ' "sed --unbuffered s/^/Instances:\ /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}'"
|
[ $# -ge 2 ] && _cmd="watch -n${2} '${_cmd}'"
|
||||||
[[ -n ${SZ_DEBUG} ]] && printf "Executing: \n\t$_cmd\n\n"
|
[[ -n ${SZ_DEBUG} ]] && printf "Executing: \n\t$_cmd\n\n"
|
||||||
|
|
|
@ -90,10 +90,14 @@ if [[ -x $TERRAFORM_BIN ]]; then
|
||||||
echo "Could not find environment variables matching: $(echo "^TF_${PATTERN}")"
|
echo "Could not find environment variables matching: $(echo "^TF_${PATTERN}")"
|
||||||
} || {
|
} || {
|
||||||
unset $TOCLEAR
|
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() {
|
function clear-tf-env-vars() {
|
||||||
clear-tf-env 'VAR_[a-z]'
|
clear-tf-env 'VAR_[a-z]'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue