Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Add docs for Terraform remote state #30

Open
sehqlr opened this issue Feb 18, 2016 · 6 comments
Open

Add docs for Terraform remote state #30

sehqlr opened this issue Feb 18, 2016 · 6 comments
Assignees
Labels

Comments

@sehqlr
Copy link

sehqlr commented Feb 18, 2016

A question about support for terraform remote state came up in the mantl gitter channel. As of right now, terraform doesn't support loading in remote tfstate files. Should it? And if the answer to that question is no, should we add some documentation to the README about how to use remote state files in the workflow?

@BrianHicks
Copy link
Contributor

It could. When Terraform uses remote state storage, it stores a local copy in .terraform/terraform.tfstate or similar. That seems a bit like a hack to use though, no guarantee that it'd be there.

@sehqlr
Copy link
Author

sehqlr commented Jul 27, 2016

I was looking at this question again, and Terraform syncs remote and local state, so we don't need to support this explicitly. We should add documentation for loading in the remote state directly with --root, though

@sehqlr sehqlr self-assigned this Aug 9, 2016
@sean-abbott
Copy link
Collaborator

I believe terraform does not necessarily include all of the state locally anymore (at least past 0.9.0). In order to deal with that, as well as a few other things, I've made the changes now merged into master on my fork (https://github.com/sean-abbott/terraform.py)

If you'd like to take it for a spin and see if it works for you, I'd appreciate it. Note the differences in installation, and that the tool is now called "ati" for "ansible terraform inventory".

@abra7134
Copy link

I think for support of remote storages better to use the 'terraform state pull' command which receives the current .tfstate not important local it or remote.

@sean-abbott
Copy link
Collaborator

fair point.

@sean-abbott
Copy link
Collaborator

So...I've updated the PR to use terraform state pull instead of any kind of manual remote fetching, with an option to fall back on the old reading of the local files. What do you think?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants