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

terraform refresh should show output? #25

Closed
pearkes opened this issue Jul 19, 2014 · 6 comments · Fixed by #2347
Closed

terraform refresh should show output? #25

pearkes opened this issue Jul 19, 2014 · 6 comments · Fixed by #2347

Comments

@pearkes
Copy link
Contributor

pearkes commented Jul 19, 2014

Would be cool to see what has been refreshed after it completes.

@mitchellh
Copy link
Contributor

Hm, everything is refreshed but there is "diff" that is done. It would be cool to see this I imagine though.

@pearkes
Copy link
Contributor Author

pearkes commented Jul 20, 2014

Ah totally, as in what was updated in the state. Would definitely be good to see that.

@mitchellh
Copy link
Contributor

Whoops sorry I meant to say there is no diff that is done. But since the attributes in a ResourceState are map[string]string it would be pretty trivial to add a diffing feature to this.

@MrJoy
Copy link

MrJoy commented Jul 29, 2014

So, it seems that terraform refresh does not manage to discover existing resources that are described by the configuration. I.E. if I have an existing AWS account and I want to create a configuration that describes what's already there, refresh ignores those resources and then plan/apply wind up doing the wrong thing.

Am I missing something here? Also, how permanent is this state file supposed to be? Should it be versioned? Shouldn't it be possible to recreate it from scratch, for at least the purely-declarative stuff? Is it possible to use AWS tags to capture state information that would make collaborative manipulation of the infrastructure less error-prone?

@pearkes
Copy link
Contributor Author

pearkes commented Jul 29, 2014

@MrJoy You have a few questions, so answering individually:

I have an existing AWS account and I want to create a configuration that describes what's already there

Check out the recent mailing list post on the topic. Short answer: describing existing infra is coming.

Also, how permanent is this state file supposed to be?

Very permanent. State contains the only information about where your infrastructure is. It is how Terraform can manage resources. The most important thing in there is the type of resource and ID. Most everything else can be retrieved via the provider logic.

Is it possible to use AWS tags to capture state information that would make collaborative manipulation of the infrastructure less error-prone?

This is an important thing to think about. Right now, we recommend putting your Terraform configuration and state in version control (keeping in mind security concerns, that can be covered in a separate topic). VCS can make collaborative manipulation sane, as it does for code!

Leaving this open as the bug itself is still relevant.

@MrJoy
Copy link

MrJoy commented Jul 30, 2014

All good to know, thank you.

Given that the state is binary, how is collaboration meant to work in context of parallel operators? Will it be moving to a textual format to facilitate merging, or will there be tooling to handle this as, say, a git merge handler?

phinze added a commit that referenced this issue Jun 15, 2015
sarguru pushed a commit to sarguru/terraform that referenced this issue May 18, 2016
New exported attribute for nsone_zone resource: dns_servers
josephholsten added a commit that referenced this issue Sep 7, 2016
ultradns_probe_ping: add test for pool-level probe
@hashicorp hashicorp locked as resolved and limited conversation to collaborators Nov 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants