Commit Graph

6509 Commits

Author SHA1 Message Date
Joe Topjian 85de5f1e04 provider/openstack: Rename provider to loadbalancer_provider (#12239)
* provider/openstack: Rename provider to loadbalancer_provider

This commit renames provider to loadbalancer_provider in the
openstack_lb_loadbalancer_v2 resource.

It also changes security_group_ids to Computed so default
security groups are added to the state correctly.

* provider/openstack: Switch to a deprecation path for loadbalancer provider

This commit switches to using a deprecation path for removal of the
previous "provider" argument in favor of the new "loadbalancer_provider".
2017-02-28 16:06:49 +00:00
Brian Flad 4372592f0c
provider/datadog: Add datadog_user resource (#12268)
* provider/datadog: Add datadog_user resource

* provider/datadog: Fix datadog_user import test, simplify datadog_user ACC tests, more consise documentation
2017-02-27 10:38:54 +00:00
Joe Topjian 5a514f22f7 provider/openstack: Add Additional Targets for LBaaS v1 Member (#12266)
This commit adds CREATED and DOWN as additional valid targets
for creating LBaaS v1 members.
2017-02-27 10:32:16 +00:00
Joe Topjian 9d3606c1b2 provider/openstack: Update Development Documentation (#12265)
This commit removes the bundled devstack script and updates the
documentation to point to the latest build scripts used for
testing. It also mentions that development should be possible on
any OpenStack environment.
2017-02-27 10:27:55 +00:00
Eric Westfall 72da290e1d provider/aws: Fix error message returned when an invalid SSM document type is provided. The original error appears to have been copied from the CodeBuild resource and provides incorrect information about valid types. 2017-02-25 06:26:59 +00:00
James Bardin fd2ea3cd82 remove log.Fatal from test
also increase the timeout for slow test hosts.
2017-02-24 18:48:48 -05:00
Erik Jansson 99e839b66d provider/aws: Fix update of environment_variable in codebuild_project (#12169)
* Fix for environment_variable not updating

* Add update test

* Fix for tags not passing update test

* Fix for nil in statefile
2017-02-23 23:57:34 +02:00
Paul Stack 861706921c provider/digitalocean: Add support for LoadBalancers (#12077)
* provider/digitalocean: Add support for LoadBalancers

Fixes: #11945

```
% make testacc TEST=./builtin/providers/digitalocean TESTARGS='-run=TestAccDigitalOceanLoadbalancer_'                                  2 ↵ ✹ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/18 21:49:11 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/digitalocean -v -run=TestAccDigitalOceanLoadbalancer_ -timeout 120m
=== RUN   TestAccDigitalOceanLoadbalancer_Basic
--- PASS: TestAccDigitalOceanLoadbalancer_Basic (121.18s)
=== RUN   TestAccDigitalOceanLoadbalancer_Updated
--- PASS: TestAccDigitalOceanLoadbalancer_Updated (168.35s)
=== RUN   TestAccDigitalOceanLoadbalancer_dropletTag
--- PASS: TestAccDigitalOceanLoadbalancer_dropletTag (131.31s)
PASS
ok	github.com/hashicorp/terraform/builtin/providers/digitalocean	420.851s
```

* provider/digitalocean: Addressing PR feedback from @catsby
2017-02-23 23:41:20 +02:00
Paul Stack 9fc577547c provider/aws: Fix the panic in ssm_association with parameters (#12215)
Fixes: #12205

You cannot use an index of an empty slide therefore, we got a panic as follows:

```
aws_ssm_association.foo: Creating...
  instance_id:              "" => "i-002f3898dc95350e7"
  name:                     "" => "test_document_association-%s"
  parameters.%:             "" => "2"
  parameters.directoryId:   "" => "d-926720980b"
  parameters.directoryName: "" => "corp.mydomain.com"
Error applying plan:

1 error(s) occurred:

* aws_ssm_association.foo: 1 error(s) occurred:

* aws_ssm_association.foo: unexpected EOF

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
panic: runtime error: index out of range
2017/02/23 21:41:45 [DEBUG] plugin: terraform-provider-aws:
2017/02/23 21:41:45 [DEBUG] plugin: terraform-provider-aws: goroutine 1419 [running]:
2017/02/23 21:41:45 [DEBUG] plugin: terraform-provider-aws: panic(0x1567480, 0xc42000c110)
2017/02/23 21:41:45 [DEBUG] plugin: terraform-provider-aws: 	/usr/local/Cellar/go/1.7.4_1/libexec/src/runtime/panic.go:500 +0x1a1
```
2017-02-23 22:22:14 +02:00
Alexander e72ac9f279 Setting incident_urgency_rule as optional (#12211) 2017-02-23 21:35:45 +02:00
Alexander 229a1343b4 provider/pagerduty: Import support for service integrations (#12141)
* Remove custom imports

* Add import support for service integrations
2017-02-23 21:19:35 +02:00
Mitchell Hashimoto f77646aa5b Merge pull request #12210 from hashicorp/b-computed-elem
flatmap: mark computed list as a computed value in Expand
2017-02-23 10:27:14 -08:00
Mitchell Hashimoto c6d0333dc0
flatmap: mark computed list as a computed value in Expand
Fixes #12183

The fix is in flatmap for this but the entire issue is a bit more
complex. Given a schema with a computed set, if you reference it like
this:

    lookup(attr[0], "field")

And "attr" contains a computed set within it, it would panic even though
"field" is available. There were a couple avenues I could've taken to
fix this:

1.) Any complex value containing any unknown value at any point is
entirely unknown.

2.) Only the specific part of the complex value is unknown.

I took route 2 so that the above works without any computed (since
"name" is not computed but something else is). This may actually have an
effect on other parts of Terraform configs, however those similar
configs would've simply crashed previously so it shouldn't break any
pre-existing configs.
2017-02-23 10:03:59 -08:00
Paul Stack 05e87be7d5 provider/azurerm: Bump AzureRM SDK to v8.0.1-beta (#11866)
* provider/azurerm: Bump AzureRM SDK to v8.0.1-beta

* provider/azurerm: Renaming SDK packages as per MSFT updates

* Bump azurerm sdk 8.0.1 (#12076)

* Updating the constructors to match the updated types

* Updating the Redis Client name

* ObjectID is now a string

* Updating to match the new Storage API specs
2017-02-23 18:14:55 +02:00
stack72 e0e3692076
provider/profitbricks: fmt changes post cherry-pick 2017-02-23 18:07:29 +02:00
Jasmin Gacic b71103b0f2 Profitbricks primary nic fix (#12197)
* Primary Nic fix

* Cleanup
2017-02-23 17:16:55 +02:00
Martin Atkins bc60bd4561 Merge #12188: AWS Lambda DeadLetterConfig support 2017-02-22 19:24:40 -08:00
Mitchell Hashimoto 8f11068ab2 Merge pull request #12173 from hashicorp/b-remote-state-ds
providers/terraform: remote state data source supports backends
2017-02-22 18:43:06 -08:00
Martin Atkins db9fbe67fa provider/aws: Lambda DeadLetterConfig support
This feature allows sending a notification to either an SQS queue or an
SNS topic when an error occurs running an AWS Lambda function.

This fixes #10630.
2017-02-22 17:50:10 -08:00
Ben Lau ae2d7f7065 what was the value of the cluster id which caused the problem 2017-02-22 17:26:53 -08:00
Paul Stack 210474a2a5 provider/spotinst: Disallow passing an empty user_data string (#12179)
Was missed off the merged as I didn't merge from local to master
2017-02-22 23:25:03 +02:00
Liran Polak f37800ae62 New Provider: Spotinst (#5001)
* providers/spotinst: Add support for Spotinst resources

* providers/spotinst: Fix merge conflict - layouts/docs.erb

* docs/providers/spotinst: Fix the resource description field

* providers/spotinst: Fix the acceptance tests

* providers/spotinst: Mark the device_index as a required field

* providers/spotinst: Change the associate_public_ip_address field to TypeBool

* docs/providers/spotinst: Update the description of the adjustment field

* providers/spotinst: Rename IamRole to IamInstanceProfile to make it more compatible with the AWS provider

* docs/providers/spotinst: Rename iam_role to iam_instance_profile

* providers/spotinst: Deprecate the iam_role attribute

* providers/spotinst: Fix a misspelled var (IamRole)

* providers/spotinst: Fix possible null pointer exception related to "iam_instance_profile"

* docs/providers/spotinst: Add "load_balancer_names" missing description

* providers/spotinst: New resource "spotinst_subscription" added

* providers/spotinst: Eliminate a possible null pointer exception in "spotinst_aws_group"

* providers/spotinst: Eliminate a possible null pointer exception in "spotinst_subscription"

* providers/spotinst: Mark spotinst_subscription as deleted in destroy

* providers/spotinst: Add support for custom event format in spotinst_subscription

* providers/spotinst: Disable the destroy step of spotinst_subscription

* providers/spotinst: Add support for update subscriptions

* providers/spotinst: Merge fixed conflict - layouts/docs.erb

* providers/spotinst: Vendor dependencies

* providers/spotinst: Return a detailed error message

* provider/spotinst: Update the plugin list

* providers/spotinst: Vendor dependencies using govendor

* providers/spotinst: New resource "spotinst_healthcheck" added

* providers/spotinst: Update the Spotinst SDK

* providers/spotinst: Comment out unnecessary log.Printf

* providers/spotinst: Fix the acceptance tests

* providers/spotinst: Gofmt fixes

* providers/spotinst: Use multiple functions to expand each block

* providers/spotinst: Allow ondemand_count to be zero

* providers/spotinst: Change security_group_ids from TypeSet to TypeList

* providers/spotinst: Remove unnecessary `ForceNew` fields

* providers/spotinst: Update the Spotinst SDK

* providers/spotinst: Add support for capacity unit

* providers/spotinst: Add support for EBS volume pool

* providers/spotinst: Delete health check

* providers/spotinst: Allow to set multiple availability zones

* providers/spotinst: Gofmt

* providers/spotinst: Omit empty strings from the load_balancer_names field

* providers/spotinst: Update the Spotinst SDK to v1.1.9

* providers/spotinst: Add support for new strategy parameters

* providers/spotinst: Update the Spotinst SDK to v1.2.0

* providers/spotinst: Add support for Kubernetes integration

* providers/spotinst: Fix merge conflict - vendor/vendor.json

* providers/spotinst: Update the Spotinst SDK to v1.2.1

* providers/spotinst: Add support for Application Load Balancers

* providers/spotinst: Do not allow to set ondemand_count to 0

* providers/spotinst: Update the Spotinst SDK to v1.2.2

* providers/spotinst: Add support for scaling policy operators

* providers/spotinst: Add dimensions to spotinst_aws_group tests

* providers/spotinst: Allow both ARN and name for IAM instance profiles

* providers/spotinst: Allow ondemand_count=0

* providers/spotinst: Split out the set funcs into flatten style funcs

* providers/spotinst: Update the Spotinst SDK to v1.2.3

* providers/spotinst: Add support for EBS optimized flag

* providers/spotinst: Update the Spotinst SDK to v2.0.0

* providers/spotinst: Use stringutil.Stringify for debugging

* providers/spotinst: Update the Spotinst SDK to v2.0.1

* providers/spotinst: Key pair is now optional

* providers/spotinst: Make sure we do not nullify signals on strategy update

* providers/spotinst: Hash both Strategy and EBS Block Device

* providers/spotinst: Hash AWS load balancer

* providers/spotinst: Update the Spotinst SDK to v2.0.2

* providers/spotinst: Verify namespace exists before appending policy

* providers/spotinst: Image ID will be in a separate block from now on, so as to allow ignoring changes only on the image ID. This change is backwards compatible.

* providers/spotinst: user data decoded when returned from spotinst api, so that TF compares the two states properly, and does not update without cause.
2017-02-22 22:57:16 +02:00
Seth Vargo 9d34612be0 Ignore case on protocol and allocation types (#12176) 2017-02-22 22:30:07 +02:00
Mitchell Hashimoto 52720ce880
providers/terraform: data source uses backends for state loading 2017-02-22 11:37:56 -08:00
Paul Stack f5a515ed68 provider/aws: Missing skip_final_snapshot on opsworks rds db instance (#12171) 2017-02-22 20:58:33 +02:00
Paul Stack 8c9bfb7bfe provider/datadog: Adding default values to datadog_monitor (#12168)
Fixes: #8055
Fixes: #10264
Fixes: #10881

We have swapped from using d.GetOk (as that func returns nil when a
default value is used) and moved to using default values that we can
pass directly to the Struct. The fact we have default values, means that
we can use d.Get which will work here

```
% make testacc TEST=./builtin/providers/datadog
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/22 18:56:03 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/datadog -v  -timeout 120m
=== RUN   TestDatadogMonitor_import
--- PASS: TestDatadogMonitor_import (8.66s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDatadogMonitor_Basic
--- PASS: TestAccDatadogMonitor_Basic (5.68s)
=== RUN   TestAccDatadogMonitor_BasicNoTreshold
--- PASS: TestAccDatadogMonitor_BasicNoTreshold (3.13s)
=== RUN   TestAccDatadogMonitor_Updated
--- PASS: TestAccDatadogMonitor_Updated (6.41s)
=== RUN   TestAccDatadogMonitor_TrimWhitespace
--- PASS: TestAccDatadogMonitor_TrimWhitespace (3.22s)
=== RUN   TestAccDatadogMonitor_Basic_float_int
--- PASS: TestAccDatadogMonitor_Basic_float_int (5.50s)
=== RUN   TestAccDatadogTimeboard_update
--- PASS: TestAccDatadogTimeboard_update (8.35s)
=== RUN   TestValidateAggregatorMethod
--- PASS: TestValidateAggregatorMethod (0.00s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/datadog	40.954s
```
2017-02-22 19:36:59 +02:00
Erik Jansson 62aa2c583a provider/aws: New resource codepipeline (#11814)
* provider/aws: New resource codepipeline

* Vendor aws/codepipeline

* Add tests

* Add docs

* Bump codepipeline to v1.6.25

* Adjustments based on feedback

* Force new resource on ID change

* Improve tests

* Switch update to read

Since we don't require a second pass, only do a read.

* Skip tests if GITHUB_TOKEN is not set
2017-02-22 19:31:24 +02:00
Paul Stack dc7f267758 provider/azurerm: Auto base64encode virtual_machine custom data (#12164)
Reported by @sethvargo - we auto encode for AWS, we should follow a
similar pattern for Azure.

In order to escape the double encoding, we check that it's not already
encoded before encoding
2017-02-22 18:26:35 +02:00
Paul Stack 3e9b6f18f0 provider/aws: Refactor snapshot tests to always delete the snapshot (#12013)
first

//cc @radeksimko
2017-02-22 16:13:04 +02:00
Jake Champlin 757b83aeeb Merge pull request #12122 from netjunki/which-bucket-had-a-tag-value-err
aws/provider: aws_s3_bucket doesn't report bucket name when encounter…
2017-02-21 16:19:54 -05:00
Ben Lau fa77fbf4f4 tweak the output string for better readability 2017-02-21 12:51:58 -08:00
Cameron Wood 7c122604a0 provider/aws: data_aws_sns_topic (#11752)
* Initial commit of provider/aws: data_aws_sns_topic

* Pull-request fixes
2017-02-21 17:47:48 +02:00
Jake Champlin 85fdca8cbb Merge pull request #11940 from bodgit/log_destination
Add support for Amazon CloudWatch Logs PutDestination/PutDestinationPolicy
2017-02-21 08:50:03 -05:00
Ben Lau a7bbff6c1e aws/provider: aws_s3_bucket doesn't report bucket name when encountering tag value problems 2017-02-20 11:59:47 -08:00
Paul Stack 2fce519f57 provider/aws: Update of inspector_assessment_target should use ARN not (#12115)
Name

fixes: #12112

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSInspectorTarget_basic'                                                  ✚
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/20 19:08:18 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInspectorTarget_basic -timeout 120m
=== RUN   TestAccAWSInspectorTarget_basic
--- PASS: TestAccAWSInspectorTarget_basic (33.58s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	33.607s
```
2017-02-20 20:12:17 +02:00
Evan Brown facc50d308 providers/google: google_project supports billing account (#11653)
* Vendor google.golang.org/api/cloudbilling/v1

* providers/google: Add cloudbilling client

* providers/google: google_project supports billing account

This change allows a Terraform user to set and update the billing
account associated with their project.

* providers/google: Testing project billing account

This change adds optional acceptance tests for project billing accounts.
GOOGLE_PROJECT_BILLING_ACCOUNT and GOOGLE_PROJECT_BILLING_ACCOUNT_2
must be set in the environment for the tests to run; otherwise, they
will be skipped.

Also includes a few code cleanups per review.

* providers/google: Improve project billing error message
2017-02-20 19:32:24 +02:00
Dana Hoffman 069467edc1 provider/google: Write the raw disk encryption key in the state file to avoid diffs on plan (#12068) 2017-02-20 19:28:32 +02:00
stack72 9bb678d76c
provider/aws: Only send the Owner Account to Redshift cluster if not
empty
2017-02-20 19:14:13 +02:00
stack72 ee9bcadbb9
Merge branch 'redshift-cluster-OwnerAccount' of https://github.com/jklukas/terraform into jklukas-redshift-cluster-OwnerAccount 2017-02-20 19:13:12 +02:00
Joe Topjian 8ea8588c52 provider/openstack: Image Data Source (#12097)
* vendor: Updating Gophercloud

* provider/openstack: Image Data Source

This commit adds the openstack_images_image_v2 data source which
is able to query the Image Service v2 API for a specific image.
2017-02-20 19:03:17 +02:00
Mattias Gees 20b312034a Add VRRP to allowed protocols in network ACL rules (#12107) 2017-02-20 15:05:45 +02:00
Otto Jongerius 2310316666 provider/datadog: Upgrade to Datadog API v2 (#12098)
* provider/datadog: Pulls v2 and removes v1 of library go-datadog-api.

    See https://github.com/zorkian/go-datadog-api/issues/56 for context.

    * Fixes bug in backoff implementation that decreased performance significantly.
    * Uses pointers for field types, providing support of distinguishing
        between if a value is set, or the default value for that type is
        effective.

* provider/datadog: Convert provider to use v2 of go-datadog-api.

* provider/datadog: Update vendored library.

* provider/datadog: Update dashboard resource to reflect API updates.
2017-02-20 14:48:32 +02:00
Joe Topjian 1b5694b7f4 provider/openstack: Enable HTTP Logging (#12089)
This commit adds the ability to log all requests and responses
between Terraform and the OpenStack cloud. To enable, set the
OS_DEBUG environment variable to 1.
2017-02-20 14:36:05 +02:00
Joe Topjian 6d4fc8d21a provider/openstack: Don't allow floating IP and port (#12099)
This commit adds a check to prevent a user from specifying both
a floating IP and a port on a specific network. While this
configuration is currently allowed, the Port will be chosen and
applying the configuration again will show a state mismatch. This
attempts to prevent such a misconfiguration.
2017-02-20 14:32:28 +02:00
Joe Topjian 9188a80192 provider/openstack: Updates to openstack_images_image_v2 resource
This commit has a few more fixes to the recently added
openstack_images_image_v2 resource:

* tags were changed to a Set because the OpenStack Image API does
not seem to respect ordering.
* The visibility argument was fixed.
* Acceptance tests for all updatable fields has been implemented.
* Documentation updates, including a new entry in the sidebar.
2017-02-19 21:20:29 +00:00
Joe Topjian 96d2ac21d4 provider/openstack: Fix Creation of Empty Tags
This commit fixes a bug where images would be created with empty tags.
Acceptance tests were also tidied up.
2017-02-19 18:44:42 +00:00
Joe Topjian b3b9247ad0 Merge pull request #11942 from yanndegat/master
Add resource_openstack_images_image_v2
2017-02-19 10:21:58 -07:00
Matt Dainty e141df0cd0
Seed test value names and tidy up whitespace 2017-02-18 18:53:32 +00:00
netjunki 70f1113918 provider/aws: aws_ecs_service should output service name along with error (#12072) 2017-02-18 15:59:49 +02:00
Paddy 27c185e1c9 Merge pull request #12044 from sbadia/gcs_storage_class
doc: gcs - Update storage_class documentation and tests
2017-02-17 16:13:29 -08:00