Commit Graph

16843 Commits

Author SHA1 Message Date
Manuwela Kanade 0942aed7a3 provider/consul: catalog entry service id should default to service name 2017-02-08 09:43:00 +00:00
Mitchell Hashimoto 8ed9bdfedc
terraform: node referenceable name from state shuldn't contain path
Fixes #11749

I'm **really** surprised this didn't come up earlier.

When only the state is available for a node, the advertised
referenceable name (the name used for dependency connections) included
the module path. This module path is automatically prepended to the
name. This means that probably every non-root resource for state-only
operations (destroys) didn't order properly.

This fixes that by omitting the path properly.

Multiple tests added to verify both graph correctness as well as a
higher level context test.

Will backport to 0.8.x
2017-02-07 20:14:38 -08:00
Dana Hoffman a3ca05a3c9 provider/google: always set additional_zones on read 2017-02-07 19:21:00 -08:00
Mitchell Hashimoto af61d566c2
terraform: passing test for destroy edge for module only
Just adding passing tests as a sanity check for a bug.
2017-02-07 19:12:03 -08:00
Brian Cervenka abfd108fbb Minor fix to the triton_machine provider. The docs referred to a `networks` option, which seems to be deprecated. Now, terraform seems to expect a list of maps, which will detail each network interface. 2017-02-07 17:28:26 -08:00
Mitchell Hashimoto ac3d67e40f
terraform: remove old logging line 2017-02-07 16:28:01 -08:00
James Bardin 197f6cab79 Cannot store multiple types in atomic.Value
Storing error values to atomic.Value may fail if they have different
dynamic types. Wrap error value in a consistent struct type to avoid
panics.

Make sure we return a nil error on success
2017-02-07 19:02:04 -05:00
James Bardin 65abe98047 Remove lock command and rename lock/force-unlock
Remove the lock command for now to avoid confusion about the behavior of
locks. Rename lock to force-unlock to make it more aparent what it does.

Add a success message, and chose red because it can be a dangerous
operation.

Add confirmation akin to `destroy`, and a `-force` option for
automation and testing.
2017-02-07 18:28:48 -05:00
James Bardin ced4c53324 Merge pull request #11757 from hashicorp/jbardin/GH-11588
Make sure to diff all nested schema.Set elements
2017-02-07 17:05:32 -05:00
Mitchell Hashimoto 34227e5a9c
vendor: update go-getter for #11438 2017-02-07 14:00:38 -08:00
James Bardin 7359a18a71 Make sure to diff all nested schema.Set elements
This follows on GH-11498, using the same method to ensure all set
elements are marked as NewRemoved if the set is being removed in the
diff.
2017-02-07 16:55:20 -05:00
Mitchell Hashimoto 3cccb8f61d Merge pull request #11756 from hashicorp/b-warnings
backend/local: output warnings
2017-02-07 13:31:46 -08:00
Mitchell Hashimoto bdca9bffe4
backend/local: output warnings
Fixes #11628

