Commit Graph

6364 Commits

Author SHA1 Message Date
Radek Simko c25579a6f8 provider/aws: Add aws_elasticsearch_domain_policy (#8648) 2017-02-08 13:20:57 +00:00
Radek Simko d3c9a4b265 provider/aws: Unify custom endpoint fields in provider schema (#11768) 2017-02-08 13:08:59 +00:00
Paul Stack 6a44f258e6 provider/aws: Raise the codebuild_project create timeout (#11777)
Found in testing that a timeout of 30 seconds didn't allow for the error
message that codebuild wasn't supported in eu-west-2

Discussed this with @radeksimko and he suggested a timeout raise
2017-02-08 13:03:58 +00:00
Liam Bennett d760f2102a Latest updates to aws_ssm_document resource. (#11671)
A parameter `document_type` and a few more attributes returned based
upon the new API.
2017-02-08 12:45:38 +00:00
Dana Hoffman a3ca05a3c9 provider/google: always set additional_zones on read 2017-02-07 19:21:00 -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
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
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
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
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 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 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
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
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
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
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
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
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
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 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
clint shryock 9ad75cfdc6 fix db subnet test 2017-02-03 10:22:46 -06: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
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
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
Jake Champlin 188a00cbe0 Merge pull request #11642 from hashicorp/f-improve-iam-tests
provider/aws: Improve IAM Group AccTests
2017-02-02 14:10:51 -05:00
Jake Champlin 643a52ab3e
provider/aws: Improve IAM Group AccTests
Improve the iam_group acceptance tests. Previously, the iam_group would overlap when running our tests in parallel. This fixes that.
2017-02-02 13:03:39 -05:00
Jake Champlin e4a36c3d7a
provider/aws: Better handle parallel tests spot-fleet-req
Better handle parallel testing of the `aws_spot_fleet_request` resource. Previously we were catching a lot of errors due to naming the policy_attachment resource the same between tests.
2017-02-02 12:48:52 -05:00
Clint aa7aa19592 Merge pull request #11637 from hashicorp/b-aws-test-fixes
provider/aws: More lambda test fixes
2017-02-02 10:30:23 -06:00
liamjbennett 4aa5117e82
New resource aws_codebuild_project 2017-02-02 16:13:51 +00:00
clint shryock 8cede07657 fix missing %s 2017-02-02 10:04:27 -06:00
clint shryock 27c1dd8097 provider/aws: More lambda test cleanups 2017-02-02 09:57:44 -06:00
Jake Champlin 755040b177 Merge pull request #11617 from hashicorp/f-tags-dynamodb
provider/aws: Add tag support to the dynamodb table resource
2017-02-02 09:44:54 -05:00
Jake Champlin dacc765a5e
update casing for dynamoDb 2017-02-02 09:20:33 -05:00
Jasmin Gacic b862cd2ccb Terraform provider ProfitBricks - Data Sources (#11520)
* Terraform ProfitBricks Builder

* make fmt

* Merge remote-tracking branch 'upstream/master' into terraform-provider-profitbricks

# Conflicts:
#	command/internal_plugin_list.go

* Addressing PR remarks

* Removed importers

* Added ProfitBricks Data Sources

* Added documentation

* Updated to REST v3:
- nat parameter for Nics
- availabilityZone for Volumes

Minor code clean up

* Minor code clean up

* Fixed typo in volume documentation

* make fmt

* Addressing requested changes

* Added a step in load balancer tests in CheckDestroy where we are making sure that the test doesn't leave dangling resources in ProfitBricks

* Changed expected image name

* Fixed data center test
Code clean up
2017-02-02 13:26:14 +00:00
stack72 c8a2d40c82
provider/aws: Fixing a merge conflict issue in validators.go 2017-02-02 10:30:41 +00:00
Jack Bruno be56c7d2f6 provider/aws: Add AWS DMS (data migration service) resources (#11122)
* Add aws dms vendoring

* Add aws dms endpoint resource

* Add aws dms replication instance resource

* Add aws dms replication subnet group resource

* Add aws dms replication task resource

* Fix aws dms resource go vet errors

* Review fixes: Add id validators for all resources. Add validator for endpoint engine_name.

* Add aws dms resources to importability list

* Review fixes: Add aws dms iam role dependencies to test cases

* Review fixes: Adjustments for handling input values

* Add aws dms replication subnet group tagging

* Fix aws dms subnet group doesn't use standard error for resource not found

* Missed update of aws dms vendored version

* Add aws dms certificate resource

* Update aws dms resources to force new for immutable attributes

* Fix tests failing on subnet deletion by adding explicit dependencies. Combine import tests with basic tests to cut down runtime.
2017-02-02 10:30:05 +00:00
Raymond Fallon b30ef0f58d Update Application Auto Scaling to support scaling an Amazon EC2 Spot fleet. (#8697)
* provider/aws: Update Application Auto Scaling service model

  - Add support for automatically scaling an Amazon EC2 Spot fleet.

* Remove duplicate policy_type check.

* Test creating a scalable target for a splot fleet request.

* Test creating a scaling policy for a splot fleet request.

* Update resource docs to support scaling an Amazon EC2 Spot fleet.

  - aws_appautoscaling_policy
  - aws_appautoscaling_target

* Remove arn attribute from aws_appautoscaling_target

  - No arn is generated or returned for this resource.

* Remove optional name attribute from aws_appautoscaling_target

  - ScalableTargets do not have a name
  - I think this was copied from aws_appautoscaling_policy

* AWS Application Autoscaling resource documentation tweaks

  - include a target resource in the policy example
  - sort attributes by alpha
  - fixup markdown
  - add spaces to test config
2017-02-02 09:39:22 +00:00
Alexander e2603bedec provider/pagerduty: Fix tests (#11622)
* Fix typo in user_reference

* Disable rotation_virtual_start check
2017-02-01 23:51:17 +00:00
Dana Hoffman b16ef83b9a Merge pull request #11590 from evandbrown/google-cloud-sql-pw
providers/google: No default root user for SQL
2017-02-01 15:43:23 -08:00
Alexander 3884c86b44 provider/pagerduty: pagerduty_addon resource (#11620)
* Add resource

* Add tests

* Add documentation
2017-02-01 22:59:29 +00:00
Clint 8f063d6773 Merge pull request #11621 from hashicorp/b-aws-test-fixes
provider/aws: Some Lambda test fixes
2017-02-01 16:39:15 -06:00
clint shryock f87f0f5ba6 provider/aws: Fix permissions for IAM role in Lambda tests 2017-02-01 15:59:40 -06:00
Jake Champlin f135ce8b09 Merge pull request #11619 from hashicorp/b-fix-instance-root-block-device
provider/aws: Fix root-block-device bug
2017-02-01 16:31:23 -05:00
Jake Champlin 3d22adbd5d
provider/aws: Fix root-block-device bug
Previously the `root_block_device` config map was a `schema.TypeSet` with an empty `Set` function, and a hard-limit of 1 on the attribute block.
This prevented a user from making any real changes inside the attribute block, thus leaving the user with a `Apply complete!` message, and nothing changed.

The schema API has since been updated, and we can now specify the `root_block_device` as a `schema.TypeList` with `MaxItems` set to `1`. This fixes the issue, and allows the user to update the `aws_instance`'s `root_block_device` attribute, and see changes actually propagate.
2017-02-01 16:25:07 -05:00
Dana Hoffman cd246545af Merge pull request #11020 from drebes/remote_traffic_selector
provider/google: remote_traffic_selector for google_compute_vpn_tunnel
2017-02-01 13:04:06 -08:00
Alexander dd0f2f11ae provider/pagerduty: pagerduty_escalation_policy data source (#11616)
* Add data source

* Add tests

* Add documentation

* Remove unnecessary id from schema
2017-02-01 20:53:31 +00:00
Jake Champlin 91e0fed333
provider/aws: Add tag support to the dynamodb table resource
Adds tag support to the `aws_dynamodb_table` resource. Also adds a test for the resource, and a test to ensure that the tags are populated correctly from a resource import.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDynamoDBTable_tags'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/01 15:35:00 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDynamoDBTable_tags -timeout 120m
=== RUN   TestAccAWSDynamoDBTable_tags
--- PASS: TestAccAWSDynamoDBTable_tags (28.69s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    28.713s
```

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDynamoDbTable_importTags'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/01 15:39:49 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDynamoDbTable_importTags -timeout 120m
=== RUN   TestAccAWSDynamoDbTable_importTags
--- PASS: TestAccAWSDynamoDbTable_importTags (30.62s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    30.645s
```
2017-02-01 15:44:30 -05:00
Alexander 2c59c9d44e provider/pagerduty: pagerduty_schedule data source (#11614)
* Add data source

* Add tests

* Add documentation

* Remove unnecessary id from schema
2017-02-01 20:01:46 +00:00
John Engelman f0dd9b23a3 Closes #11567. Handled Rancher deleted resources. (#11607)
* Fix some spec names.

* Closes #11567 .Handle deleted/purged resources from Rancher.
2017-02-01 19:49:17 +00:00
clint shryock b592f8d35d provider/aws: Fix lambda source mapping tests 2017-02-01 13:25:24 -06:00
Jake Champlin b51edd6175 Merge pull request #11612 from hashicorp/b-fix-beanstalk-env-acctests
provider/aws: Fixes aws beanstalk env acc tests
2017-02-01 13:22:32 -05:00
Paul Stack 851cc46548 provider/aws: Guard against panic in aws_vpc_endpoint_association (#11613)
I believe that if no VPC Endpoints were returned from the AWS API, we
were not guarding against a panic. We were strill trying to inspect the
RouteTableIds. This commit will ensure that no errors are thrown before
trying to use the RouteTableIds

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVpcEndpointRouteTableAssociation_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/01 18:06:29 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpcEndpointRouteTableAssociation_ -timeout 120m
=== RUN   TestAccAWSVpcEndpointRouteTableAssociation_basic
--- PASS: TestAccAWSVpcEndpointRouteTableAssociation_basic (42.83s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	42.859s
```
2017-02-01 18:14:41 +00:00
Jake Champlin f7db75da58
provider/aws: Fixes aws beanstalk env acc tests
Fixes the beanstalk env tests such that they can run in parallel better. Previously, only the beanstalk application was randomized, now the beanstalk environment is also randomized to help better facilitate running our tests in parallel.

```
=== RUN   TestAccAWSBeanstalkEnv_outputs
--- PASS: TestAccAWSBeanstalkEnv_outputs (388.74s)
=== RUN   TestAccAWSBeanstalkEnv_cname_prefix
--- PASS: TestAccAWSBeanstalkEnv_cname_prefix (386.78s)
=== RUN   TestAccAWSBeanstalkEnv_config
--- PASS: TestAccAWSBeanstalkEnv_config (532.56s)
=== RUN   TestAccAWSBeanstalkEnv_resource
--- PASS: TestAccAWSBeanstalkEnv_resource (420.47s)
=== RUN   TestAccAWSBeanstalkEnv_vpc
--- PASS: TestAccAWSBeanstalkEnv_vpc (516.02s)
=== RUN   TestAccAWSBeanstalkEnv_template_change
--- PASS: TestAccAWSBeanstalkEnv_template_change (623.38s)
=== RUN   TestAccAWSBeanstalkEnv_basic_settings_update
--- PASS: TestAccAWSBeanstalkEnv_basic_settings_update (705.32s)
```
2017-02-01 13:09:43 -05:00
James Bardin 9c1775a28c Merge pull request #11554 from hashicorp/jbardin/local-exec-context
Remove race around local-exec Wait
2017-02-01 12:39:41 -05:00
Peter McAtominey bbde0537d1 provider/azurerm: support import for load balancer and sub resources (#11610)
implemented ResourceImporter for sub resources which extracts the lb id
deprecated location on each sub resource as it was unused
2017-02-01 17:17:51 +00:00
James Bardin ff2936bb3f Fix cancellation when spawning a subprocess
If the shell spawns a subprocess which doesn't close the output file
descriptors, the exec.Cmd will block on Wait() (see
golang.org/issue/18874). Use an os.Pipe to provide the command with a
real file descriptor so the exec package doesn't need to do the copy
manually. This in turn may block our own reading goroutine, but we can
select on that and leave it for cleanup later.
2017-02-01 12:01:29 -05:00
Mike Fowler 23e01de515 provider/google-cloud: Add second generation disk specification options (#11571)
* Add second generation disk specification options.

* Adjust test check to match resource read behaviour.
2017-02-01 16:20:31 +00:00
Doug Neal babc52202c Succeed creating aws_volume_attachment if identical attachment exists (#11060)
If an `aws_volume_attachment` is identical to one that already exists in
the API, don't attempt to re-create it (which fails), simply act as
though the creation command had already been run and continue.

This allows Terraform to cleanly recover from a situation where a volume
attachment action hangs indefinitely, possibly due to a bad instance
state, requiring manual intervention such as an instance reboot. In such
a situation, Terraform believes the attachment has failed, when in fact
it succeeded after the timeout had expired. On the subsequent retry run,
attempting to re-create the attachment will fail outright, due to the
AttachVolume API call being non-idempotent. This patch implements the
idempotency client-side by matching the (name, vID, iID) tuple.

Note that volume attachments are not assigned an ID by the API.
2017-02-01 15:41:53 +00:00
Jake Champlin c83a971efb Merge pull request #11605 from hashicorp/f-add-docs-ecs-cluster-datasource
documentation: Add documentation for the ECS Cluster Data Source
2017-02-01 10:08:03 -05:00
Jake Champlin ac73ce4199
documentation: Add documentation for the ECS Cluster Data Source
Adds documentation for the ECS Cluster Data Source. Also removes duplicate struct declarations from the data source and test.
2017-02-01 09:51:26 -05:00
Paul Stack ef08adeb65 provider/aws: Fix panic in aws_rds_cluster missing parameter error (#11600)
message

Fixes: #11568

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRDSCluster_missingUserNameCausesError'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/01 12:11:14 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRDSCluster_missingUserNameCausesError -timeout 120m
=== RUN   TestAccAWSRDSCluster_missingUserNameCausesError
--- PASS: TestAccAWSRDSCluster_missingUserNameCausesError (3.22s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	3.243s
```

The error message for a required parameter being missing has a wrong parameter baked into it. Therefore, when the error message tried to fire, it was throwing a panic. Added a test to make sure that we know the condition still fires and with a correct message
2017-02-01 14:42:00 +00:00
Jake Champlin 5566edd86e Merge pull request #11558 from hashicorp/feat/data_aws_ecs_cluster2
provider/aws: add aws_ecs_cluster datasource
2017-02-01 09:33:57 -05:00
Darren White 4cbd006268 Don't ignore VM power on errors. This prevents Terraform from hanging indefinitely for the VM to power on. (#11604) 2017-02-01 14:31:40 +00:00
Paul Stack 50fe7e1bb0 provider/aws: aws_route53_record import error processing (#11603)
Fixes: #11549

When a user passes the wrong argument to a route53_record import, they
got a crash. This was because we expected the ID to parse correctly. The
crash looked like this:

```
% terraform import aws_route53_record.import1 mike.westredd.com
aws_route53_record.import1: Importing from ID "mike.westredd.com"...
aws_route53_record.import1: Import complete!
  Imported aws_route53_record (ID: mike.westredd.com)
aws_route53_record.import1: Refreshing state... (ID: mike.westredd.com)
Error importing: 1 error(s) occurred:

* aws_route53_record.import1: unexpected EOF
panic: runtime error: index out of range
```

Rather than throwing a panic to the user, we should present them with a more useful message that tells them what the error is:

```
% terraform import aws_route53_record.import mike.westredd.com
aws_route53_record.import: Importing from ID "mike.westredd.com"...
aws_route53_record.import: Import complete!
  Imported aws_route53_record (ID: mike.westredd.com)
aws_route53_record.import: Refreshing state... (ID: mike.westredd.com)
Error importing: 1 error(s) occurred:

* aws_route53_record.import: Error Importing aws_route_53 record. Please make sure the record ID is in the form ZONEID_RECORDNAME_TYPE (i.e. Z4KAPRWWNC7JR_dev_A
```

At least they can work out what the problem is in this case
2017-02-01 14:15:08 +00:00
Raphaël Pinson a3bfc5e8b3 rancher_stack: Only read compose when catalog_id is empty (#11593) 2017-02-01 12:33:23 +00:00
KOJIMA Kazunori 427b0042bb provider/aws: Add sensitive attribute in master_password (#11584) 2017-02-01 11:10:51 +00:00
Raphael Randschau acb55ecc1b provider/aws: code review feedback 2017-02-01 09:32:19 +01:00
Evan Brown 860019048d providers/google: No default root user for SQL
Cloud SQL Gen 2 instances come with a default 'root'@'%' user on
creation. This change automatically deletes that user after creation. A
Terraform user must use the google_sql_user to create a user with
appropriate host and password.
2017-01-31 22:21:11 -08:00
James Bardin e0325d9b8f fix race with multiple calls to cmd.Wait()
There was still a race around the local-exec Command, where we were
calling Wait in 2 places which you can't do.
2017-01-31 18:07:26 -05:00
Raphael Randschau 1e847c2148
provider/aws: avoid ecs cluster name collisions 2017-01-31 23:40:31 +01:00
Jake Champlin 039701fa51 Merge pull request #11580 from hashicorp/b-fix-panic-data-azs
provider/aws: Fix panic from AZs Data Source Test
2017-01-31 16:06:08 -05:00
Jake Champlin 421b25cacf
provider/aws: Fix panic from AZs Data Source Test
The `aws_availability_zones` data source test was panicking. This fixes both tests

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAvailabilityZones'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/31 15:47:39 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAvailabilityZones -timeout 120m
=== RUN   TestAccAWSAvailabilityZones_basic
--- PASS: TestAccAWSAvailabilityZones_basic (12.56s)
=== RUN   TestAccAWSAvailabilityZones_stateFilter
--- PASS: TestAccAWSAvailabilityZones_stateFilter (13.59s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    26.187s
```
2017-01-31 15:54:17 -05:00
clint shryock 0e5f08e87d change vpc test name to isolate it 2017-01-31 14:50:21 -06:00
Jake Champlin e81231035c Merge pull request #11579 from hashicorp/b-fix-beanstalk-tests
provider/aws: Fix ElasticBeanstalk Acceptance Tests
2017-01-31 15:28:37 -05:00
Gauthier Wallet 4da1451971 Added Step Function resources (State Machine & Activity) (#11420)
* Added Step Function Activity & Step Function State Machine

* Added SFN State Machine documentation

* Added aws_sfn_activity & documentation

* Allowed import of sfn resources

* Added more checks on tests, fixed documentation

* Handled the update case of a SFN function (might be already deleting)

* Removed the State Machine import test file

* Fixed the eventual consistency of the read after delete for SFN functions
2017-01-31 20:17:38 +00:00
Jake Champlin 3541b9254e
provider/aws: Fix ElasticBeanstalk Acceptance Tests
Fixes all the currently failing ElasticBeanstalk Acceptance Tests

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSBeanstalkEnv'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/31 12:47:39 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSBeanstalkEnv -timeout 120m
=== RUN   TestAccAWSBeanstalkEnv_basic
--- PASS: TestAccAWSBeanstalkEnv_basic (383.73s)
=== RUN   TestAccAWSBeanstalkEnv_tier
--- PASS: TestAccAWSBeanstalkEnv_tier (629.41s)
=== RUN   TestAccAWSBeanstalkEnv_outputs
--- PASS: TestAccAWSBeanstalkEnv_outputs (374.11s)
=== RUN   TestAccAWSBeanstalkEnv_cname_prefix
--- PASS: TestAccAWSBeanstalkEnv_cname_prefix (429.19s)
=== RUN   TestAccAWSBeanstalkEnv_config
--- PASS: TestAccAWSBeanstalkEnv_config (512.37s)
=== RUN   TestAccAWSBeanstalkEnv_resource
--- PASS: TestAccAWSBeanstalkEnv_resource (358.39s)
=== RUN   TestAccAWSBeanstalkEnv_vpc
--- PASS: TestAccAWSBeanstalkEnv_vpc (479.72s)
=== RUN   TestAccAWSBeanstalkEnv_template_change
--- PASS: TestAccAWSBeanstalkEnv_template_change (792.78s)
=== RUN   TestAccAWSBeanstalkEnv_basic_settings_update
--- PASS: TestAccAWSBeanstalkEnv_basic_settings_update (616.77s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    4576.505s
```
2017-01-31 15:16:22 -05:00
Clint 3cb8557d54 Merge pull request #11565 from hashicorp/b-aws-ecs-service-type-case
provider/aws: Fix issue with ECS Placement Strat. and type casing
2017-01-31 12:16:17 -06:00
clint shryock 7e9bfda31a provider/aws: Fix issue with ECS Placement Strat. and type casing
The API asks you to send lower case values, but returns uppercase ones.
Here we lowercase the returned API values.

There is no migration here because the field in question is nested in a
set, so the hash will change regardless. Anyone using this feature now
has it broken anyway.
2017-01-31 11:33:16 -06:00
Naoto Yokoyama e2b3ee5fbf provider/aws: add `aws_ecs_task_definition` datasource (#8509) 2017-01-31 17:28:11 +00:00