Commit Graph

16300 Commits

Author SHA1 Message Date
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
James Bardin 07903189f1 s/Meta.lockState/Meta.stateLock/g 2017-02-06 09:58:04 -05:00
James Bardin 0d7752b0f5 Update runningOp.Err with State.Unlock error
Have the defer'ed State.Unlock call append any error to the
RunningOperation.Err field. Local error would be rare and
self-correcting, but when the backend.Local is using a remote state the
error may require user intervention.
2017-02-06 09:54:15 -05:00
Clint 2e0b30efbb Merge pull request #11678 from snakeb1t/iam_instance_profile_availcheck
provider/aws: fix instance profile creation false negative
2017-02-06 08:48:54 -06:00
Lyle Franklin 3b7cf41b83 Allow OpenStack SSL fields to be specified by contents
- OpenStack provider now supports either a path or the file contents for
  `cacert_file`, `cert`, and `key`
- Makes it easier to automate TF by passing in certs as environment
  variables
- set `OS_SSL_TESTS=true` to run the acceptance tests
2017-02-05 11:17:00 -08:00
John Engelman 1efd5ff814 [Rancher] - allow for importing resources using environment ID to target (#11688) 2017-02-05 11:35:48 +01:00
netjunki 64e2381cb2 validate aws_alb_target_group name is less than 32 characters (#11699) 2017-02-05 11:24:24 +01:00
Kit Ewbank 1ab38ceae5 Return route_table_id from aws_route_table data source. (#11703) 2017-02-05 11:19:25 +01:00
James Nugent 5bbed52e19 Merge pull request #11697 from jamtur01/patch-16
Minor fixes to AWS ASG data source docs
2017-02-04 17:06:14 +01:00
James Nugent 983104b29a Merge pull request #11698 from jamtur01/patch-17
Minor grammar fixes to AWS Instance data source
2017-02-04 17:05:06 +01:00
James Turnbull f8f33f71fe Minor grammar fixes to AWS Instance data source
Minor grammar fixes to AWS Instance data source.
2017-02-04 11:00:46 -05:00
James Turnbull 3dfd9808d0 Minor fixes
Some minor fixes to make this data source's function clearer.
2017-02-04 10:47:25 -05:00
Joseph Kordish 33f41ab7af attempt to fix the building of the s3 arn (#9510) 2017-02-04 14:06:51 +01:00
Tamas Szasz e001ecac2c Provide the certificate ID in the aws data source (#11693)
ID is used in aws cloudfront distributions and probably in other aws resources as well
2017-02-04 12:34:16 +00:00
ValFadeev cb8d85fc50 provider/aws: New DataSource: aws_partition (#11675) 2017-02-04 11:54:45 +00:00
James Bardin e92559f518 Cleanup state file during Unlock
Close and remove the file descriptor from LocalState if we Unlock the
state. Also remove an empty state file if we created it and it was never
written to. This is mostly to clean up after tests, but doesn't hurt to
not leave empty files around.
2017-02-03 18:58:18 -05:00
Jake Champlin 9532c84f76
structs package now includes entire helper package 2017-02-03 18:37:46 -05:00
Jake Champlin 3b3bb30c54 Merge pull request #11685 from flacito/patch-1
Azure SQL Server name cannot be mixed case
2017-02-03 18:29:40 -05:00
Jake Champlin 14bd04d5e9 Merge pull request #11683 from mioi/terraform_random_id_doc
Documentation fix for random_id
2017-02-03 18:26:17 -05:00
Jake Champlin 79c117877e
provider/nomad: Update jobspec parser
Updates vendored Nomad jobspec parser such that parameterized nomad job files can no be parsed and used with Terraform.
Also fixes tests to adhere to new jobspec version, and update documentation to reflect such as well.
2017-02-03 18:19:23 -05:00
Matthew Frahry b6636159ad Merge pull request #11672 from hashicorp/Storage_bucket_ACL_doc_update
Update storage_bucket_acl.html.markdown
2017-02-03 14:28:59 -07:00
James Bardin cd96bb5aca Add test/untaint tests with locked state
add missing lock-state flag to untaint
2017-02-03 16:13:42 -05:00
Brian Webb 8d5d47e649 Azure SQL Server name cannot be mixed case
Can only be made up of lowercase letters 'a'-'z', the numbers 0-9 and the hyphen. The hyphen may not lead or trail in the name.

Changed MySqlServer to mysqlserver
2017-02-03 16:13:41 -05:00
James Bardin 82e59cd826 Add test for destroy with locked state 2017-02-03 16:06:01 -05:00
James Bardin 9fa436e0bd Add test for locked state in plan 2017-02-03 16:02:22 -05:00
James Bardin f3e4c05250 build the statelocker binary before running
this way we can signal it directly to amke sure it exits cleanly.
2017-02-03 15:59:24 -05:00
mioi hanaoka 115cf4744a Documentation fix for random_id
This attribute, `decimal`, should actually be `dec`.

reference: a0c5d42fa4/builtin/providers/random/resource_id.go (L54)
2017-02-03 12:53:44 -08:00
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