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

What are the different terraform plan symbol meanings? #14379

Closed
davidvuong opened this issue May 11, 2017 · 10 comments
Closed

What are the different terraform plan symbol meanings? #14379

davidvuong opened this issue May 11, 2017 · 10 comments

Comments

@davidvuong
Copy link

I've been using Terraform for over 7 months and I still don't fully understand the meaning behind some of the symbols in the output of terraform plan. Parts of the documentation reference some symbols, but not all.

  • + means to add
  • - means to destroy
  • -/+ destroy and then recreate with new changes
  • ~ means to change without destroying
  • <= (I'm not sure here)

Are there any others that I missed?

@apparentlymart
Copy link
Contributor

Good questions all, @davidvuong! Thanks for pointing out that this isn't documented well.

For now, here they are, until we get it included in the docs better:

  • + create
  • - destroy
  • -/+ replace (destroy and then create, or vice-versa if create-before-destroy is used)
  • ~ update in-place
  • <= read

The last one applies only to data resources. You won't see this one often, because whenever possible Terraform does reads during the refresh phase. You will see it, though, if you have a data resource whose configuration depends on something that we don't know yet, such as an attribute of a resource that isn't yet created. In that case, it's necessary to wait until apply time to find out the final configuration before doing the read.

@JDiPierro
Copy link
Contributor

Came here searching for the meaning of <= as well. I was getting it on a template_file which seemed really strange since I hadn't edited the file. I did, however, remove a variable from the vars section that wasn't actually used in the template. I re-added it an the <= went away.

@apparentlymart
Copy link
Contributor

In #15884 a symbol key was included directly into the terraform plan output, for more direct reference.

@rberlind
Copy link
Contributor

Hi @apparentlymart : could we add the content about the meaning of the different symbols in plan to our official docs somewhere? Maybe under https://www.terraform.io/docs/commands/plan.html ?

@apparentlymart
Copy link
Contributor

Hi @rberlind,

After we added it to the actual terraform plan output it felt redundant to also add it to the docs, since I think there's never a situation where the symbols are used in the UI without a definition alongside. Do you have a specific situation where it's important to refer to the symbols outside of the context of running terraform plan itself?

@rberlind
Copy link
Contributor

I think +, -, and -/+ are clear in the plan output, but I saw <= and did not really understand it. I think adding to the docs would be useful.

@apparentlymart
Copy link
Contributor

Ahh @rberlind, I think you're saying that the terse descriptions in the terraform plan output are not sufficient to fully explain what these mean, and you'd like to see a more detailed description in the docs. Is that right?

@rberlind
Copy link
Contributor

Yes. That is right. I would like to see the docs include all the possible output symbols and their meanings. The meanings you gave above, although terse, were basically enough, although one would probably add a few more words in official docs.

As soon as I saw "read", I then knew what the <= had meant for the resource in question.

@rberlind
Copy link
Contributor

Hi @apparentlymart

Apologies. I now see that the definitions of the symbols like + and <= are at the top of the plan. I don't think I had ever noticed them before. I think I had only seen them in front of actual resources.

Since the definitions are given, I supposed they don't absolutely have to be in our docs. But if someone had time to add it there too, it would be nice.

Roger

@ghost
Copy link

ghost commented Apr 6, 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 6, 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