Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backend configs for terraform remote state storage #561

Merged
merged 6 commits into from
Aug 2, 2021

Conversation

sgibson91
Copy link
Member

@sgibson91 sgibson91 commented Jul 28, 2021

This PR adds a backend config files for terraform that points to various buckets stored in Google projects. This is particularly useful when working on projects we don't have access to via our 2i2c accounts (e.g., Columbia/Pangeo) as we avoid having to work with multiple authentications.

To use a backend file, run:

terraform init -backend-config=backends/NAME_OF_FILE.hcl

Our default remote storage can be configured by

terraform init -backend-config=backends/default-backend.hcl

Remote storage for Pangeo can be configured by

terraform init -backend-config=backends/pangeo-backend.hcl

The -reconfigure option may be required.

fixes #560

@sgibson91 sgibson91 requested a review from yuvipanda July 28, 2021 14:14
@yuvipanda
Copy link
Member

This is awesome!

Can you add a blurb to the docs too?

@sgibson91
Copy link
Member Author

Yes, will do! I'll also add the config for our default backend as discussed in Slack tomorrow :)

@sgibson91 sgibson91 changed the title Add backend config for terraform remote state storage in columbia project Add backend configs for terraform remote state storage Jul 29, 2021
@sgibson91
Copy link
Member Author

@2i2c-org/tech-team can we all check this PR please? It changes how we initialise terraform so we can dynamically choose backends for terraform state storage

@yuvipanda yuvipanda merged commit 84d7479 into 2i2c-org:master Aug 2, 2021
@yuvipanda
Copy link
Member

Thanks a lot, @sgibson91! This is sweeeet!

@sgibson91 sgibson91 deleted the dynamic-backend branch August 5, 2021 10:23
@damianavila
Copy link
Contributor

This is great @sgibson91, thanks!!

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.

Terraform remote state backends: Dynamic configuration implementation and storage
3 participants