Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Provision S3 buckets for state management with Terraform
set -x
aws sts get-caller-identity --region eu-west-2
aws s3 ls
if aws s3 ls "s3://$AWS_PROFILE-tf-remote-state" 2>&1 | grep -q 'NoSuchBucket'; then
aws s3 mb s3://$AWS_PROFILE-tf-remote-state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment