Commit Graph

5669 Commits

Author SHA1 Message Date
James Bardin 68ba2d6ff0 ResourceConfig.get should never return (nil, true)
Fixes a case where ResourceConfig.get inadvertently returns a nil value.

Add an integration test where assigning a map to a list via
interpolation would panic.
2016-11-18 16:24:40 -05:00
Evan Brown 3920460220 Merge pull request #10081 from aditya87/google_compute_image_timeout
Added create timeout for compute images and instances
2016-11-17 12:56:02 -08:00
Paddy 642dd87f34 Merge pull request #9946 from evandbrown/google-service-account-resource
providers/google: Create and delete Service Accounts
2016-11-17 11:03:21 -08:00
Evan Brown a32fe2d47f Resolve review feedback 2016-11-17 09:49:22 -08:00
Raphael Randschau a422bf02f1 provider/scaleway: improve volume attachment (#10084)
* provider/scaleway: increase wait for server time

according to the scaleway community, shutdown/ startup might actually take an
hour. since a regular shutdown transfers data this is bound by the size of the
actual volumes in use.

https://community.online.net/t/solving-the-long-shutdown-boot-when-only-needed-to-attach-detach-a-volume/326

anyhow, 20 minutes seems quite optimistic, and we've seen some timeout errors in
the logs, too

* provider/scaleway: clear cache on volume attachment

the volume attachment errors quite often, and while I have no hard evidence
(yet) I guess it might be related to the cache that the official scaleway SDK
includes.

for now this is just a tiny experiment, clearing the cache when creating/
destroying volume attachments. let's see if this improves anything, really

* provider/scaleway: guard against attaching already attached volumes

* provider/scaleway: use cheaper instance types for tests

Scaleway bills by the hour and C2S costs much more than C1, since in the tests
we just spin up instances, to destroy them later on...
2016-11-17 15:08:05 +02:00
Chris Marchesi 99528f17cd provider/aws: Add CertificateNotFound retry waiter to aws_alb_listener (#10180)
Looks like sometimes it takes some time for IAM certificates to
propagate, which can cause errors on ALB listener creation.
Possibly same thing as hashicorp/terraform#5178, but for ALB
now instead of ELB.

This was discovered via acceptance tests, specifically the
TestAccAWSALBListener_https test. Updated the creation process to wait
on CertificateNotFound for a max of 5min.
2016-11-17 14:49:41 +02:00
Andrew Garrett 3822c69995 Add name_prefix to aws_iam_policy (#10178)
This is intended to behave the same way as name_prefix does in
aws_iam_role.

Fixes #10176
2016-11-17 14:03:03 +02:00
Clint d004a24659 Merge pull request #10171 from Ninir/vpc_enable_dns_support
provider/aws: Fixed the aws_vpc enable_dns_support handling on creation
2016-11-16 13:41:35 -06:00
Ninir 281eba72ad provider/aws: Fixed the aws_vpc enable_dns_support handling on creation 2016-11-16 20:05:49 +01:00
Paul Stack e319d2cd59 Merge pull request #10105 from hashicorp/f-chef-key_material
provider/chef: Migrate Chef to use KEY_MATERIAL rather than using a Pem file
2016-11-16 19:12:28 +02:00
stack72 50cab912af
provider/chef: Migrate Chef to use KEY_MATERIAL rather than using a Pem
file

This will allow us to standardise on how we set KEY_MATERIAL
2016-11-16 19:03:37 +02:00
Ninir 3d56d20d82 Added retry_option for aws_kinesis_firehose_stream redshift_configuration 2016-11-15 10:55:02 -06:00
Clint 665ca05bf6 Merge pull request #10112 from Ninir/aws_kinesis_firehose_stream_buffer_option
provider/aws: kinesis_firehose_delivery_stream: Fixed ES buffering_interval option
2016-11-15 09:55:12 -06:00
Justin Nauman e36f424af3 GH-7311 - Increasing deletion timeout wait
- Per our discussion around the PR to increase this initially, we
weren't sure if 1 minute would be sufficient.  Well, it turns out it
wasn't for me today (we don't delete these often so not sure how
often people run into this).

Picking another somewhat arbitrary value of 5 minutes in the hopes
that it will be sufficient (today it took a little over 2 minutes).
2016-11-15 09:11:28 -06:00
Jeremy Asher ece6f30a21 increase aws_lambda_function timeout
Since the Lambda CreateFunction call may include an up to 50MB payload,
the request can easily take more than a minute.  This increases the
timeout to 10 minutes.
2016-11-14 15:50:39 -08:00
Ninir e077e4b260 provider/aws: fixed buffering_interval option 2016-11-14 22:18:11 +01:00
Evan Brown 4bdf65c36f Fix spacing inconsistencies 2016-11-14 11:12:55 -08:00
Evan Brown 1612d6a78f Fix go vet issue 2016-11-14 09:59:44 -08:00
Evan Brown 9a188049a7 providers/google: random resource names in SA test 2016-11-14 09:42:11 -08:00
James Bardin bda84e03f7 Merge pull request #10032 from hashicorp/jbardin/vet
Fix future vet errors in providers
2016-11-14 08:49:16 -05:00
Paul Stack ecb2b74c37 Merge pull request #9534 from Ninir/aws_apigw_deployment_date
provider/aws: 	Exposed aws_api_gateway_deployment.created_date attribute
2016-11-14 12:11:59 +00:00
Paul Stack 24231333d3 Exposed AWS API GW REST Api created_date attribute (#9532) 2016-11-14 12:09:28 +00:00
Ninir a88b25cfcf Exposed AWS API GW REST Api created_date attribute 2016-11-14 11:56:41 +01:00
Ninir 6fb63f2854 Exposed aws_api_gateway_deployment.created_date attribute 2016-11-14 11:21:36 +01:00
Ninir 932c92e4c6 Exposed aws_api_gateway_api_key created_date & last_updated_date (#9530) 2016-11-14 12:03:56 +02:00
Ninir d8e846c895 Fixed ##10079 exposing aws_iam_role create_date attribute (#10091) 2016-11-14 11:33:53 +02:00
Evan Brown 5423349b68 providers/google: Create and delete Service Accounts 2016-11-13 20:47:20 -08:00
Aditya Anchuri 49c7d272a3 Added create timeout for compute images and instances
- Prevents the corresponding terraform resource from timing out when the
  images or instances take longer than the default of 4 minutes to be
  created
2016-11-12 18:30:02 -08:00
Paul Stack 3472cab7d6 provider/aws: Fix panic in aws_acm_certificate datasource (#10051)
Fixes #10042
Fixes #9989

Another panic was found with this resource. IT essentially was causing a
panic when no certificates were found. This was due to the casting of
status to []string

There are times when there are no statuses passed in. Made the error
message a lot more generic now rather than having something like this

```

No certificate with statuses [] for domain mytestdomain.com found in this region.
```

This now becomes:

```
No certificate for domain mytestdomain.com found in this region.
```

Also, added a test to show that the panic is gone

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAwsAcmCertificateDataSource_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/11 15:11:33 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAwsAcmCertificateDataSource_ -timeout 120m
=== RUN   TestAccAwsAcmCertificateDataSource_noMatchReturnsError
--- PASS: TestAccAwsAcmCertificateDataSource_noMatchReturnsError (6.07s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws6.094s
```
2016-11-11 16:07:50 +02:00
Andreas Skarmutsos Lindh 5e32c144d5
Ignore AWS specific tags
Allows us to adopt resources created with CloudFormation.

Extend AWS specific tag ignoring to all tags*

Ignore AWS specific tags for autoscaling
2016-11-11 15:40:09 +02:00
Peter McAtominey 4996f3e289 provider/azurerm: allow updating load balancer sub-resources (#10016)
* provider/azurerm: allow updating of lb_rule resource

* check if rule is being updated rather than assuming created
* added test to cover guard against multiple rules with the same name

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMLoadBalancerRule_" -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerRule_basic
--- PASS: TestAccAzureRMLoadBalancerRule_basic (157.45s)
=== RUN   TestAccAzureRMLoadBalancerRule_removal
--- PASS: TestAccAzureRMLoadBalancerRule_removal (163.67s)
=== RUN   TestAccAzureRMLoadBalancerRule_inconsistentReads
--- PASS: TestAccAzureRMLoadBalancerRule_inconsistentReads (150.00s)
=== RUN   TestAccAzureRMLoadBalancerRule_update
--- PASS: TestAccAzureRMLoadBalancerRule_update (164.20s)
=== RUN   TestAccAzureRMLoadBalancerRule_duplicateRules
--- PASS: TestAccAzureRMLoadBalancerRule_duplicateRules (137.51s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	772.846s

* provider/azurerm: allow updating of lb_nat_rule resource

* check if NAT rule is being updated rather than assuming created
* added test to cover guard against multiple NAT rules with the same name

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMLoadBalancerNatRule" -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerNatRule_basic
--- PASS: TestAccAzureRMLoadBalancerNatRule_basic (148.48s)
=== RUN   TestAccAzureRMLoadBalancerNatRule_removal
--- PASS: TestAccAzureRMLoadBalancerNatRule_removal (163.48s)
=== RUN   TestAccAzureRMLoadBalancerNatRule_update
--- PASS: TestAccAzureRMLoadBalancerNatRule_update (176.97s)
=== RUN   TestAccAzureRMLoadBalancerNatRule_duplicate
--- PASS: TestAccAzureRMLoadBalancerNatRule_duplicate (136.36s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	625.301s

* provider/azurerm: allow updating of lb_probe resource

* check if probe is being updated rather than assuming created
* added test to cover guard against multiple probes with the same name

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMLoadBalancerProbe" -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerProbe_basic
--- PASS: TestAccAzureRMLoadBalancerProbe_basic (134.53s)
=== RUN   TestAccAzureRMLoadBalancerProbe_removal
--- PASS: TestAccAzureRMLoadBalancerProbe_removal (168.06s)
=== RUN   TestAccAzureRMLoadBalancerProbe_update
--- PASS: TestAccAzureRMLoadBalancerProbe_update (175.99s)
=== RUN   TestAccAzureRMLoadBalancerProbe_duplicate
--- PASS: TestAccAzureRMLoadBalancerProbe_duplicate (139.01s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	617.598s

* provider/azurerm: allow updating of lb_nat_pool resource

* check if NAT pool is being updated rather than assuming created
* added test to cover guard against multiple NAT pools with the same name

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMLoadBalancerNatPool" -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerNatPool_basic
--- PASS: TestAccAzureRMLoadBalancerNatPool_basic (146.52s)
=== RUN   TestAccAzureRMLoadBalancerNatPool_removal
--- PASS: TestAccAzureRMLoadBalancerNatPool_removal (158.34s)
=== RUN   TestAccAzureRMLoadBalancerNatPool_update
--- PASS: TestAccAzureRMLoadBalancerNatPool_update (174.05s)
=== RUN   TestAccAzureRMLoadBalancerNatPool_duplicate
--- PASS: TestAccAzureRMLoadBalancerNatPool_duplicate (136.94s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	615.866s
2016-11-11 13:09:00 +02:00
Anshul Sharma e1919edbb3 Allow underscore in database_name [redshift] (#10019)
* allow underscore in database_name [redshift]

Fixes #10009

* Added Test Cases To Validate Redshift DBName

* Remove Old Test Cases Regarding Redshift DBName Validation

* Added More Test Cases For Redshift DBName
2016-11-11 11:59:00 +02:00
James Bardin 909099560d Fix future vet errors in providers 2016-11-10 18:10:43 -05:00
clint shryock 303b07e61f provider/aws: Update AutoScaling Schedule test files to avoid conflicts 2016-11-10 11:36:57 -06:00
stack72 e02960810d
provider/aws: Rename zone_id to hosted_zone_id in aws_db_instance
Also added a test to prove that the computed value gets set

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBInstance_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/10 06:26:22 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSDBInstance_basic -timeout 120m
=== RUN   TestAccAWSDBInstance_basic
--- PASS: TestAccAWSDBInstance_basic (634.33s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws634.347s
```
2016-11-10 06:41:43 +00:00
stack72 58412762eb
Merge branch 'master' of https://github.com/freeman/terraform into freeman-master 2016-11-10 06:11:47 +00:00
Mitchell Hashimoto fd498fbfff Merge pull request #9538 from hashicorp/f-nomad-provider
provider/nomad: Nomad provider for managing jobs
2016-11-09 18:34:55 -08:00
Mitchell Hashimoto f35996cd23
providers/nomad: suppress diff for identical jobspecs 2016-11-09 18:25:03 -08:00
Michel Rasschaert 62ea843ff3 zone_id exported attribute for db_instance resource 2016-11-09 19:54:09 +01:00
Mitchell Hashimoto 064691b03c Merge pull request #9997 from BedeGaming/azurerm-configure-panic
provider/azurerm: move ConfigureFunc outside of Provider literal, fixes nil reference
2016-11-09 09:56:45 -08:00
Paul Stack 643d42c412 provider/aws: AWS IAM, User and Role allow + in the name (#9991)
Fixes #9985

```
% make testacc TEST=./builtin/providers/aws
% TESTARGS='-run=TestValidateIamUserName'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/09 12:12:42 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestValidateIamUserName
-timeout 120m
=== RUN   TestValidateIamUserName
--- PASS: TestValidateIamUserName (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws0.026s
```
2016-11-09 15:54:15 +00:00
Paul Stack d66359b046 provider/aws: Fix panic when passing statuses to aws_acm_certificate (#9990)
Fixes #9989

When passing a list of statuses to the acm_certificate data source, we
were trying to cast a schema.TypeList directly to []string

We need to do it via an []interface{} and then cast to string when
ranging over the results. Without this, we get a panic
2016-11-09 15:53:36 +00:00
Peter McAtominey a23c5bda72 provider/azurerm: move ConfigureFunc outside of Provider literal, fixes nil reference
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMDnsARecord_basic -timeout 120m
=== RUN   TestAccAzureRMDnsARecord_basic
--- PASS: TestAccAzureRMDnsARecord_basic (91.92s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	91.994s
2016-11-09 15:49:14 +00:00
Nick Santamaria 8949419bef provider/aws: Add key_name_prefix argument to aws_key_pair resource (#9993)
* Added key_name_prefix to aws_key_pair resource schema.

* Added logic to prefix the aws_key_pair name on create.

* Added aws_key_pair test config for key_name_prefix case.

* Copied test cases from testAccAWSSecurityGroup namespace.

* Modified copied test case to suit aws_key_pair resource.

* Changed required flag to optional on key_name argument for aws_key_pair resource.

* Added documentation for key_name_prefix argument.

* Code style fix.

* Fixed undefined variable error in test.
2016-11-09 15:35:51 +00:00
Peter McAtominey 464fb021f7 provider/azurerm: add virtual_machine_extension resource (#9962)
Picked up from where #6548 left off

settings and protected_settings take JSON objects as strings to make extension
generic

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMVirtualMachineExtension" -timeout 120m
=== RUN   TestAccAzureRMVirtualMachineExtension_importBasic
--- PASS: TestAccAzureRMVirtualMachineExtension_importBasic (697.55s)
=== RUN   TestAccAzureRMVirtualMachineExtension_basic
--- PASS: TestAccAzureRMVirtualMachineExtension_basic (824.17s)
=== RUN   TestAccAzureRMVirtualMachineExtension_concurrent
--- PASS: TestAccAzureRMVirtualMachineExtension_concurrent (929.74s)
=== RUN   TestAccAzureRMVirtualMachineExtension_linuxDiagnostics
--- PASS: TestAccAzureRMVirtualMachineExtension_linuxDiagnostics (803.19s)
PASS
ok 	github.com/hashicorp/terraform/builtin/providers/azurerm	3254.663s
2016-11-09 15:13:48 +00:00
ddcprg 27527ef3cb EMR Cluster - core_instance_count doesn't actually refer to core instances 2016-11-09 08:47:23 -06:00
jmasseo 77ca7001a8 removing toLower from flattenElastiCacheParameters - aws_elasticache_parameter_group parameters can be case sensitive (#9820) 2016-11-09 11:34:00 +00:00
Raphael Randschau e5ff0f0cb2 provider/scaleway: update sdk (#9976)
the SDK updates includes an fix for the image cache, which might lead to wrong
images ids being returned on lookup...
2016-11-09 09:32:56 +00:00
Mitchell Hashimoto 2b7177cfe7 Merge pull request #9607 from hashicorp/f-provider-stop-redo
terraform: ResourceProvider.Stop (redo)
2016-11-08 15:58:48 -08:00
Mitchell Hashimoto 646b3c1b68 Merge pull request #9158 from hashicorp/f-vault-provider
Vault Provider
2016-11-08 15:27:33 -08:00