This script will pull down an S3 remote configuration before running any terraform actions. Assumes the following structure:
main.tf
terraform.cfg
env/dev/vars
env/staging/vars
env/whatever/vars
env/whatever/somefile.tf
This script will pull down an S3 remote configuration before running any terraform actions. Assumes the following structure:
main.tf
terraform.cfg
env/dev/vars
env/staging/vars
env/whatever/vars
env/whatever/somefile.tf
JSON is very standard. YAML, a superset of JSON, is very readable. Got something that needs JSON, and want to write the input in YAML? Use yaml2json
. Have JSON and want to view it in a more readable format? Use json2yaml
.
Use with files or stdin/stdout. Pretty-print the JSON if you want.
Requires pyyaml
(via pip
or easy_install
), aka the python-yaml
Ubuntu package.
A version of these files is available at tinyurl/json2yaml and tinyurl.com/yaml2json for you to wget
or curl -L
On a mac, `brew install awscli gnu-sed` before. | |
streamname=staging;aws kinesis describe-stream --stream-name $streamname --output text | grep SHARDS | awk '{print $2}' | while read shard; do aws kinesis get-shard-iterator --stream-name $streamname --shard-id $shard --shard-iterator-type LATEST --output text | while read iterator; do while output=`aws kinesis get-records --shard-iterator $iterator --output text`; do iterator=`echo "$output" | head -n1`; echo "$output" | gsed 1d | grep RECORDS | while read record; do echo $record | awk '{print $2}' | base64 -D; done; done; done; done |