Skip to content

Instantly share code, notes, and snippets.

@jch254
jch254 / credits.tf
Created March 8, 2026 02:15
Automate new AWS account free credits via Terraform
# ============================================================
# AWS Credits - Standalone Terraform
# Run locally to trigger the 5 Explore AWS credit activities.
#
# Usage:
# cd scripts/aws-credits
# terraform init
# terraform apply
# terraform destroy ← run once credits are awarded
#
echo "Exporting environment variables from env.variables section of $1"
export $(
cat "$1" |
shyaml get-values-0 env.variables |
while IFS='' read -r -d '' key && IFS='' read -r -d '' value; do
echo $key=$value
done
)