Commit Graph

6194 Commits

Author SHA1 Message Date
Matthew 28cee57ef5 S3 Bucket Object Sever Side Encryption (#11261)
* added server_side_encryption to s3_bucket_object resource including associated acceptance test and documentation.

* got acceptance tests passing.

* made server_side_encryption a computed attribute and only set kms_key_id attribute if an S3 non-default master key is in use.

* ensured kms api is only interrogated if required.
2017-01-31 09:20:48 +00:00
Dana Hoffman f7e2147655 Merge pull request #11477 from gh-mlfowler/google-sql2-slave
provider/google: Fix master_instance_name to prevent slave rebuilds
2017-01-30 14:17:56 -08:00
Clint be9fc64967 Merge pull request #11530 from hashicorp/b-aws-test-fixes
provider/aws: Handful of Acc configuration tests
2017-01-30 16:13:24 -06:00
clint shryock 2313281eba fix db option group test 2017-01-30 15:48:52 -06:00
Jake Champlin c0c06ee876 Merge pull request #11526 from hashicorp/b-fix-rds-cluster-param-group-tests
provider/aws: Fix AWS RDS Cluster Parameter Group Tests
2017-01-30 16:36:21 -05:00
Jake Champlin 1b713e87b8
provider/aws: Fix AWS RDS Cluster Parameter Group Tests
Fixes `aws_rds_cluster_parameter_group` acceptance tests, which have been broken since aa8c2ac587

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBClusterParameterGroupOnly'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/30 16:20:38 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBClusterParameterGroupOnly -timeout 120m
=== RUN   TestAccAWSDBClusterParameterGroupOnly
--- PASS: TestAccAWSDBClusterParameterGroupOnly (15.26s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	15.282s
```

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBClusterParameterGroup_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/30 16:22:48 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBClusterParameterGroup_basic -timeout 120m
=== RUN   TestAccAWSDBClusterParameterGroup_basic
--- PASS: TestAccAWSDBClusterParameterGroup_basic (29.48s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	29.510s
```
2017-01-30 16:28:24 -05:00
Jake Champlin 0ce78077f8 Merge pull request #11524 from hashicorp/b-fix-cloudwatch-log-subscription-filter-test
provider/aws: Fix cloudwatch log subscription filter test
2017-01-30 16:21:00 -05:00
clint shryock 75121fe00e clean up db subnet name collisiosn 2017-01-30 15:19:24 -06:00
clint shryock 7fcbc0495c randomize Beanstalk test name 2017-01-30 15:06:29 -06:00
Jake Champlin c9dd87d03a
provider/aws: Fix cloudwatch log subscription filter test
Fixes `aws_cloudwatch_log_subscription_filter` acceptance tests that had been failing since mid December

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudwatchLogSubscriptionFilter_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/30 16:00:05 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudwatchLogSubscriptionFilter_basic -timeout 120m
=== RUN   TestAccAWSCloudwatchLogSubscriptionFilter_basic
--- PASS: TestAccAWSCloudwatchLogSubscriptionFilter_basic (26.34s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	26.364s
```
2017-01-30 16:03:55 -05:00
Mitchell Hashimoto 61881d2795 Merge pull request #10934 from hashicorp/f-provisioner-stop
core: stoppable provisioners, helper/schema for provisioners
2017-01-30 12:53:15 -08:00
Jake Champlin feafe3c0b5
provider/aws: Fix acceptance tests for autoscaling schedule
Fixes acceptance tests for `aws_autoscaling_schedule` resource

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAutoscalingSchedule_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/30 14:40:34 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAutoscalingSchedule_basic -timeout 120m
=== RUN   TestAccAWSAutoscalingSchedule_basic
--- PASS: TestAccAWSAutoscalingSchedule_basic (170.38s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	170.406s
```

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAutoscalingSchedule_disappears'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/30 15:00:49 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAutoscalingSchedule_disappears -timeout 120m
=== RUN   TestAccAWSAutoscalingSchedule_disappears
--- PASS: TestAccAWSAutoscalingSchedule_disappears (179.23s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	179.253s
```
2017-01-30 15:07:10 -05:00
Mitchell Hashimoto 3776d31d69
provisioners/local-exec: remove data race by setting err only once 2017-01-30 10:21:05 -08:00
John Engelman 0152a79b90 Closes #11053. Use environment specific client for accessing resources. (#11503)
When using access control, the Rancher global API may return 404 for
resources that exist and are accessible via the environment API.
2017-01-30 17:08:21 +00:00
Mitchell Hashimoto 195d34424e Merge pull request #11482 from hashicorp/f-computed-count
core: allow non-computed data source values in "count"
2017-01-30 08:44:27 -08:00
Traver Tischio 33b43fccdc provider/fastly Adds papertrail logging (#11491)
* Creates papertrail logging resource for fastly

* Adds modification support for fastly papertrail

* Flattens and lists papertrail resources

* Adds testing for fastly papertrail

* Adds papertrail documentation for fastly to the website

* Fixes schema assignment name mistake

* Changes testing hostnames to pass fastly API validation
2017-01-30 16:05:27 +00:00
Jake Champlin 9cdd7547e1 Merge pull request #11474 from hashicorp/b-fix-aws-alb-import
provider/aws: Import aws_alb_listener_rule fix
2017-01-30 08:49:24 -05:00
yn 8ea5d53954 SNS Topic Subscription: import more attributes (#10408) 2017-01-30 11:52:23 +00:00
Dana Hoffman 55ca64a095 provider/google: allow instance group managers in region other than project (#11294) 2017-01-30 11:35:35 +00:00
snakeb1t 747ca75bfe kms CreateKey: retry if arn in policy not yet seen (#11509)
if KMS service doesn't think a resource exists which is listed in
a Key policy, then CreateKey fails. so retry until it's seen
by KMS service.
2017-01-30 11:23:43 +00:00
Borgstrom ♕ 01a6bd7592 provider/aws: New data provider to decrypt KMS secrets (#11460)
* Add a new data provider to decrypt AWS KMS secrets

* Address feedback

* Rename aws_kms_secrets to aws_kms_secret
* Add more examples to the documentation
2017-01-29 21:01:38 +00:00
Mitchell Hashimoto 3913f06d46 Merge pull request #11502 from hashicorp/b-provisioner-computed
provisioners/chef: check IsComputed for JSON attributes
2017-01-29 12:37:14 -08:00
Paul Stack 4ebd207803 provider/aws: Add support for policy to AWS provider assume_role (#11501)
Fixes: #11461

This will allow the user to pass a policy to further restrict the use
of AssumeRole. It is important to note that it will NOT allow an
expansion of access rights
2017-01-29 20:32:24 +00:00
Mitchell Hashimoto 5fc516f99d
provisioners/chef: check IsComputed for JSON attributes
Fixes #10788

This checks `IsComputed` prior to attempting to use the JSON
configurations. Due to a change in 0.8, the prior check for simply map
existence would always succeed even with a computed value (as designed),
but we forgot to update provisioners to not do that.

There are other provisioners that also do this but to no ill effect
currently. I've only changed Chef since we know that is an issue.

This issue doesn't affect 0.9 due to helper/schema doing this
automatically for provisioners.
2017-01-29 12:30:44 -08:00
julius-bonial 5d8662d5da fix wrong usage of hashicorp/errwrap (#11500)
According to https://github.com/hashicorp/errwrap
'{{err}}' has to be used instead of '%s'

Without this patch, error output from terraform is missing important information:
* aws_cloudwatch_log_group.logs: Error Getting CloudWatch Logs Tag List: %s

With this patch, I get the important information. E.g.:
* aws_cloudwatch_log_group.logs: Error Getting CloudWatch Logs Tag List: AccessDeniedException: User: arn:aws:sts::XYZ:assumed-role/AAA-BBB-CCC/terraform-assuming-role-assume-role-ReadOnly is not authorized to perform: logs:ListTagsLogGroup on resource: arn:aws:logs:us-east-1:XYZ:log-group:logs:log-stream:
2017-01-29 19:19:48 +00:00
Kannan Goundan ab18f60071 provider/ns1/record: Fix "use_client_subnet". (#11368)
The support for "use_client_subnet" was half finished.
- Field was defined in schema.
- ResourceData-to-struct code was present but incorrect.
- struct-to-ResourceData code was missing.

Made the change and verified with manual testing:
1. In NS1 UI, switched "Use Client Subnet" between checked and
   unchecked.
2. In Terraform config file, switched "use_client_subnet" field between
   "true", "false", and omitted.
3. The output of "terraform plan" was as expected in all six cases.
2017-01-29 16:45:13 +00:00
Jake Champlin 96f6044908 provider/aws: ECS Placement constraints fix (#11475)
* fixing AWS ECS placement constraints

* correcting AWS ECS task definition doc

* reverting unnecessary change to resource_aws_ecs_task_definition

* provider/aws: ECS Placement constraints fix

Expands upon #11446 from @bgetsug

Adds:
 - Acceptance Test
 - Improves `nil` check on constraint expression

 Fixes: #10968
2017-01-29 16:42:50 +00:00
Joe Topjian 5f8dc6cc34 provider/openstack: Remove Default Security Group Rules (#11466)
This commit removes the default security group rules that are automatically
created when a security group is created. These rules are usually
permissive egress rules which makes it difficult to add more strict egress
security group rules.
2017-01-29 16:07:33 +00:00
Alexander 5f94b51eb0 provider/pagerduty: Allow timeouts to be disabled (pagerduty_service) (#11483)
* Vendor update

* Add exists check

* Update test

* Update documentation
2017-01-29 16:06:44 +00:00
Christoph Blecker b5e8d62b14 Fix vet errors in providers (#11496) 2017-01-29 15:59:55 +00:00
Tom Harvey 79024dbf09 provider/opsgenie: Descriptions for Teams (#11391)
* updating the opsgenie dependency

* Adding description to an OpsGenie team

* Description for Teams

* Added tests for an empty description
2017-01-29 15:52:23 +00:00
Mitchell Hashimoto dd8ee38ba8
providers/test: additional testing via integration tests 2017-01-28 11:09:24 -08:00
Mike Fowler b2ac5e9b64 Fix master_instance_name to prevent slave rebuilds 2017-01-27 21:06:46 +00:00
Jake Champlin 8b66d137d1
provider/aws: Import aws_alb_listener_rule fix
Allows the user to import a default aws_alb_listener_rule. When creating the resource with TF, the AWS API requires that `priority` be an integer.
However, the `DescribeRules` API call returns a string for `priority`. This would work in every case except for the `default` listener rule, which sets the `priority` value to the string "default".

This fixes the previous error:
```
Error importing: 1 error(s) occurred:

* aws_alb_listener_rule.test: Cannot convert rule priority %q to int: strconv.ParseInt: parsing "default": invalid syntax
```

Fixes: #11464
2017-01-27 14:55:34 -05:00
Yves Blusseau 607ced955b provider/ignition: mount and path are mutually exclusive (#11409)
* Fix generation of ignition filesystems section: don't add a path key
  if not needed.
* Check that mount and path are not used together.
2017-01-27 21:28:42 +02:00
Yves Blusseau 544c21c5f1 provider/ignition: Allow to add authorized keys without user creation (#11406)
Fix #11405
2017-01-27 21:24:37 +02:00
Jack Pearkes b0096abbe3 provider/aws: allow destroy of LB stickiness policy with missing LB (#11462)
Previously an attempt to destroy a LB stickiness policy would
result in an error like this:

```
* aws_lb_cookie_stickiness_policy.foo: Error removing LBCookieStickinessPolicy: LoadBalancerNotFound: There is no ACTIVE Load Balancer named 'tf-test-lb-tqatd'
    status code: 400, request id: 28af1167-e4a4-11e6-8ddd-57ba410cbbb6
```

This checks for a missing load balancer on the policy read and allows
the destroy.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSLBCookieStickinessPolicy_missingLB'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/27 07:21:11 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSLBCookieStickinessPolicy_missingLB -timeout 120m
=== RUN   TestAccAWSLBCookieStickinessPolicy_missingLB
--- PASS: TestAccAWSLBCookieStickinessPolicy_missingLB (28.90s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    28.929s
```
2017-01-27 21:14:23 +02:00
Jake Champlin 0cd69d2101 Merge pull request #11411 from hashicorp/f-emr-instance-ebs-volumes
provider/aws: Add EBS Volume support for EMR Instance Groups
2017-01-27 09:57:28 -05:00
Mitchell Hashimoto 142df657c3
provisioners/remote-exec: listen to Stop 2017-01-26 15:10:30 -08:00
Mitchell Hashimoto 487a37b0dd
helper/schema: PromoteSingle for legacy support of "maybe list" types 2017-01-26 15:09:15 -08:00
Mitchell Hashimoto f29845e54e
update privisioner bins to use new functions 2017-01-26 15:09:15 -08:00
Mitchell Hashimoto 3c0c81957a
provisioners/remote-exec: switch to helper/schema 2017-01-26 15:09:15 -08:00
Mitchell Hashimoto 27c19af9ff
provisioners/file: support Stop 2017-01-26 15:03:28 -08:00
Mitchell Hashimoto a2e044829b
provisioners/file: use the old communicator.New just to minimize risk 2017-01-26 15:03:28 -08:00
Mitchell Hashimoto 02a4adc07c
provisioners/file: convert to helper/schema 2017-01-26 15:03:28 -08:00
Mitchell Hashimoto 0fb87cd96b
provisioners/local-exec: stoppable
This modifies local-exec to be stoppable with the new Stop API call that
provisioners can listen to.
2017-01-26 15:03:28 -08:00
Mitchell Hashimoto c5b784c33f
provisioners/local-exec: switch to helper/schema 2017-01-26 15:03:28 -08:00
Clint e3c89da542 Merge pull request #11383 from brad-larson/brad-fix-regexp-validation
Fix: Incorrect AWS Lambda Qualifier Regexp
2017-01-26 16:38:00 -06:00
Tero Keinänen eb70c538a8 Fix: path not updated when modifying AWS API Gateway Resource
Fixes #11442
2017-01-26 21:53:08 +02:00
Paddy 54aca85855 Merge pull request #10425 from evandbrown/google-project-templates
providers/google: Create and manage Google Cloud Platform Projects
2017-01-25 15:05:17 -08:00