Commit Graph

6579 Commits

Author SHA1 Message Date
James Bardin 343b96c9d7 Add MetaReset
Make sure the ArmClient gets a new StopContext for each test
2017-03-09 08:39:02 -05:00
John Engelman 8d35e3dc22 Closes #11054. Apply the set value for finish_upgrade. (#12545) 2017-03-09 01:32:28 +02:00
Seth Vargo d387860c19 Hash custom_data in state storage (#12214)
This also switches to helpers for b64.
2017-03-08 23:57:51 +02:00
clint shryock 3022eb6da0 provider/aws: fix acc test for data source 2017-03-08 15:43:57 -06:00
Paul Stack 10f080f315 provider/aws: Prevent aws_dms_replication_task panic (#12539)
Fixes: #12506

When a replication_task cdc_start_time was specified as an int, it was
causing a panic as the conversion to a Unix timestampe was expecting a
string

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAwsDmsReplicationTaskBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/08 22:55:29 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAwsDmsReplicationTaskBasic -timeout 120m
=== RUN   TestAccAwsDmsReplicationTaskBasic
--- PASS: TestAccAwsDmsReplicationTaskBasic (1089.77s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	1089.802s
```
2017-03-08 23:27:47 +02:00
clint shryock 7f87abae91 provider/aws: increase randomization in beantsalk app version tests 2017-03-08 15:25:41 -06:00
Clint c5b833b999 provider/aws: Default build_timeout to 60, matching docs, update tests (#12531) 2017-03-08 14:14:02 -06:00
Robert Rudduck bf4d6d5b1e provider/azurerm: Add support for managed availability sets. (#12532)
* Add support for managed availability sets.

* Formatting.
2017-03-08 21:30:11 +02:00
Paul Stack b5b53bc56a provider/aws: Error on trying to recreate an existing customer gateway (#12501)
Fixes: #7492

When we use the same IP Address, BGP ASN and VPN Type as an existing
aws_customer_gateway, terraform will take control of that gateway (not
import it!) and try and modify it. This could be very bad

There is a warning on the AWS documentation that one gateway of the same
parameters can be created, Terraform is now going to error if a gateway
of the same parameters is attempted to be created

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCustomerGateway_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/07 18:40:39 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCustomerGateway_ -timeout 120m
=== RUN   TestAccAWSCustomerGateway_importBasic
--- PASS: TestAccAWSCustomerGateway_importBasic (31.11s)
=== RUN   TestAccAWSCustomerGateway_basic
--- PASS: TestAccAWSCustomerGateway_basic (68.72s)
=== RUN   TestAccAWSCustomerGateway_similarAlreadyExists
--- PASS: TestAccAWSCustomerGateway_similarAlreadyExists (35.18s)
=== RUN   TestAccAWSCustomerGateway_disappears
--- PASS: TestAccAWSCustomerGateway_disappears (25.13s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	160.172s
```
2017-03-08 21:11:59 +02:00
Paul Stack 0b0a76a3d5 provider/aws: Add the IPV6 cidr block to the vpc datasource (#12529)
Fixes: #12526

```
% make testacc TEST=./builtin/providers/aws  TESTARGS='-run=TestAccDataSourceAwsVpc_ipv6Associated'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/08 17:42:13 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccDataSourceAwsVpc_ipv6Associated -timeout 120m
=== RUN   TestAccDataSourceAwsVpc_ipv6Associated
--- PASS: TestAccDataSourceAwsVpc_ipv6Associated (71.33s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws71.366s
```
2017-03-08 21:08:37 +02:00
tpoindessous 9a2e9914de providers/google : google_compute_disk.go : Minor correction : "Deleting disk" message in Delete method (#12521)
* WIP: added a new resource type : google_compute_snapshot

* [WIP]: added a test acceptance for google_compute_snapshot

* Cleanup

* Minor correction : "Deleting disk" message in Delete method

* Error in merge action

* Error in merge action
2017-03-08 17:34:49 +02:00
Clint f6ac200aca provider/aws: Rename 'timeout' to 'build_timeout' for Codebuild (#12503) 2017-03-08 09:29:54 -06:00
Brandon Tosch c2a6625d0f Bug Fix: Terraform crashes during azurerm_container_service provisioning (#12516)
* Corrected referencing on sshKeys map

* changed tests to use East US due to resource availability
2017-03-08 17:25:51 +02:00
Clint 5d894e4ffd Fix up command and some go fmt issues (#12509) 2017-03-07 16:03:45 -06:00
Daniel Portella 88cdae91e6 provider/docker: added support for linux capabilities (#12045)
* added support for linux capabilities

Refs #11623

Added capabilities block
Added tests for it
Added documentation for it.

My PC doesnt support memory swap so it errors there.

```
$ make testacc TEST=./builtin/providers/docker TESTARGS='-run=TestAccDockerContainer_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/17 14:57:08 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/docker -v -run=TestAccDockerContainer_ -timeout 120m
=== RUN   TestAccDockerContainer_basic
--- PASS: TestAccDockerContainer_basic (44.50s)
=== RUN   TestAccDockerContainer_volume
--- PASS: TestAccDockerContainer_volume (40.73s)
=== RUN   TestAccDockerContainer_customized
--- FAIL: TestAccDockerContainer_customized (50.27s)
	testing.go:265: Step 0 error: Check failed: Check 2/2 error: Container has wrong memory swap setting: -1
	Please check that you machine supports memory swap (you can do that by running 'docker info' command).
=== RUN   TestAccDockerContainer_upload
--- PASS: TestAccDockerContainer_upload (38.56s)
FAIL
exit status 1
FAIL	github.com/hashicorp/terraform/builtin/providers/docker	174.070s
Makefile:48: recipe for target 'testacc' failed
make: *** [testacc] Error 1
```

* Documentation changes.

* added maxitems and rerun tests
2017-03-07 18:48:20 +02:00
Paul Stack b57e0bee2a provider/datadog: Update to datadog_monitor still used d.GetOk (#12497)
Fixes: #12494

The Create was changed to use the default and not d.GetOk - the update
wasn't - this was causing issues when trying to update to a false value

```
% make testacc TEST=./builtin/providers/datadog
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/07 16:20:54 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/datadog -v  -timeout 120m
=== RUN   TestDatadogMonitor_import
--- PASS: TestDatadogMonitor_import (4.77s)
=== RUN   TestDatadogUser_import
--- PASS: TestDatadogUser_import (6.23s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDatadogMonitor_Basic
--- PASS: TestAccDatadogMonitor_Basic (3.83s)
=== RUN   TestAccDatadogMonitor_BasicNoTreshold
--- PASS: TestAccDatadogMonitor_BasicNoTreshold (4.92s)
=== RUN   TestAccDatadogMonitor_Updated
--- PASS: TestAccDatadogMonitor_Updated (5.88s)
=== RUN   TestAccDatadogMonitor_TrimWhitespace
--- PASS: TestAccDatadogMonitor_TrimWhitespace (3.23s)
=== RUN   TestAccDatadogMonitor_Basic_float_int
--- PASS: TestAccDatadogMonitor_Basic_float_int (5.73s)
=== RUN   TestAccDatadogTimeboard_update
--- PASS: TestAccDatadogTimeboard_update (8.86s)
=== RUN   TestValidateAggregatorMethod
--- PASS: TestValidateAggregatorMethod (0.00s)
=== RUN   TestAccDatadogUser_Updated
--- PASS: TestAccDatadogUser_Updated (6.05s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/datadog	49.506s
```
2017-03-07 16:36:37 +02:00
Matt Dainty 3d335e48ff Check instance is running before trying to attach (#12459)
This covers the scenario of an instance created by a spot request. Using
Terraform we only know the spot request is fulfilled but the instance can
still be pending which causes the attachment to fail.
2017-03-07 16:20:01 +02:00
Jack Bruno 6c0caaf1dd Fix aws_dms_replication_task diff for json with whitespace. (#12380) 2017-03-07 16:00:02 +02:00
stack72 1dedf666df
provider/aws: Adding an acceptance test to for ForceNew on
ecs_task_definition volumes
2017-03-07 15:53:00 +02:00
Pawel Burchard aa8de2f8cf
provider/aws: (#10587) Changing volumes in ECS task definition should force new revision. 2017-03-07 15:53:00 +02:00
stack72 61c101da29
Merge branch 'Originate-mb-fix-spot-fleet-request' 2017-03-07 15:28:24 +02:00
stack72 80e8418846
provider/aws: Change aws_spot_fleet_request tests to use the correct
hash values in test cases
2017-03-07 15:14:52 +02:00
Clint d2f728e6cd provider/aws: Only send iops when creating io1 devices. Fix docs (#12392) 2017-03-07 14:44:39 +02:00
Dana Hoffman 322044695b provider/google: initial commit for node pool resource (#11802)
provider/google: initial commit for node pool resource
2017-03-06 14:59:24 -08:00
stack72 2d0770c507
Merge branch 'mb-fix-spot-fleet-request' of https://github.com/Originate/terraform into Originate-mb-fix-spot-fleet-request 2017-03-06 16:03:16 +02:00
Máximo Cuadros b58709aa91 provider/ignition: migration from resources to data resources (#11851)
* provider/ignition: migration from resources to data resources

* website: provider/ignition documention updated to data resources

* provider/ignition: backwards compatibility support for old resources
2017-03-06 14:23:04 +02:00
Brandon Clodius 22f69b1592 aws/provider: Fixes issue for aws_lb_ssl_negotiation_policy of already deleted ELB (#12360)
* Ensures elb exists before negotiation policy check; Fixes #11260

* Adds acceptance test case for missing elb

* Adds back https properties for test elb
2017-03-06 13:48:35 +02:00
Paul Stack bed8940953 provider/aws: Populate the iam_instance_profile uniqueId (#12449)
Fixes: #12430
2017-03-06 13:39:49 +02:00
yanndegat 09b1f4e1be provider/openstack: Add openstack_networking_network_v2 datasource (#12304) 2017-03-06 13:25:08 +02:00
Joe Topjian 3759e36784 provider/cobbler: Profile and System Fixes (#12452)
* vendor: Updating cobblerclient for Cobbler

* provider/cobbler: Fix Profile Repos

This commit fixes a bug where adding repos would result in an error.
This was due to the Cobbler API wanting a space-separated list of
repos rather than an array. The Cobbler Service will split the string
by space when used internally, but will always present the repos
as a string.

* provider/cobbler: System Interface Management Test

This commit adds a test to verify that the Management
parameter of System Interfaces works.
2017-03-06 13:19:30 +02:00
Pasha Palangpour ce633f2321 provider/ns1: Add notify list resource (#12373)
* Allow for local development with ns1 provider.

* Adds first implementation of ns1 notification list resource.

* NS1 record.use_client_subnet defaults to true, and added test for field.

* Adds more test cases for monitoring jobs.

* Adds webhook/datafeed notifier types and acctests for notifylists.

* Adds docs for notifylists resource.

* Updates ns1-go rest client via govendor

* Fix typos in record docs
2017-03-05 16:21:06 +02:00
Joe Topjian 120e3af178 provider/openstack: Toggle Creation of Default Security Group Rules (#12119)
This commit modifies the behavior implemented in #9799 by enabling
the user to be able to toggle the creation of the default security
group rules.
2017-03-05 16:18:00 +02:00
Radek Simko 7d6e2837e1 mysql: Avoid crash on un-interpolated provider cfg (#12391) 2017-03-05 15:58:15 +02:00
Joe Topjian 4ba145a3ac provider/openstack: Handle cases where volumes are disabled (#12374)
This commit handles the case where the volume API extensions are
disabled.
2017-03-05 15:53:09 +02:00
Andre Silva d50f2aca6f provider/statuscake: use default status code list when updating test (#12375) 2017-03-05 15:44:22 +02:00
David Harris 01f995fed5 provider/aws: Return errors from Elastic Beanstalk (#12425)
In the event that an unexpected state is returned from
`environmentStateRefreshFunc` errors in the Elastic Beanstalk console
will not be returned to the user.
2017-03-05 15:28:37 +02:00
Joe Topjian 959c197dc3 provider/openstack: rename image data source files (#12439) 2017-03-04 20:24:19 +02:00
Maxime Bury 0af10dec41 Fix spurious user_data diffs 2017-03-03 17:58:18 -08:00
Maxime Bury 93c4730de7 Properly handle 'vpc_security_group_ids', drop phantom 'security_groups' 2017-03-03 17:25:15 -08:00
Maxime Bury 4eba77eaee Default 'ebs_optimized' and 'monitoring' to false 2017-03-03 17:23:15 -08:00
Paddy 6de8e25b16 Merge pull request #12434 from hashicorp/paddy_fix_gcp_storage_region_test
provider/google: add location to storage tests.
2017-03-03 16:58:18 -08:00
Paddy 6531ef57e1 provider/google: log the op name in sql op errors.
To aid in tracking down the error that's causing
TestAccGoogleSqlDatabaseInstance_basic to fail (it's claiming an op
can't be found?) I've added the op name (which is unique) to the error
output for op errors.
2017-03-03 16:45:25 -08:00
Paddy a318cd9d61 provider/google: add location to storage tests.
Add location to storage tests that need it, which fixes the failing
TestAccStorageStorageClass test.
2017-03-03 15:51:36 -08:00
Paddy 09a2886546 Merge pull request #12397 from hashicorp/paddy_gcp_storage_rate_limit
provider/google: retry storage creation/deletion on rate limiting
2017-03-03 13:15:46 -08:00
clint shryock a0a26748f8 provider/aws: Randomize a flow log test 2017-03-03 11:55:58 -06:00
clint shryock 2d045a3302 provider/aws: Update Autoscaling attachment test 2017-03-03 11:18:30 -06:00
Paddy 3cb5107bd2 provider/google: retry storage creation/deletion on rate limiting
Our GCP storage tests are really flaky right now due to rate limiting.
In theory, this could also impact Terraform users that are
deleting/creating large numbers of Google Cloud Storage buckets at once.

To fix, I'm detecting the specific error code that GCP returns when it's
a rate limit error, and using that with resource.Retry to try the
request again.
2017-03-02 16:42:28 -08:00
Clint 3aba4af5b0 Merge pull request #12385 from hashicorp/b-aws-instance-ipv6-fix
provider/aws: Always set ipv6 addresses in read
2017-03-02 16:32:38 -06:00
clint shryock 9bb2628c49 provider/aws: Always set ipv6 addresses in read 2017-03-02 15:00:24 -06:00
Clint 2fe5976aec helper/schema: Add configurable Timeouts (#12311)
* helper/schema: Add custom Timeout block for resources

* refactor DefaultTimeout to suuport multiple types. Load meta in Refresh from Instance State

* update vpc but it probably wont last anyway

* refactor test into table test for more cases

* rename constant keys

* refactor configdecode

* remove VPC demo

* remove comments

* remove more comments

* refactor some

* rename timeKeys to timeoutKeys

* remove note

* documentation/resources: Document the Timeout block

* document timeouts

* have a test case that covers 'hours'

* restore a System default timeout of 20 minutes, instead of 0

* restore system default timeout of 20 minutes, refactor tests, add test method to handle system default

* rename timeout key constants

* test applying timeout to state

* refactor test

* Add resource Diff test

* clarify docs

* update to use constants
2017-03-02 11:07:49 -06:00