Last active
October 20, 2023 17:28
-
-
Save Jojoooo1/639795f1a16daaa14178bbf389a54712 to your computer and use it in GitHub Desktop.
Create a GCS bucket for terraform state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PROJECT_ID="<project-id>" | |
rand="$(echo $RANDOM)" | |
gsutil mb -p $PROJECT_ID -l us -b on "gs://tf-state-$rand" | |
gsutil versioning set on "gs://tf-state-$rand" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment