Usage:
Example of 'foo_bar' module in foo_bar.tf.
- list item 1
- list item 2
Even inline formatting in here is possible.
and some link
Usage:
Example of 'foo_bar' module in foo_bar.tf.
Even inline formatting in here is possible.
and some link
| # provide the s3 bucket as the first param | |
| export s3Bucket=${1:-bananananananana} | |
| # get repo name | |
| export repoName=$(git config --get remote.origin.url | cut -d '/' -f2 | cut -d '.' -f1) | |
| # get current directory | |
| export repoDir=$(git rev-parse --show-prefix | rev | cut -c 2- | rev) | |
| # create backend | |
| cat <<EOF > backend.tf | |
| terraform { | |
| required_version = ">=0.12" |
The AWS Cost Explorer tool cannot separate the S3 bucket resource expenditures by name so we can tag them with their own bucket name.
TODO: If possible, convert to a cloud custodian policy.
wget https://gist.githubusercontent.com/nitrocode/b6da03f103f3a0b42220c6fd057102f6/raw/tag-buckets.sh
chmod +x tag-buckets.sh
./tag-buckets.sh| #!/usr/bin/osascript | |
| (* | |
| author: nitrocode | |
| source: https://gist.github.com/nitrocode/559f1717ee5d610c3548b3e056b84e5e | |
| Leave this commented block in case this file is ever updated or forked so it will be easier to update and audit in the future. | |
| *) | |
| tell application "System Events" | |
| (* kill cato *) | |
| set theID to (unix id of processes whose name is "CatoClient") |
| #!/usr/bin/env python3 | |
| # Currently works for 0.12.x | |
| # | |
| # TODO: | |
| # - use json output instead of stdout | |
| # | |
| # Usage: | |
| # terraform plan > plan.out | |
| # python terraform-import-statement-guesser.py plan.out | |
| import sys |
Currently only finds terraform plan changes
terraform plan -out=terraform.tfplan
terraform show -no-color -json terraform.tfplan > terraform.tfplan.json
python find-tf-changes.py terraform.tfplan.json
Would be nice to bake this directly into Terraform or into Landscape
Create SQS message JSON by feeding in the policy yml, giving the policy name if there are multiple policies, and giving it the location of the output directory so it can read the resources.json file.
python sqs-message-json.py \
policies/ebs-garbage-collect.yml \
--policy ebs-mark-unattached-deletion \
--output-dir out > sqs-ebs-garbage-collect.json