Commit Graph

16817 Commits

Author SHA1 Message Date
James Bardin bd65ddbcaa Add test for apply/refresh on locked state files
Verify that these operations fail when a state file is locked.
2017-02-03 15:32:40 -05:00
James Bardin fb60b6f6f2 Add separate program for locking state files
Depending on the implementation, local state locks may be reentrant
within the same process. Use a separate process to test locked state
files.
2017-02-03 15:31:21 -05:00
Mitchell Hashimoto 77e8bec1da Merge pull request #11669 from liamjbennett/gitattributes
Adding in root level .gitattributes file.
2017-02-03 21:19:50 +01:00
Mitchell Hashimoto 6702a22074
dag: require acyclic graph 2017-02-03 21:18:34 +01:00
Mitchell Hashimoto 07ce5a7624
dag: cleanup some code that had no effect anymore 2017-02-03 21:18:34 +01:00
Mitchell Hashimoto 6366488809
dag: Update can be called with a nil graph 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto 65752cd51a
dag: improve docs and read access during a lock 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto 72a717f2de
dag: change the type sig of Update to Graph so its external friendly 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto 28fff99ea8
dag: replace dag.Walk with our walker 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto b1aa6fd598
dag: improved comments 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto 7f61f11723
dag: support removing edges 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto 5d49e7e6b6
dag: tests for adding edges/vertices during walk-time 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto cbc71d9508
dag: basic working update-able walker 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto 77c445a838
dag: Set difference 2017-02-03 21:18:33 +01:00
Mitchell Hashimoto 66b9a6e8e7 Merge pull request #11680 from hashicorp/b-data-orphan
terraform: data source on refresh should just delete from state
2017-02-03 21:06:06 +01:00
Mitchell Hashimoto ebb129f051
terraform: data source on refresh should just delete from state
This was caught by an acceptance test. We've now added a unit test. When
refreshing, an orphan (no config) data source should just be deleted.
2017-02-03 20:58:03 +01:00
James Bardin 6a20c35d61 apply-test 2017-02-03 14:55:21 -05:00
James Bardin a2b5811f50 Remove "expires" from lock info.
We are not going to handle lock expiration, at least at this time, so
remove the Expires fields to avoid any confusion.
2017-02-03 14:55:21 -05:00
James Bardin 91608843a4 Add state locking in taint/untaint 2017-02-03 14:55:21 -05:00
Jake Champlin 24c5d59f5c Merge pull request #11679 from xsellier/bugfix/11663-provider-aws-null-value
provider/aws: Add epsilon to the regex date validation
2017-02-03 14:27:04 -05:00
James Bardin a157ebbccd add -lock-state usage to plan/refresh/apply/destr 2017-02-03 14:17:17 -05:00
Xavier Sellier dbe647dd56 Add epsilon to the regex date validation 2017-02-03 13:52:22 -05:00
Paul Tittle bd5fc5d0e0 provider/aws: fix instance profile creation false negative
fixes https://github.com/hashicorp/terraform/issues/9474

discussion of approach in https://github.com/hashicorp/terraform/pull/11634
2017-02-03 13:27:50 -05:00
James Bardin 94f2f4d6ae Create state files first for backup tests
Previously when runnign a plan with no exitsing state, the plan would be
written out and then backed up on the next WriteState by another
BackupState instance. Since we now maintain a single State instance
thoughout an operation, the backup happens before any state exists so no
backup file is created.

