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

depends_on field in terraform.tfstate changes order arbitrarilly #928

Closed
bitglue opened this issue Feb 4, 2015 · 3 comments
Closed

depends_on field in terraform.tfstate changes order arbitrarilly #928

bitglue opened this issue Feb 4, 2015 · 3 comments

Comments

@bitglue
Copy link

bitglue commented Feb 4, 2015

@@ -16,8 +16,8 @@
                 "aws_instance.coreos.0": {
                     "type": "aws_instance",
                     "depends_on": [
-                        "aws_security_group.coreos",
-                        "aws_subnet.core"
+                        "aws_subnet.core",
+                        "aws_security_group.coreos"
                     ],
                     "primary": {
                         "id": "i-f3c30209",
Stage this hunk [y,n,q,a,d,/,K,j,J,g,e,?]? 

I'm guessing these are written in whatever order the graph happens to be walked in or something, so changes to the configuration can reorder them. It would be nice if they were written in a canonical order to cut down on the diff noise.

@mitchellh
Copy link
Contributor

Looks good, we might as well just sort these in alphabetical. The ordering here doesn't actually matter, its just a set.

@mitchellh
Copy link
Contributor

Fixed.

@phinze I pushed directly to master since its trivial.

catsby added a commit that referenced this issue Feb 18, 2015
* master: (38 commits)
  update CHANGELOG
  helper/schema: update test desc
  helper/schema: default the new value to zero only for the decode
  helper/schema: failing test
  update CHANGELOG
  terraform: sort dependencies of resource state [GH-928]
  helper/schema: diff with set going to 0 elements removes it from state
  helper/schema: fix test index
  helper/schema: add test for sets
  helper/schema: diff of zero value in state with lack of value should not diff
  adding documentation
  update CHANGELOG
  update CHANGELOG
  update CHANGELOG
  Update CHANGELOG
  Update CHANGELOG
  Add missing preposition.
  Fill in missing outputs in modules.html.md.
  Make Google Instance disk attribute all ForceNew. Fix #608.
  Revert "Add Azure provider"
  ...
yahyapo pushed a commit to yahyapo/terraform that referenced this issue Mar 13, 2015
@ghost
Copy link

ghost commented May 4, 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 May 4, 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

2 participants