IAC examples with terraform.
Setup buckets for state files which are needed to run from github.
# Example (terraform-state-$project-$environment)
aws s3 mb s3://terraform-state-php-dev
aws s3api put-bucket-versioning --bucket terraform-state-php-dev --versioning-configuration Status=Enabled
# no longer needed since the s3 provider can now create lock files with s3 partial write
aws dynamodb create-table \
--table-name terraform-lock-${project}-${env} \
--attribute-definitions AttributeName=LockID,AttributeType=S \
--key-schema AttributeName=LockID,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5