Commit Graph

5913 Commits

Author SHA1 Message Date
James Bardin 4f625af3fd Merge pull request #10787 from hashicorp/jbardin/inteprolate-list-of-maps
Inteprolate list of maps
2016-12-16 16:41:36 -05:00
clint shryock 42efeb66db add missing runtime 2016-12-16 11:36:19 -06:00
clint shryock 45a7cc5afd more randomiztion for lambda tests 2016-12-16 10:42:37 -06:00
James Bardin d1d6907640 Add a provider test for a list of maps
Interpolation of a map from a list of maps was not working. Add a
provider example test to cover this.
2016-12-16 10:36:26 -05:00
Ninir f96e45ba56 provider/aws: Deprecated aws_lambda_function nodejs runtime in favor of nodejs4.3 (#9724)
* provider/aws/lambda: Deprecated nodejs in favor of nodejs4.3

* Removed redundant type declarations in composite literals

* Added validation tests
2016-12-16 12:24:45 +00:00
Ivan Fuyivara 4d4ec6c0d1 provider/aws: Support for SES Configuration sets and Event Destinations (#10735)
* adding configuration set

* adding event destination

* adding test, all tests passing

* adding doccumentation
2016-12-16 11:46:39 +00:00
stack72 8efa37f7ff
Merge branch 'api_gateway_binary_media_types' of https://github.com/jmettes/terraform into jmettes-api_gateway_binary_media_types 2016-12-16 11:16:04 +00:00
Clint 7711952423 Merge pull request #9837 from Ninir/redshift_cluster_password
provider/aws: Redshift Cluster: Fix for master_username & password
2016-12-15 21:28:36 -06:00
Jonathan Mettes 0e6b2a4f9f Add support for binary media type to AWS API Gateway 2016-12-16 02:14:29 +00:00
Clint 75010e9112 Merge pull request #10771 from hashicorp/b-aws-test-fixes
provider/aws: More randomization so our tests can run in parallel
2016-12-15 16:36:37 -06:00
clint shryock 8d2e61e88d provider/aws: More randomization so our tests can run in parallel 2016-12-15 16:33:10 -06:00
Dan Thagard 82ef4b678d Drop alias from state file if missing from lambda. (#10759)
* Drop alias from state file if missing from lambda.

This commit fixes an issue where if you remove a AWS Lambda, the corresponding alias for that Lambda is also deleted.

* Added missing imports.

* Removed non-local reference to constant.
2016-12-15 15:33:38 -06:00
Clint 8371d3faab Merge pull request #10763 from Ninir/d-aws-source-ami-owners
provider/aws: Fixed the data source ami enforcing non-nil values
2016-12-15 14:35:29 -06:00
Paul Tyng 3dfe5a47f1
provider/newrelic: Add new provider for New Relic 2016-12-15 19:14:59 +00:00
Ninir a8a37b8f84 provider/aws: Fixed the data source ami enforcing non-nil values 2016-12-15 19:18:57 +01:00
Joseph Anthony Pasquale Holsten d783e831f8 ultradns providers and improvements (#9788)
* vendor: update github.com/Ensighten/udnssdk to v1.2.1

* ultradns_tcpool: add

* ultradns.baseurl: set default

* ultradns.record: cleanup test

* ultradns_record: extract common, cleanup

* ultradns: extract common

* ultradns_dirpool: add

* ultradns_dirpool: fix rdata.ip_info.ips to be idempotent

* ultradns_tcpool: add doc

* ultradns_dirpool: fix rdata.geo_codes.codes to be idempotent

* ultradns_dirpool: add doc

* ultradns: cleanup testing

* ultradns_record: rename resource

* ultradns: log username from config, not client

udnssdk.Client is being refactored to use x/oauth2, so don't assume we
can access Username from it

* ultradns_probe_ping: add

* ultradns_probe_http: add

* doc: add ultradns_probe_ping

* doc: add ultradns_probe_http

* ultradns_record: remove duplication from error messages

* doc: cleanup typos in ultradns

* ultradns_probe_ping: add test for pool-level probe

* Clean documentation

* ultradns: pull makeSetFromStrings() up to common.go

* ultradns_dirpool: log hashIPInfoIPs

Log the key and generated hashcode used to index ip_info.ips into a set.

* ultradns: simplify hashLimits()

Limits blocks only have the "name" attribute as their primary key, so
hashLimits() needn't use a buffer to concatenate.

Also changes log level to a more approriate DEBUG.

* ultradns_tcpool: convert rdata to schema.Set

RData blocks have the "host" attribute as their primary key, so it is
used by hashRdatas() to create the hashcode.

Tests are updated to use the new hashcode indexes instead of natural
numbers.

* ultradns_probe_http: convert agents to schema.Set

Also pull the makeSetFromStrings() helper up to common.go

* ultradns: pull hashRdatas() up to common

* ultradns_dirpool: convert rdata to schema.Set

Fixes TF-66

* ultradns_dirpool.conflict_resolve: fix default from response

UltraDNS REST API User Guide claims that "Directional Pool
Profile Fields" have a "conflictResolve" field which "If not
specified, defaults to GEO."
https://portal.ultradns.com/static/docs/REST-API_User_Guide.pdf

But UltraDNS does not actually return a conflictResolve
attribute when it has been updated to "GEO".

We could fix it in udnssdk, but that would require either:
* hide the response by coercing "" to "GEO" for everyone
* use a pointer to allow checking for nil (requires all
users to change if they fix this)

An ideal solution would be to have the UltraDNS API respond
with this attribute for every dirpool's rdata.

So at the risk of foolish consistency in the sdk, we're
going to solve it where it's visible to the user:
by checking and overriding the parsing. I'm sorry.

* ultradns_record: convert rdata to set

UltraDNS does not store the ordering of rdata elements, so we need a way
to identify if changes have been made even it the order changes.
A perfect job for schema.Set.

* ultradns_record: parse double-encoded answers for TXT records

* ultradns: simplify hashLimits()

Limits blocks only have the "name" attribute as their primary key, so
hashLimits() needn't use a buffer to concatenate.

* ultradns_dirpool.description: validate

* ultradns_dirpool.rdata: doc need for set

* ultradns_dirpool.conflict_resolve: validate
2016-12-15 16:28:34 +00:00
Peter McAtominey 3fbe2534a6 provider/azurerm: add support for tags to dns_zone (#10750)
tags were documented, just not implemented

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMDnsZone_ -timeout 120m
=== RUN   TestAccAzureRMDnsZone_importBasic
--- PASS: TestAccAzureRMDnsZone_importBasic (89.04s)
=== RUN   TestAccAzureRMDnsZone_basic
--- PASS: TestAccAzureRMDnsZone_basic (92.91s)
=== RUN   TestAccAzureRMDnsZone_withTags
--- PASS: TestAccAzureRMDnsZone_withTags (105.88s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	287.912s
2016-12-15 14:14:53 +00:00
Matt Long 0d0c31d962 provider/pagerduty: Allow 'team_responder' role for pagerduty_user resource (#10728)
* provider/pagerduty: Allow 'team_responder' role for pagerduty_user resource

* Change unit test to exercise 'team_responder' and reformat

* Update the test fixture to use the 'team_responder' role
2016-12-14 23:01:19 +00:00
Clint 89c328aed4 Merge pull request #10733 from hashicorp/f-remove-deprecated-param-group
provider/aws: Removed deprecated parameter group from RDS Cluster
2016-12-14 16:32:36 -06:00
clint shryock 70b1f4e708 provider/aws: Bump EMR Cluster create timeout 2016-12-14 10:25:45 -06:00
clint shryock 4007fd2bc8 provider/aws: Removed deprecated parameter group from RDS Cluster 2016-12-14 10:08:11 -06:00
James Nugent a160d1cd69 provider/aws: Support eu-west-2 (#10470)
* provider/aws: Support eu-west-2

This is the new London region - we don't have access yet but several
enquiries have come from customers who do.

* provider/aws: Support eu-west-2 region

* Update hosted_zones.go
2016-12-14 09:33:58 +00:00
Kit Ewbank c7bf4fc8d3 Correct error message for 'aws_caller_identity' acceptance test. (#10712) 2016-12-14 09:33:06 +00:00
Clint 56b0e87f5e Merge pull request #10704 from Ninir/r-aws-sns_topic-protocols
provider/aws: Improved the SNS topic subscription protocols validation
2016-12-13 16:54:21 -06:00
stack72 9aebe3344a
provider/google: Moving the XPN EnvVar check into provider_test.go to stop failed build 2016-12-13 19:29:23 +00:00
stack72 4f256a54db
Merge branch 'google-xpn' of https://github.com/danawillow/terraform 2016-12-13 19:15:54 +00:00
Sean Chittenden 60658fdfbc Merge pull request #10707 from hashicorp/b-postgresql-schema-auth
Dept of second thoughts: remove authorization support ASAP.
2016-12-13 10:45:19 -08:00
Sean Chittenden 56a193f228
Dept of second thoughts: remove authorization support before 0.8
releases.

When postgresql_schema_policy lands this attribute should be removed in
order to provide a single way of accomplishing setting permissions on
schema objects.
2016-12-13 10:28:06 -08:00
Ninir 99be2d3280 provider/aws: Improved the SNS topic subscription protocols validation 2016-12-13 17:54:52 +01:00
Mathieu Herbert 3239138099 provider/aws: data source for AWS Hosted Zone (#9766)
* provider/aws: data source for AWS Hosted Zone

* add caller_reference, resource_record_set_count fields, manage private zone and trailing dot

* fix fmt

* update documentation, use string function in hostedZoneNamewq

* add vpc_id support

* add tags support

* add documentation for hosted zone data source tags support
2016-12-13 16:22:26 +00:00
Clint b2136beff2 Merge pull request #10702 from hashicorp/pr-10694
provider/aws: Save `iam_access_key` secret to state if no PGP key given (supersedes #10694)
2016-12-13 10:11:07 -06:00
clint shryock 72885c6736 provider/aws: Save secret to state in iam_access_key if pgp key not found 2016-12-13 09:32:04 -06:00
Ryan Hoegg 73213793ca provider/aws: Add aws_eip data source (#9833)
* provider/aws: Add the aws_eip data source

* Document the aws_eip data source on the website

* provider/aws: support query by public_ip for aws_eip data source
2016-12-13 12:09:21 +00:00
Samuel BERTHE 88faa1bb7f Improving Rundeck provider: scheduler (#9449)
* feat(rundeck provider): Scheduling (crontab)

* fix(govendor-upgrade): Rundeck api wrapper
2016-12-13 12:00:53 +00:00
Paul Stack e558cbddf4 provider/rundeck: Set Computed on rundeck_job preserve_options_order (#10695)
Before the change, this was the test result:

```
% make testacc TEST=./builtin/providers/rundeck                                                                               2 ↵
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/13 11:14:11 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/rundeck -v  -timeout 120m
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccJob_basic
--- FAIL: TestAccJob_basic (6.51s)
	testing.go:265: Step 0 error: After applying this step, the plan was not empty:

		DIFF:

		UPDATE: rundeck_job.test
		  preserve_options_order: "true" => "false"

		STATE:

		rundeck_job.test:
		  ID = 1da079e6-31f1-4c77-9cbb-c77c0a16fea5
		  allow_concurrent_executions = true
		  command.# = 1
		  command.0.inline_script =
		  command.0.job.# = 0
		  command.0.node_step_plugin.# = 0
		  command.0.script_file =
		  command.0.script_file_args =
		  command.0.shell_command = echo Hello World
		  command.0.step_plugin.# = 0
		  command_ordering_strategy = node-first
		  continue_on_error = false
		  description = A basic job
		  group_name =
		  log_level = INFO
		  max_thread_count = 1
		  name = basic-job
		  node_filter_exclude_precedence = false
		  node_filter_query = example
		  option.# = 1
		  option.0.allow_multiple_values = false
		  option.0.default_value = bar
		  option.0.description =
		  option.0.exposed_to_scripts = false
		  option.0.multi_value_delimiter =
		  option.0.name = foo
		  option.0.obscure_input = false
		  option.0.require_predefined_choice = false
		  option.0.required = false
		  option.0.validation_regex =
		  option.0.value_choices.# = 0
		  option.0.value_choices_url =
		  preserve_options_order = true
		  project_name = terraform-acc-test-job
		  rank_attribute =
		  rank_order = ascending

		  Dependencies:
		    rundeck_project.test
		rundeck_project.test:
		  ID = terraform-acc-test-job
		  default_node_executor_plugin = jsch-ssh
		  default_node_file_copier_plugin = jsch-scp
		  description = parent project for job acceptance tests
		  extra_config.% = 0
		  name = terraform-acc-test-job
		  resource_model_source.# = 1
		  resource_model_source.0.config.% = 2
		  resource_model_source.0.config.file = /tmp/terraform-acc-tests.xml
		  resource_model_source.0.config.format = resourcexml
		  resource_model_source.0.type = file
		  ssh_authentication_type = privateKey
		  ssh_key_file_path =
		  ssh_key_storage_path =
		  ui_url = http://192.168.50.2:4440/api/18/project/terraform-acc-test-job
=== RUN   TestAccPrivateKey_basic
--- PASS: TestAccPrivateKey_basic (7.90s)
=== RUN   TestAccProject_basic
--- PASS: TestAccProject_basic (2.21s)
=== RUN   TestAccPublicKey_basic
--- PASS: TestAccPublicKey_basic (2.43s)
FAIL
exit status 1
FAIL	github.com/hashicorp/terraform/builtin/providers/rundeck	19.067s
make: *** [testacc] Error 1
```

After the change:

```
% make testacc TEST=./builtin/providers/rundeck                                                                               2 ↵
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/13 11:35:46 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/rundeck -v  -timeout 120m
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccJob_basic
--- PASS: TestAccJob_basic (1.46s)
=== RUN   TestAccPrivateKey_basic
--- PASS: TestAccPrivateKey_basic (0.26s)
=== RUN   TestAccProject_basic
--- PASS: TestAccProject_basic (0.65s)
=== RUN   TestAccPublicKey_basic
--- PASS: TestAccPublicKey_basic (0.59s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/rundeck	2.975s
```
2016-12-13 11:42:26 +00:00
BobVanB a60a3764f2 provider/rundeck) enable validation for multiple values in an array (#8913) 2016-12-13 11:40:31 +00:00
Kit Ewbank d3633398a7 provider/aws Add aws_vpc_endpoint_service data source (#10261)
* provider/aws Add aws_vpc_endpoint_services data source.

* Rename 'aws_vpc_endpoint_services' to 'aws_vpc_endpoint_service'.
2016-12-13 10:40:35 +00:00
Kazuma Watanabe 0134315148 enable DeleteOnTermination (#9922) 2016-12-13 10:38:05 +00:00
Mickaël Canévet 3ab5c630bd Don't remove secret, just deprecate it 2016-12-13 11:31:32 +01:00
Paddy a08d562abf Merge pull request #10684 from cblecker/gcp-ssl-cert-name-prefix
Add support for name_prefix to google_compute_ssl_certificate
2016-12-12 16:40:07 -08:00
Christoph Blecker fa8921f8f4 Add support for name_prefix to google_compute_ssl_certificate 2016-12-12 15:57:58 -08:00
James Nugent 7cda9e8c74 Merge pull request #10682 from hashicorp/f-fixup-postgresql
Various changes to the PostgreSQL provider
2016-12-12 15:22:53 -08:00
Sean Chittenden ce60c4fede
gofmt cleanup on imports. 2016-12-12 15:21:20 -08:00
Sean Chittenden 2ecd42c0be
Remove non-standard environment variables in prep for 0.8. 2016-12-12 15:21:00 -08:00
Sean Chittenden 6ed37770c3
Add the testing Makefile that I'm using for testing the provider locally. 2016-12-12 14:44:46 -08:00
Sean Chittenden 8c41f0859b
Add the version attribute to postgresql_extension. 2016-12-12 14:37:40 -08:00
Paul Stack 1113ed5fc7 provider/aws: Support MFA delete for s3 bucket versioning (#10020)
Fixes #7902

```
% make testacc TEST=./builtin/providers/aws
% TESTARGS='-run=TestAccAWSS3Bucket_'
% ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/12 12:11:45 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSS3Bucket_
-timeout 120m
=== RUN   TestAccAWSS3Bucket_importBasic
--- PASS: TestAccAWSS3Bucket_importBasic (55.74s)
=== RUN   TestAccAWSS3Bucket_importWithPolicy
--- PASS: TestAccAWSS3Bucket_importWithPolicy (63.34s)
=== RUN   TestAccAWSS3Bucket_Notification
--- PASS: TestAccAWSS3Bucket_Notification (165.15s)
=== RUN   TestAccAWSS3Bucket_NotificationWithoutFilter
--- PASS: TestAccAWSS3Bucket_NotificationWithoutFilter (63.22s)
=== RUN   TestAccAWSS3Bucket_basic
--- PASS: TestAccAWSS3Bucket_basic (47.82s)
=== RUN   TestAccAWSS3Bucket_region
--- PASS: TestAccAWSS3Bucket_region (18.88s)
=== RUN   TestAccAWSS3Bucket_acceleration
--- PASS: TestAccAWSS3Bucket_acceleration (34.56s)
=== RUN   TestAccAWSS3Bucket_RequestPayer
--- PASS: TestAccAWSS3Bucket_RequestPayer (90.26s)
=== RUN   TestAccAWSS3Bucket_Policy
--- PASS: TestAccAWSS3Bucket_Policy (120.25s)
=== RUN   TestAccAWSS3Bucket_UpdateAcl
--- PASS: TestAccAWSS3Bucket_UpdateAcl (87.51s)
=== RUN   TestAccAWSS3Bucket_Website_Simple
--- PASS: TestAccAWSS3Bucket_Website_Simple (138.38s)
=== RUN   TestAccAWSS3Bucket_WebsiteRedirect
--- PASS: TestAccAWSS3Bucket_WebsiteRedirect (139.44s)
=== RUN   TestAccAWSS3Bucket_WebsiteRoutingRules
--- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (97.82s)
=== RUN   TestAccAWSS3Bucket_shouldFailNotFound
--- PASS: TestAccAWSS3Bucket_shouldFailNotFound (26.84s)
=== RUN   TestAccAWSS3Bucket_Versioning
--- PASS: TestAccAWSS3Bucket_Versioning (131.89s)
=== RUN   TestAccAWSS3Bucket_Cors
--- PASS: TestAccAWSS3Bucket_Cors (92.71s)
=== RUN   TestAccAWSS3Bucket_Logging
--- PASS: TestAccAWSS3Bucket_Logging (86.46s)
=== RUN   TestAccAWSS3Bucket_Lifecycle
--- PASS: TestAccAWSS3Bucket_Lifecycle (132.70s)
=== RUN   TestAccAWSS3Bucket_Replication
--- PASS: TestAccAWSS3Bucket_Replication (122.70s)
=== RUN   TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError
--- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (39.04s)
```
2016-12-12 22:34:03 +00:00
Sean Chittenden a4965c01af
Fix up helpers.
Pointed out by: @stack72
2016-12-12 14:30:25 -08:00
Traver Tischio 27d42d1831 provider/fastly add origin shielding (#10677)
* Add shield to options for fastly backend

* Add shield to acceptance test for fastly

* Update website with shield option
2016-12-12 22:17:35 +00:00
Ninir 16660a4f60 provider/aws: Fixed deletion of aws_api_gateway_base_path_mapping with empty path (#10177) 2016-12-12 22:09:25 +00:00