Skip to content

Configure remote state for terraform#19

Merged
phargogh merged 4 commits intomainfrom
feature/10
Mar 2, 2026
Merged

Configure remote state for terraform#19
phargogh merged 4 commits intomainfrom
feature/10

Conversation

@emlys
Copy link
Copy Markdown
Member

@emlys emlys commented Mar 2, 2026

Fixes #10

This PR configures terraform to read state data from a GCS bucket rather than a local file. I created a bucket called invest_compute_terraform_state for this purpose. The bucket itself is not defined in terraform because that would create a chicken-and-egg problem. I confirmed that I can now set up another terraform working directory and it will read the remote state and recognize the existing infrastructure. This will be critical for having multiple developers collaborate on the project.

@@ -0,0 +1,17 @@
# Explicitly set the billing (quota) project
# https://github.com/hashicorp/terraform-provider-google/issues/24500
provider "google" {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not directly related to the remote state setup, but it's another piece of configuration I realized is necessary for each developer to set up.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah of course this would be needed, that makes perfect sense. So then longer term for enabling others to just take the terraform config and run with it, maybe we should use some kind of templating/cookiecutter sort of approach?

@emlys emlys requested a review from phargogh March 2, 2026 19:42
@emlys emlys self-assigned this Mar 2, 2026
Copy link
Copy Markdown
Member

@phargogh phargogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me! Thanks @emlys !

@@ -0,0 +1,17 @@
# Explicitly set the billing (quota) project
# https://github.com/hashicorp/terraform-provider-google/issues/24500
provider "google" {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah of course this would be needed, that makes perfect sense. So then longer term for enabling others to just take the terraform config and run with it, maybe we should use some kind of templating/cookiecutter sort of approach?

@phargogh phargogh merged commit b075398 into main Mar 2, 2026
2 checks passed
@emlys emlys deleted the feature/10 branch March 4, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up terraform remote state

2 participants