This is a simple fix to output warnings. I originally forgot to do this
since the local backend didn't have a CLI UI at the time. It does now so
this is an easy fix.
2017-02-07 13:22:28 -08:00
Mitchell Hashimoto a612b43987 Merge pull request #11657 from hashicorp/f-dynamic-walk
dag: new walker, supports walk-time updates
2017-02-07 12:59:17 -08:00
Mitchell Hashimoto 7192c1a9a1 Merge pull request #11732 from hashicorp/b-diff-map-removal
terraform: ignore RequiresNew for collection removal in diff.Same
2017-02-07 12:58:15 -08:00
Mitchell Hashimoto e7aa1fd48d Merge pull request #11733 from hashicorp/b-disable-shadow
terraform: default shadow to false
2017-02-07 12:57:46 -08:00
Mitchell Hashimoto b282dbc578 Merge pull request #11753 from hashicorp/b-cbd-count
core: non-CBD depending on CBD won't depend on destroy
2017-02-07 12:55:59 -08:00
Mitchell Hashimoto ac934cf003
terraform: add one more forgotten ordering assertion 2017-02-07 12:01:27 -08:00
Mitchell Hashimoto a765740827
terraform: CBD destroy nodes should not advertise themselves as normal 2017-02-07 11:49:50 -08:00
Jake Champlin 28b9f3f8fb Merge pull request #11744 from hashicorp/b-fix-db-event-import
provider/aws: Fix aws_db_event_subscription import
2017-02-07 14:40:41 -05:00
Dana Hoffman 260e803880 providers/google: disallow specifying the original zone in additional_zones, change field to computed 2017-02-07 11:02:02 -08:00
Mitchell Hashimoto 44233441c2
terraform: CBD edge should ignore "index" 2017-02-07 10:53:12 -08:00
Jake Champlin f7724da063 Merge pull request #11751 from hashicorp/b-aws-codebuild-docs
remove codebuild docs from layouts; doc files missing
2017-02-07 13:35:05 -05:00
clint shryock e787c12ab5 remove codebuild docs from layouts; doc files missing 2017-02-07 12:21:30 -06:00
Jake Champlin 2319ea6c47 Update CHANGELOG.md 2017-02-07 12:39:15 -05:00
Mitchell Hashimoto acfc169eb2 Merge pull request #11748 from hashicorp/b-tests-cwd
command: tests should move to temporary cwd
2017-02-07 09:15:53 -08:00
Mitchell Hashimoto 0c97c5a3d9
command: tests should move to temporary cwd
This fixes any issues where rogue tfstate files may appear in the cwd
otherwise.
2017-02-07 09:11:48 -08:00
Jake Champlin 1ab17bf5d3 Merge pull request #11735 from hashicorp/paddy_11728_with_tests
Revert backwards incompatibility in google_project.policy_data
2017-02-07 11:50:59 -05:00
Jake Champlin 20a75ec6d7
provider/aws: Fix aws_db_event_subscription import
Previously the db_event_subscription import would only work if there was a single db_event_subscription resource. This fixes the import, allowing it to work as expected.

