Commit Graph

6063 Commits

Author SHA1 Message Date
Greg Thole e06f32ffe9 Provider AWS: Add Placement Strategy to aws_ecs_service resource (#11201)
* Add aws_ecs_service placement_strategy param

* Update docs
2017-01-17 18:10:44 +00:00
David Blooman 05c83a3ca1 provider/aws: Add Inspector Support (#11217)
* provider/aws: Add Inspector Support

* inscrease time to 1 hour
2017-01-17 17:30:46 +00:00
Peter McAtominey d97f7e5d7b provider/azurerm: use configured environment for storage clients (#11159)
This fixes storage related operations for all environments outside of the public
Azure cloud, tested by deploying all storage resources in a German subscription.
2017-01-17 16:28:24 +00:00
stack72 f6ac901315
Merge branch 'statuscake_adding_contact_group' of https://github.com/ldjohnson/terraform into ldjohnson-statuscake_adding_contact_group 2017-01-17 16:11:23 +00:00
Jake Champlin 679c952da5 Merge pull request #11206 from hashicorp/f-add-aggregator-datadog
provider/datadog: Add aggregator method to timeboard graph resource
2017-01-17 09:34:06 -05:00
Raphael Randschau 8183d4667a provider/scaleway: fix provider configuration (#11234)
properly fetch configuration from env - leftover from #10874
2017-01-17 12:50:10 +00:00
Conor Mongey 77c8683281 provider/vault: Remove user input for optional vault provider fields (#11082)
* Remove the need to input vault optional settings

* Allow TypeList to skip input

* Remove conflicts on vault ca_cert_* fields
2017-01-17 12:06:55 +00:00
Raphael Randschau 1e589f589c provider/scaleway improve bootscript data source (#11183)
* provider/scaleway: fix bootscript tests

the bootscript tests where failing because the referenced bootscript is no
longer available.

for now this just makes the tests pass again, next step should be to lookup a
bootscript so we don't have to update the tests all the time

* provider/scaleway: fix bootscript data source filter bug

when providing a name only the architecture was ignoerd, which can lead to
issues since some bootscript names are identical, even though the architecture
is different.

* provider/scaleway: remove data bootscript exact name test

the test fails after some time because scaleway removes older bootscripts.
let's just settle with filtered tests for now, which don't have this problem.
2017-01-17 12:05:16 +00:00
Ollie Ford ed2b959f7e Fix contradiction in terms with provider documentation (#10815) (#10874)
* Remove contradiction with Scaleway documentation

The parameters previously termed by Terraform:

1. Organization
2. Access key

Are referred to, respectively, by Scaleway [0] as:

1. Access key
2. Token

which is a confusing contradiction for a user.

Since Scaleway terms (1) both 'access key' [0] and 'organization ID' [1],
@nicolai86 suggested keeping the latter as already used, but changing (2) for
'token'; removing the contradiction.

This commit thus changes the parameters to:

1. Organization
2. Token

Closes #10815.

[0] - https://cloud.scaleway.com/#/credentials
[1] - https://www.scaleway.com/docs/retrieve-my-organization-id-throught-the-api

* Update docs to reflect Scaleway offering x86

Scaleway now provides x86 servers [0] as well as ARM.

This commit removes 'ARM' from various references suggesting that might be the
only option.

[0] - https://blog.online.net/2016/03/08/c2-insanely-affordable-x64-servers/
2017-01-17 12:02:55 +00:00
Máximo Cuadros 40902f3e40 provider/ignition: allowing empty systemd.content when a dropin is provided (#11216) 2017-01-17 11:49:45 +00:00
Jake Champlin fd20f16a06 Merge pull request #11197 from hashicorp/f-add-cloudflare-record-validation
provider/cloudflare: Add validation for record types and record content
2017-01-13 18:20:03 -05:00
Jake Champlin f38e72f5fb
Fix fmt.Errorf() formatting 2017-01-13 18:19:35 -05:00
Jake Champlin 8fdc6518c8
provider/datadog: Add aggregator method to timeboard graph resource
Adds aggregator argument to the timeboard graph resource.

Ex:
```
request {
  q = "top(avg:docker.cpu.system{*} by {container_name}, 10, 'mean', 'desc')"
  aggregator = "sum"
}
```

```
$ make testacc TEST=./builtin/providers/datadog TESTARGS='-run=TestAccDatadogTimeboard_update'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/13 17:52:50 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/datadog -v -run=TestAccDatadogTimeboard_update -timeout 120m
=== RUN   TestAccDatadogTimeboard_update
--- PASS: TestAccDatadogTimeboard_update (82.60s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/datadog        82.619s
```

Fixes: #11168
2017-01-13 18:08:41 -05:00
James Bardin ee1d6d3d43 Fix vet errors in providers 2017-01-13 17:31:44 -05:00
Jake Champlin 6a31ed5ee8
Use a better format in error output 2017-01-13 15:43:47 -05:00
Clint 2599137150 Merge pull request #11164 from johanneswuerbach/aws-route53-changeable-record-type
provider/aws: Make the type of a route53_record changeable
2017-01-13 13:51:35 -06:00
Jake Champlin 8ac7f53c33
provider/cloudflare: Add validation for record types and record content
Adds a validation function for cloudflare record types. Also adds an apply-time validation for the record's content based on record type. Currently only validating `A` and `AAAA` records, can be expanded to verify record content for every possible record type in the future.

```
$ make test TEST=./builtin/providers/cloudflare
==> Checking that code complies with gofmt requirements...
==> Checking AWS provider for unchecked errors...
==> NOTE: at this time we only look for uncheck errors in the AWS package
==> Installing errcheck...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/13 14:41:37 Generated command/internal_plugin_list.go
TF_ACC= go test ./builtin/providers/cloudflare  -timeout=30s -parallel=4
ok      github.com/hashicorp/terraform/builtin/providers/cloudflare     0.018s
```

Fixes: #11173
2017-01-13 14:42:13 -05:00
Paul Stack 8e4f19918a provider/aws: Add Support for aws_cloudwatch_metric_alarm extended (#11193)
statistic

Fixes: #11189

This introduces a new parameter and makes an existing parameter from
`required` to `optional` as both cannot be specified together

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm_' 2 ↵ ✹ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/13 11:25:24 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudWatchMetricAlarm_ -timeout 120m
=== RUN   TestAccAWSCloudWatchMetricAlarm_importBasic
--- PASS: TestAccAWSCloudWatchMetricAlarm_importBasic (19.80s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_basic
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (20.42s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_extendedStatistic
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (18.92s)
PASS
```
2017-01-13 14:47:58 +00:00
Sam Crang a4c4b791ae Add support for StatusCake confirmation servers (#11179)
* Add support for StatusCake confirmation servers

* Add documentation for new StatusCake confirmations argument
2017-01-13 11:35:15 +00:00
Raphael Randschau 3954c1ecf0 provider/scaleway: delay between requests when waiting (#11184)
the CI sees many failing Scaleway tests due to request quotas being exceeded.
this PR aims to address this issue by switching from `resource.Retry`, which
waits 100ms between retries, to `resource.StateChangeConf` with a configured
delay of 5s between retries.

this should help us fixing the quota issue…
2017-01-13 10:49:16 +00:00
Jake Champlin a2c0b85b2d Merge pull request #11162 from hashicorp/f-add-route53-record-import-10941
provider/aws: Add import to route53 record
2017-01-12 12:08:46 -05:00
Jake Champlin bb0b9048b0 Merge pull request #11178 from hashicorp/cloudwatch-log-tags
provider/aws: Add Support for Tags to aws_cloudwatch_log_group
2017-01-12 10:21:07 -05:00
Paul Stack 6b292c23dc Update resource_aws_cloudwatch_log_group.go 2017-01-12 17:14:29 +02:00
Paul Stack bcdabe7619 provider/aws: New DataSource: aws_elb_hosted_zone_id (#11027)
* provider/aws: New DataSource: aws_elb_hosted_zone_id

This datasource is a list of all of the ELB DualStack Hosted Zone IDs.
This will allow us to reference the correct hosted zone id when creating
route53 alias records

There are many bugs for this - this is just the beginning of fixing them

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

* Update elb_hosted_zone_id.html.markdown
2017-01-12 16:50:58 +02:00
stack72 188350458c
provider/aws: Add Support for Tags to aws_cloudwatch_log_group
``````
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchLogGroup_'                               2 ↵ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/12 16:22:07 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudWatchLogGroup_ -timeout 120m
=== RUN   TestAccAWSCloudWatchLogGroup_importBasic
--- PASS: TestAccAWSCloudWatchLogGroup_importBasic (44.20s)
=== RUN   TestAccAWSCloudWatchLogGroup_basic
--- PASS: TestAccAWSCloudWatchLogGroup_basic (38.08s)
=== RUN   TestAccAWSCloudWatchLogGroup_retentionPolicy
--- PASS: TestAccAWSCloudWatchLogGroup_retentionPolicy (55.85s)
=== RUN   TestAccAWSCloudWatchLogGroup_multiple
--- PASS: TestAccAWSCloudWatchLogGroup_multiple (20.68s)
=== RUN   TestAccAWSCloudWatchLogGroup_disappears
--- PASS: TestAccAWSCloudWatchLogGroup_disappears (21.48s)
=== RUN   TestAccAWSCloudWatchLogGroup_tagging
--- PASS: TestAccAWSCloudWatchLogGroup_tagging (39.09s)
ok
PASS	github.com/hashicorp/terraform/builtin/providers/aws	219.411s
```
2017-01-12 16:39:12 +02:00
Paul Stack 73e950989c provider/aws: Allow creating aws_codecommit repository outside of (#11177)
us-east-1

Fixes #11175

Because of a previous limitation that codecommit only ran in us-east-1,
we hard coded the session under which it should run. This has caused the
repository to be spun up in the wrong region regardless of what region
was passed to the provider

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCodeCommitRepository_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/12 16:09:52 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCodeCommitRepository_ -timeout 120m
=== RUN   TestAccAWSCodeCommitRepository_basic
--- PASS: TestAccAWSCodeCommitRepository_basic (23.28s)
=== RUN   TestAccAWSCodeCommitRepository_withChanges
--- PASS: TestAccAWSCodeCommitRepository_withChanges (33.71s)
=== RUN   TestAccAWSCodeCommitRepository_create_default_branch
--- PASS: TestAccAWSCodeCommitRepository_create_default_branch (22.70s)
=== RUN   TestAccAWSCodeCommitRepository_create_and_update_default_branch
--- PASS: TestAccAWSCodeCommitRepository_create_and_update_default_branch (32.72s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	112.437s
```
2017-01-12 16:27:04 +02:00
zbikmarc 77037bed2c providers/google: Add subnetwork_project field to enable cross-project networking in instance templates (#11110)
* Add subnetwork_project field to allow for XPN in GCE instance templates

* Missing os import

* Removing unneeded check

* fix formatting

* Add subnetwork_project to read
2017-01-12 16:05:13 +02:00
Joe Topjian 91147fe11c provider/openstack: LoadBalancer Security Groups (#11074)
* provider/openstack: LoadBalancer Security Groups

This commit adds the ability to specify security groups on a loadbalancer
resource.

* provider/openstack: LoadBalancer Security Groups Refactor

Moving common security group code into a dedicated function.
2017-01-12 16:00:32 +02:00
Peter McAtominey b869e1682a provider/azurerm: make lb sub resources idempotent (#11128)
If an error occurred which prevented the lb sub resources being written to state
then the next apply would fail as the resources would already exist in the API.

go test -c ./builtin/providers/azurerm -o ./builtin/providers/azurerm/test-azurerm
TestAccAzureRMLoadBalancerBackEndAddressPool_reapply
TestAccAzureRMLoadBalancerBackEndAddressPool_removal
TestAccAzureRMLoadBalancerNatPool_basic
TestAccAzureRMLoadBalancerBackEndAddressPool_basic
TestAccAzureRMLoadBalancerNatRule_basic
TestAccAzureRMLoadBalancerNatPool_reapply
TestAccAzureRMLoadBalancerNatPool_removal
TestAccAzureRMLoadBalancerNatPool_update
TestAccAzureRMLoadBalancerProbe_basic
TestAccAzureRMLoadBalancerNatRule_removal
TestAccAzureRMLoadBalancerNatRule_update
TestAccAzureRMLoadBalancerNatRule_reapply
TestAccAzureRMLoadBalancerProbe_removal
TestAccAzureRMLoadBalancerProbe_reapply
TestAccAzureRMLoadBalancerProbe_update
TestAccAzureRMLoadBalancerRule_basic
TestAccAzureRMLoadBalancerRule_inconsistentReads
TestAccAzureRMLoadBalancerRule_removal
TestAccAzureRMLoadBalancerProbe_updateProtocol
TestAccAzureRMLoadBalancer_basic
TestAccAzureRMLoadBalancerRule_update
TestAccAzureRMLoadBalancerRule_reapply
TestAccAzureRMLoadBalancer_frontEndConfig
TestAccAzureRMLoadBalancer_tags
2017-01-12 15:57:07 +02:00
Peter McAtominey 57b9e7b30a provider/azurerm: add caching support for virtual_machine data_disks (#11142) 2017-01-12 15:52:40 +02:00
Johannes Würbach ef0196f754
provider/aws: Make the type of a route53_record changeable
Utilize the ChangeResourceRecordSets to change the type of a record by
deleting and recreating with a new type.

As change batches are considered transactional changes, Amazon Route 53
either makes all or none of the changes in the batch request ensuring the
update will never be partially applied.
2017-01-12 13:13:35 +01:00
Sean Chittenden 4278c615af
Follow up to #11161 to fix `connection_limit` updates to a ROLE. 2017-01-11 16:24:00 -08:00
Sean Chittenden 864c7691b1 Merge pull request #11165 from hashicorp/b-11161
Add a test to make sure the implied `connection_limit` default of `-1` is always set.
2017-01-11 15:23:32 -08:00
Sean Chittenden 9201265395
Add a test to make sure the implied `connection_limit` default of `-1` is always set.
Covers: #11161
2017-01-11 15:21:17 -08:00
Jake Champlin e579c1c90f
provider/aws: Add import to route53 record
Allows the user to run:

```
terraform import aws_route53_record.record_name <record_id>
```

Fixes: #10941
2017-01-11 17:38:02 -05:00
pbthorste 11f680a88e remove computed true for postgres connections 2017-01-11 22:55:50 +01:00
pbthorste 0c1175f78b set default postgres connection limit 2017-01-11 22:45:30 +01:00
Jake Champlin 642e0107e1
Update error message to 'route_table_id' 2017-01-11 13:23:40 -05:00
Jake Champlin 439b94707e
Use 'route_table_id' instead of 'rtb_id' 2017-01-11 13:22:29 -05:00
Jake Champlin d794bdfc26
provider/aws: Add missing id argument for Route Table data source
Documentation for the `aws_route_table` data source mentions that it supports a route table `id` as an argument, however it was missing from the actual provider code.

Adds in the missing provider code, adds a test, and updates the documentation to use `rtb_id` as the argument, instead of the more ambiguous `id`.
2017-01-11 13:16:52 -05:00
Jake Champlin 7399401b64
provider/aws: Fix panic caused by main route table lookup
A VPC's main route table has an implicit subnet association, not an explicit subnet association. This caused a Terraform panic when using the `data_source_aws_route_table` resource to query the main route table for a VPC.

This fixes the Terraform panic, and allows the data lookup to complete successfully. Also added an acceptance test to verify the bugfix.

Fixes: #11134
2017-01-11 12:33:15 -05:00
clint shryock 87bb691800 Revert "New provider arukas (#10862)"
This reverts commit 9176bd4861.
This provider includes a dependency that at time of writing requires a
*nix system, and will not build on Windows.
2017-01-11 09:04:32 -06:00
Jake Champlin 712b3e74b6
provider/digitalocean: Fix failing acceptance test
The second step of the `TestAccDigitalOceanDroplet_ResizeWithOutDisk` acceptance test was regularly failing. Upon investigation it was found that the second step's Terraform configuration had omitted the `user_data` parameter, thus forcing Terraform to create a new droplet resource instead of updating the current resource.

```
-/+ digitalocean_droplet.foobar
    disk:                 "20" => "<computed>"
    image:                "centos-7-x64" => "centos-7-x64"
    ipv4_address:         "138.197.0.55" => "<computed>"
    ipv4_address_private: "" => "<computed>"
    ipv6_address:         "" => "<computed>"
    ipv6_address_private: "" => "<computed>"
    locked:               "false" => "<computed>"
    name:                 "foo" => "foo"
    region:               "nyc3" => "nyc3"
    resize_disk:          "true" => "false"
    size:                 "512mb" => "1gb"
    ssh_keys.#:           "1" => "1"
    ssh_keys.0:           "5770472" => "5770472"
    status:               "active" => "<computed>"
    user_data:            "foobar" => "" (forces new resource)
    vcpus:                "1" => "<computed>"
```

This fixes the acceptance test by adding the missing `user_data` parameter.
2017-01-10 10:00:04 -05:00
Ninir fe60b4e90a Added aws-sdk-go SFN service (#11109) 2017-01-10 14:17:39 +00:00
Peter McAtominey 825a41aa08 provider/azurerm: fix update protocol for lb_probe (#11125)
request_path had Computed enabled which prevented updating it to an empty value

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMLoadBalancerProbe -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerProbe_basic
--- PASS: TestAccAzureRMLoadBalancerProbe_basic (119.63s)
=== RUN   TestAccAzureRMLoadBalancerProbe_removal
--- PASS: TestAccAzureRMLoadBalancerProbe_removal (122.50s)
=== RUN   TestAccAzureRMLoadBalancerProbe_update
--- PASS: TestAccAzureRMLoadBalancerProbe_update (129.98s)
=== RUN   TestAccAzureRMLoadBalancerProbe_duplicate
--- PASS: TestAccAzureRMLoadBalancerProbe_duplicate (115.22s)
=== RUN   TestAccAzureRMLoadBalancerProbe_updateProtocol
--- PASS: TestAccAzureRMLoadBalancerProbe_updateProtocol (127.25s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	614.657s
2017-01-10 08:49:30 +00:00
Paddy 690db74d4a Read update_strategy before overwriting it. (#11013)
As brought up in #10174, our update_strategy property for instance group
managers in GCP would always be set to "RESTART" on read, even if the
user asked for them to be "NONE" in the config.

This adds a test to ensure that the user wishes were respected, which
fails until we check for update_strategy in the ResourceData before we
update it within the Read function. Because the update_strategy property
doesn't map to anything in the API, we never need to read it from
anywhere but the config, which means the ResourceData should be
considered authoritative by the time we get to the Read function.

The fix for this was provided by @JDiPierro in #10198 originally, but
was missing tests, so it got squashed into this.
2017-01-09 23:15:50 +00:00
Clint c0d0f711d9 provider/aws: Allow disabled access_log in ELB (#11120)
* provider/aws: Save disabled ELB accesslogs to state

Save any explicitly disabled access_log to state. Do not save disabled
access_logs if they are not in the configuration.

* test that fails on master
2017-01-09 23:10:58 +00:00
Jake Champlin 1955ac38bc
provider/aws: Route53 Record: Add Type validation
Adds validation for the `type` parameter of an `aws_route53_record` resource.

This will allow Terraform to catch any user errors of a `type` parameter during a `terraform plan` instead of during a `terraform apply`.

Fixes: #11114
2017-01-09 15:45:26 -05:00
Paul Stack 519d873263 provider/aws: New Resource aws_codedeploy_deployment_config (#11062)
* provider/aws: New Resource - aws_codedeploy_deployment_config

* provider/aws: Adding acceptance tests for new
aws_codedeploy_deployment_config resource

* provider/aws: Documentation for the aws_codedeploy_deployment_config resource

* Update codedeploy_deployment_config.html.markdown
2017-01-09 19:17:09 +00:00
Paul Stack 5ece0f2d04 provider/aws: aws_db_instance restored from snapshot had problem with (#11050)
subnet_group

Fixes #11024

A change was introduced in 0.8.2 that allows db_instances to change
their db_subnet_group. Unfortunately, this caused an issue for
db_instances that were being restored from snapshot. The restore from
snapshot part of create calls the Update func whereas a normal create
calls the Read func

When calling the Update func, the db_instance was trying to go through a
db_subnet_group_name change and was failing for the following reason:

```
InvalidVPCNetworkStateFault: You cannot move DB instance _rds_instance_name_ to subnet group _subnet_group_name_. The specified DB subnet group and DB instance are in the same VPC. Choose a DB subnet group in different VPC than the specified DB instance and try again.
```
2017-01-09 19:10:13 +00:00