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 show does not do a pull of remote state #7050

Closed
rdgreen opened this issue Jun 7, 2016 · 4 comments
Closed

terraform show does not do a pull of remote state #7050

rdgreen opened this issue Jun 7, 2016 · 4 comments

Comments

@rdgreen
Copy link

rdgreen commented Jun 7, 2016

Affected Resource(s)

  • aws_ecs_cluster

Expected Behavior

ws_ecs_cluster.default:
id = arn:aws:ecs:eu-west-1:xxxxxxxxxxx:cluster/default
name = default

Actual Behaviour

No output

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. One one host, terraform apply
  2. On another host, terraform show

Important Factoids

tfstate is stored in S3.

References

Possibly related to #1810

@jen20
Copy link
Contributor

jen20 commented Jun 17, 2016

Hi @rdgreen! I think I agree that this is a bug, but need to chat with @phinze to confirm what the behaviour should be here. In the mean time you can do a terraform pull and then terraform show in order to get the latest state.

@phinze
Copy link
Contributor

phinze commented Jun 27, 2016

Hello! I agree that the behavior is surprising and I'm +1 for treating this like a bug, but this has been the behavior for quite some time now, so I'm going to remove the 0.7 tag here for now.

The terraform remote pull; terraform show combo is the proper workaround today.

The current behavior was set by past-me in the original implementation: #2371

Not a whole lot of extra context there - I think it was just an assumption that if you had remote state configured then it would also be pulled.

I think that fixing this is as terraform show do a RefreshState() call. I thought about adding some sort of terraform show -pull flag but I don't know if there's any reason to not refresh state, and we can always add in that flag later for people to run show on just the remote cache if we get reports of actual use cases.

@apparentlymart
Copy link
Contributor

Hi @rdgreen! Sorry for the problems here and sorry we let this languish for so long.

This issue did get fixed somewhere along the line, but I don't remember now exactly where. Most recently in version 0.9.0 we removed the concept of the local state cache altogether, so the remote state file is the only instance of the data for terraform show to pull from.

So while I can't be sure at what point this exact issue was fixed, I can say with some certainty that it will work as expected in 0.9 and above, and so I'm going to close this out. Thanks for raising this issue!

@ghost
Copy link

ghost commented Apr 14, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants