Commit Graph

8602 Commits

Author SHA1 Message Date
Paul Hinze e76fdb92e7 core: fix bug detecting deeply nested module orphans
Context:

As part of building up a Plan, Terraform needs to detect "orphaned"
resources--resources which are present in the state but not in the
config. This happens when config for those resources is removed by the
user, making it Terraform's responsibility to destroy them.

Both state and config are organized by Module into a logical tree, so
the process of finding orphans involves checking for orphaned Resources
in the current module and for orphaned Modules, which themselves will
have all their Resources marked as orphans.

Bug:

In #3114 a problem was exposed where, given a module tree that looked
like this:

```
root
 |
 +-- parent (empty, except for sub-modules)
       |
       +-- child1 (1 resource)
       |
       +-- child2 (1 resource)
```

If `parent` was removed, a bunch of error messages would occur during
the plan. The root cause of this was duplicate orphans appearing for the
resources in child1 and child2.

Fix:

This turned out to be a bug in orphaned module detection. When looking
for deeply nested orphaned modules, root.parent was getting added twice
as an orphaned module to the graph.

Here, we add an additional check to prevent a double add, which
addresses this scenario properly.

Fixes #3114 (the Provisioner side of it was fixed in #4877)
2016-02-09 10:35:46 -06:00
Paul Hinze d7db52e17d Update CHANGELOG.md 2016-02-05 12:44:22 -06:00
Paul Hinze 0846e32e21 Merge pull request #4877 from svanharmelen/b-provisioner-graphing
core: fix the provisioner graphing
2016-02-05 12:39:19 -06:00
James Nugent c50fc68997 Update CHANGELOG.md 2016-02-05 12:54:18 -05:00
James Nugent f57ce437cb Merge pull request #5013 from stack72/azurerm-dns-recordsets
provider/azurerm: DNS RecordSets
2016-02-05 12:53:22 -05:00
stack72 6b5e5710c8 provider/azurerm: Add DNS CName Record Resource 2016-02-05 12:51:33 +00:00
stack72 1357f150a5 provider/azurerm: Add AzureRM AAAA DNS Record resource 2016-02-05 12:14:09 +00:00
stack72 761308cd2a provider/azurerm: Add the DNS A Record Resource 2016-02-05 11:28:48 +00:00
James Nugent 57836e0072 Update CHANGELOG.md 2016-02-04 19:17:17 -05:00
James Nugent d5601a41d1 Merge pull request #5003 from stack72/azurerm-sql-database
provider/azurerm: Add azurerm_sql_database resource
2016-02-04 19:16:39 -05:00
James Nugent 4376754c03 Merge pull request #5005 from richburroughs/master
fixed typo in AWS docs, export was misspelled
2016-02-04 19:02:20 -05:00
Rich Burroughs cb537e9d7d fixed typo in AWS docs, export was misspelled 2016-02-04 15:43:42 -08:00
stack72 d89088246c provider/azurerm: Adding azurerm_sql_database resource 2016-02-04 23:36:50 +00:00
Clint 5f1afa3e10 Merge pull request #4997 from hashicorp/f-use-acctest-randint
Switch to acctest.RandInt for acceptance tests
2016-02-04 15:49:36 -06:00
clint shryock 52f3e9b8db update provider test and extend the delete timelimit 2016-02-04 15:48:54 -06:00
Sander van Harmelen 1bec11472a Cleaning up the PruneProvisionerTransformer
And renamed some types so they better reflect what they are for.
2016-02-04 21:32:10 +01:00
clint shryock 840d2e7ccc Switch to acctest.RandInt for acceptance tests 2016-02-04 11:20:22 -06:00
James Nugent b35a19a8f7 Update CHANGELOG.md 2016-02-04 12:00:00 -05:00
James Nugent 2d56c8f436 Merge pull request #4991 from stack72/azurerm-sql-server
provider/azurerm: sql server resource
2016-02-04 11:59:17 -05:00
Paul Hinze 9ba761cbae Merge pull request #4994 from hashicorp/phinze/fix-heroku-cert-test
provider/heroku: address cert test failure
2016-02-04 10:25:58 -06:00
Paul Hinze 97bae0ea30 provider/heroku: address cert test failure
* Randomize app name in test
 * Return error and don't panic when there is a problem

It's possible there may still be an underlying problem that caused the
error that made the cert leak in the first place - this should help us
diagnose it.
2016-02-04 09:58:27 -06:00
stack72 4ef557bed7 deps: Update jen20/riviera 2016-02-04 10:02:58 +00:00
stack72 f6bee13bd4 Scaffold the Sql Server AzureRM Resource 2016-02-03 23:08:56 +00:00
James Nugent 316d4734ee provider/azure: Fix destroy check in acctest 2016-02-03 17:11:36 -05:00
Paul Stack cd78db31b7 Update CHANGELOG.md 2016-02-03 19:52:17 +00:00
Paul Stack 255be73ebf Merge pull request #4979 from hashicorp/f-azurerm-dns-zone
provider/azurerm: Add `azurerm_dns_zone` resource
2016-02-03 19:43:04 +00:00
James Nugent 0340ea7235 deps: Update GoDeps to reflect hashicorp/hil 2016-02-03 13:26:12 -05:00
Mitchell Hashimoto 4576eaa966 helper/schema: replace config/lang 2016-02-03 13:24:04 -05:00
Mitchell Hashimoto 55a9b1ba4c helper/diff: replace ocnfig/lang 2016-02-03 13:24:04 -05:00
Mitchell Hashimoto aaf1302ce8 providers/template: don't use config/lang 2016-02-03 13:24:04 -05:00
Mitchell Hashimoto 8be4afacf8 terraform: replace config/lang usage 2016-02-03 13:24:04 -05:00
Mitchell Hashimoto 09409a1a2b vendor hashicorp/hil 2016-02-03 13:24:04 -05:00
Mitchell Hashimoto 5f3de02fa9 remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
James Nugent a51e84cafb Merge pull request #4976 from moofish32/b_update_launch_config_doc
provider/aws: Placement Tenancy Missing from Launch Config Docs
2016-02-03 13:21:38 -05:00
James Nugent c1eceb82ee Merge pull request #4980 from hashicorp/b-asm-acceptance-test-randomization
provider/azure: Randomize name in acceptance tests
2016-02-03 13:19:05 -05:00
James Nugent 295bb897f2 provider/azurerm: Use separate "if" over "else if" 2016-02-03 13:16:36 -05:00
James Nugent ef350af219 provider/azure: Randomize name in acceptance tests
This should address the failures seen in Travis Build Run #8774. It is
likely there are others which also need addressing - they will be
addressed on a case-by-case basis as they come up.
2016-02-03 13:11:47 -05:00
James Nugent e968343871 provider/azurerm: Add jen20/riviera dependency 2016-02-03 13:00:55 -05:00
Mike Cowgill c7118eff24 updating launch_configuration aws documentation to include the placement_tenancy argument 2016-02-03 09:00:16 -08:00
Paul Stack 1421d4ce18 provider/azurerm: Add `azurerm_dns_zone` resource
This resource is the first which makes use of the new Riviera library
(at https://github.com/jen20/riviera), so there is some additional set
up work to add the provider to the client which gets passed among
resources.
2016-02-02 19:53:00 -05:00
Joe Topjian 8c8b39d15d Update CHANGELOG.md 2016-02-02 16:22:42 -07:00
Joe Topjian 44970d4490 Merge pull request #4966 from jtopjian/openstack-fix-access-network
provider/openstack: Fix crash when access_network was not defined
2016-02-02 16:21:41 -07:00
James Nugent 6baf622418 Update CHANGELOG.md 2016-02-02 18:21:12 -05:00
James Nugent 5748487af9 Merge pull request #4965 from dharrisio/fix-diffs-didnt-match-during-apply
core: "diffs didn't match during apply" error message.
2016-02-02 18:19:25 -05:00
Joe Topjian 7ccaaa12be provider/openstack: Fix crash when access_network was not defined 2016-02-02 22:59:16 +00:00
David Harris d95ab75565 Added EvalIgnoreChanges on diffApply. 2016-02-02 15:23:25 -07:00
Paul Hinze bb4c58a683 Merge pull request #4957 from hashicorp/phinze/update-deps-using-recent-godep
deps: Capture deps w/ latest version of godep
2016-02-02 15:03:13 -06:00
Paul Hinze 872371d21d deps: Capture deps w/ latest version of godep
Previous deps merge had been captured by an older version of godep,
updating godep and rerunning...

    godep save $(go list ./... | grep -v /vendor/)

...yielded this diff.

New `godep` also produced a warning to pin to the major Go version
instead of the minor one, which we do here as well.
2016-02-02 12:32:03 -06:00
Paul Hinze 3b51ccf711 Merge pull request #4956 from hashicorp/phinze/better-acctest-check-error
providers: Mention check number when acctest fails
2016-02-02 11:08:39 -06:00
Paul Hinze 24048b4dca providers: Mention check number when acctest fails 2016-02-02 10:57:28 -06:00