This is OK, as the backup state the tests were checking for is from the
plan file, which already exists separate from the state.
2017-02-03 13:07:34 -05:00
Paul Stack ae002bf41b Update CHANGELOG.md 2017-02-03 17:23:33 +00:00
Paul Stack ced96aa90b provider/aws: Set aws_db_cluster to snapshot by default (#11668)
As requested in #11448

Terraform didn't snapshot AWS DB Instances by default. We are going to
change that behaviour going forward.
2017-02-03 17:21:25 +00:00
Martin Atkins f1803ba4b6 Merge #11529: Read vault token from ~/.vault-token 2017-02-03 08:55:36 -08:00
Jason Felice ab33435863 Fix error message for when home directory not found 2017-02-03 08:52:53 -08:00
Jason Felice 8a7a6c6059 Use go-homedir (as vault does) 2017-02-03 08:52:53 -08:00
Jason Felice bb8b837ab9 Document use of ~/.vault-token 2017-02-03 08:52:53 -08:00
Jason Felice bb1756c86a Read ~/.vault-token if token not supplied another way
Closes #11365
2017-02-03 08:52:53 -08:00
Clint 195e668865 Merge pull request #11674 from hashicorp/b-aws-test-fixes
provider/aws: More test fixing
2017-02-03 10:41:16 -06:00
clint shryock 549256ed1d fix transcoder tests 2017-02-03 10:40:33 -06:00
Matthew Frahry 2aa41ba10d Update storage_bucket_acl.html.markdown 2017-02-03 09:26:39 -07:00
clint shryock 9ad75cfdc6 fix db subnet test 2017-02-03 10:22:46 -06:00
Matthew Frahry c6014d9204 Update storage_bucket_acl.html.markdown
Removing `default_acl` since Terraform doesn't manage it anymore
2017-02-03 09:09:03 -07:00
Jason Felice b5d891b109 Check result of config.ConfigureTLS() 2017-02-03 11:07:03 -05:00
Jason Felice 7da8e9285e Use vault api.DefaultConfig()
Closes #11364
2017-02-03 11:04:35 -05:00
Liam Bennett 894b917016 Adding in root level .gitattributes file.
This is to pin the .go files to LF line endings.

Developing on windows and using the vagrant environment to build,
running `make fmt` will cause all the *.go files to be touched,
alterting their line endings and causing git to see them as changed.
2017-02-03 15:14:31 +00:00
Jake Champlin 7e71dfce0f Merge pull request #11649 from hashicorp/b-fix-spot-request-bug
provider/aws: Fix spot_instance_request bug
2017-02-03 09:23:54 -05:00
Jake Champlin 6d2093c2df Merge pull request #11662 from blalor/patch-1
Docs: fix incorrect NOMAD_ADDR description
2017-02-03 09:22:21 -05:00
Mitchell Hashimoto 1777f53a4b Merge pull request #11660 from hashicorp/f-graph-deps
terraform: remove ConnectDependents and related interfaces
2017-02-03 14:52:07 +01:00
Brian Lalor 8aae64145b Docs: fix incorrect NOMAD_ADDR description
Per [provider_test.go#L42](https://github.com/hashicorp/terraform/blob/master/builtin/providers/nomad/provider_test.go#L42).
2017-02-03 08:46:58 -05:00
Mitchell Hashimoto 755cef98b0
terraform: remove ConnectDependents and related interfaces 2017-02-03 14:25:54 +01:00
Raphaël Pinson acd7320e1f rancher: set environment_id on import (#11594) 2017-02-03 12:34:26 +00:00
Matthew Frahry d421829aaa Add test to PR 9320 (#11645) 2017-02-03 11:50:57 +00:00
Dana Hoffman 3efe2c942c provider/google: only set additional zones on read if it had been set in the config 2017-02-02 17:37:03 -08:00
Jake Champlin a58f292d88
provider/aws: Fix spot_instance_request bug
Discovered after #11619 was fixed, and while fixing acceptance tests for the `aws_spot_instance_request` resource.
Previously the `aws_spot_instance_request` resource wouldn't populate any of the block device attributes from the resulting instance's metadata. This fixes that issue, and also fixes the `aws_spot_instance_request` acceptance tests to be more equipped for running in parallel.

 ```
 make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSpotInstanceRequest_'
 ==> Checking that code complies with gofmt requirements...
 go generate $(go list ./... | grep -v /terraform/vendor/)
 2017/02/02 18:02:37 Generated command/internal_plugin_list.go
 TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSpotInstanceRequest_ -timeout 120m
 === RUN   TestAccAWSSpotInstanceRequest_basic
 --- PASS: TestAccAWSSpotInstanceRequest_basic (111.96s)
 === RUN   TestAccAWSSpotInstanceRequest_withBlockDuration
 --- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (105.12s)
 === RUN   TestAccAWSSpotInstanceRequest_vpc
 --- PASS: TestAccAWSSpotInstanceRequest_vpc (115.81s)
 === RUN   TestAccAWSSpotInstanceRequest_SubnetAndSG
 --- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSG (130.46s)
 PASS
 ok      github.com/hashicorp/terraform/builtin/providers/aws    463.377s
 ```
2017-02-02 18:57:50 -05:00
Kit Ewbank 380aef9720 Tighten up documentation, same-account acceptance test, better error handling. 2017-02-02 18:46:23 -05:00
James Bardin dd19cb202d add locking to plan and refresh commands 2017-02-02 18:08:28 -05:00