https://github.com/ryanshepps/terraform-gcs-bootstrap
Creates the minimum resources for a GCS project so that a Terraform project can be linked to it.
https://github.com/ryanshepps/terraform-gcs-bootstrap
Last synced: 3 months ago
JSON representation
Creates the minimum resources for a GCS project so that a Terraform project can be linked to it.
- Host: GitHub
- URL: https://github.com/ryanshepps/terraform-gcs-bootstrap
- Owner: ryanshepps
- Created: 2022-09-21T14:10:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T14:44:08.000Z (over 2 years ago)
- Last Synced: 2025-01-27T06:44:02.847Z (4 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Terraform Google Cloud Service Bootstrap
Opinionated Google Cloud Service project initialization setup for service account impersonation. [Why use service account impersonation for on a GCP for terraform?](https://cloud.google.com/iam/docs/best-practices-service-accounts)
**What will this do?**
- A **Cloud Storage** bucket which should be used by your Terraform backend to hold the terraform state.
- A **Service Account** for Terraform to impersonate and access resources or perform actions as.
- Add **necessary roles to your user account** to facilitate Terraform's impersonation of the service account.## Prerequisites
You must have the [`gcloud`](https://cloud.google.com/sdk/docs/install) CLI installed on your system. This project was last tested with these gcloud versions:
```
Google Cloud SDK 402.0.0
alpha 2022.09.12
beta 2022.09.12
bq 2.0.75
bundled-python3-unix 3.9.12
config-connector 1.93.0
core 2022.09.12
gcloud-crc32c 1.0.0
gsutil 5.13
```A project must already be created in GCS.
## Usage
```bash
./bootstrap.sh GOOGLE_CLOUD_PROJECT_ID
```