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: orphan dependencies should be inverted #2453

Merged
merged 1 commit into from
Jun 24, 2015
Merged

Conversation

mitchellh
Copy link
Contributor

Fixes #2363

This is a weird-ish one. I'm not sure when this regression happened actually but it feels... old. Like, I think this might be back from the original graph refactor...

Anyways, when an orphan depends on another orphan, the dependencies should be inverted. We do this all within the framework of the existing DestroyTransformer but having the nodes implement GraphNodeDestroyable.

The only weird thing is we had to add an edge case handler for if the destroy node equals the creation node (in transform_destroy.go). I've commented this to note what is going on.

t.Fatalf("bad: %s", actual)
}
}

/*
TODO: This exposes a really bad bug we need to fix after we merge
the f-ast-branch. This bug still exists in master.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment looks ominous. 😐

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, we've talked about this before. It has been commented since that marge... hasn't caused problems yet... but we keep it around to figure out what it is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someday! 😀

@phinze
Copy link
Contributor

phinze commented Jun 24, 2015

LGTM!

mitchellh added a commit that referenced this pull request Jun 24, 2015
terraform: orphan dependencies should be inverted
@mitchellh mitchellh merged commit 148a84c into master Jun 24, 2015
@mitchellh mitchellh deleted the b-orphan-deps branch June 24, 2015 17:31
@ghost
Copy link

ghost commented May 2, 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 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting two resources via apply does not respect dependencies
2 participants