Also fixes the acceptance test for the resource to reflect this.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBEventSubscription_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/07 10:38:10 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBEventSubscription_importBasic -timeout 120m
=== RUN   TestAccAWSDBEventSubscription_importBasic
--- PASS: TestAccAWSDBEventSubscription_importBasic (633.33s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    633.353s
```
2017-02-07 11:01:26 -05:00
Martin Atkins 050a274ba8 Merge #11743: Fix ordering of providers in documentation nav 2017-02-07 07:57:52 -08:00
Vlad Holubiev 299083946e Docs: Remove duplicate NoMad provider, fix sorting 2017-02-07 17:53:50 +02:00
Traver Tischio 441b1cca90 provider/fastly Adds healthcheck service (#11709)
* Adds schema for fastly healthcheck

* Handles changes to the fastly healthcheck

* Flattens and refreshed fastly healthchecks

* Adds testing for fastly healthcheck

* Adds website documentation for fastly healthcheck

* Fixes terraform syntax in test examples
2017-02-07 11:34:58 +01:00
Erik Jansson e3e24f4592 Fix nil pointer in resource_aws_codebuild_project (#11740) 2017-02-07 11:25:29 +01:00
Paddy faa640dfe8 Add a test that would have caught backwards incompatibility.
Add a test that would have caught the backwards incompatibility where
project IAM bindings aren't merged, but are overwritten.
2017-02-06 22:27:28 -08:00
Mitchell Hashimoto 244992c1be
vendor: update HCL 2017-02-06 18:24:39 -08:00
Mitchell Hashimoto 864c79396d
terraform: default shadow to false
To avoid chasing down issues like #11635 I'm proposing we disable the
shadow graph for end users now that we have merged in all the new
graphs. I've kept it around and default-on for tests so that we can use
it to test new features as we build them. I think it'll still have value
going forward but I don't want to hold us for making it work 100% with
all of Terraform at all times.

I propose backporting this to 0-8-stable, too.
2017-02-06 18:02:32 -08:00
Mitchell Hashimoto fe32f7b189
terraform: ignore RequiresNew for collection removal in diff.Same
Fixes #11349

I tracked this bug back to the early 0.7 days so this has been around a
really long time. I wanted to confirm that this wasn't introduced by any
new graph changes and it appears to predate all of that. I couldn't find
a single 0.7.x release where this worked, and I didn't want to go back
to 0.6.x since it was pre-vendoring.

The test case shows the logic the best, but the basic idea is: for
collections that go to zero elements, the "RequiresNew" sameness check
should be ignored, since the new diff can choose to not have that at all
in the diff.
2017-02-06 17:46:48 -08:00
Dana Hoffman 32c71b88a4 Merge pull request #11548 from zopanix/patch-1
Added forceNew on accessConfig in google_compute_instance_template
2017-02-06 17:19:55 -08:00
Mitchell Hashimoto 640faf18c3
Revert "provisioner/remote-exec: fail on first inline script with bad exit code (#11155)"
This reverts commit d2047d714e.
2017-02-06 16:51:51 -08:00
Jake Champlin cbbc1cfdad Merge pull request #11730 from hashicorp/f-update-db-event-sub-tests
provider/aws: Fix aws_db_event_subscription acceptance test
2017-02-06 18:51:20 -05:00
Jake Champlin f5c4d7bfc3
provider/aws: Fix aws_db_event_subscription acceptance test
Fixes the `TestAccAWSDBEventSubscription_basicUpdate` acceptance test

`TestAccAWSDBEventSubscription_importBasic` is still failing, but has been failing since November.
2017-02-06 18:24:15 -05:00
Evan Brown 7d5c405c96 providers/google: Fix google_project IAM bug
This changes removes read of the deprecated `policy_data` attr in
the `google_project` resource.

0.8.5 introduced new behavior that incorrectly read the `policy_data`
field during the read lifecycle event. This caused Terraform to
assume it owned not just policy defined in the data source, but
everything that was associated with the project. Migrating from 0.8.4
to 0.8.5, this would cause the config (partial) to be compared to the
state (complete, as it was read from the API) and assume some
policies had been explicitly deleted. Terraform would then delete them.

Fixes #11556
2017-02-06 14:16:22 -08:00
Jake Champlin ac805d17f5 Merge pull request #11725 from hashicorp/f-add-format-version-fastly
provider/fastly: Allow specifying log format version
2017-02-06 15:32:44 -05:00
Jake Champlin 4eda693710
fix validator test 2017-02-06 15:16:59 -05:00
Jake Champlin 5481fd941a
provider/fastly: Allow specifying log format version
Allows the user to specify the log format version when setting up `s3logging` on the fastly service resource.

Requires an update to the vendored `go-fastly` dependency.

Also adds an additional acceptance test for the new attribute.

```
$ make testacc TEST=./builtin/providers/fastly TESTARGS='-run=TestAccFastlyServiceV1_s3logging'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/06 14:51:55 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/fastly -v -run=TestAccFastlyServiceV1_s3logging -timeout 120m
=== RUN   TestAccFastlyServiceV1_s3logging_basic
--- PASS: TestAccFastlyServiceV1_s3logging_basic (36.11s)
=== RUN   TestAccFastlyServiceV1_s3logging_s3_env
--- PASS: TestAccFastlyServiceV1_s3logging_s3_env (15.35s)
=== RUN   TestAccFastlyServiceV1_s3logging_formatVersion
--- PASS: TestAccFastlyServiceV1_s3logging_formatVersion (15.71s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/fastly 67.186s
```
2017-02-06 14:54:58 -05:00
James Bardin 015198ca11 Add lock/unlock commands 2017-02-06 13:50:01 -05:00
James Bardin b80ae5e13e Add source path argument to testLockState
The new test pattern is to chdir into a temp location for the test, but
the prevents us from locating the testdata directory in the source. Add
a source path to testLockState so we can find the statelocker.go source.
2017-02-06 13:50:01 -05:00
James Bardin 9fbc5b1ff6 Merge pull request #11686 from hashicorp/jbardin/state-locking
Enable state locking for plan/apply/destroy/refresh/taint/untaint
2017-02-06 13:42:49 -05:00
Jake Champlin 17dfa0c8e3 Merge pull request #11691 from hashicorp/f-update-nomad-jobspec-parser
provider/nomad: Update jobspec parser
2017-02-06 12:02:37 -05:00
James Bardin eb8e5ac739 Change CLI flag to '-lock' 2017-02-06 10:07:32 -05:00