Commit Graph

6176 Commits

Author SHA1 Message Date
clint shryock f87f0f5ba6 provider/aws: Fix permissions for IAM role in Lambda tests 2017-02-01 15:59:40 -06:00
clint shryock b592f8d35d provider/aws: Fix lambda source mapping tests 2017-02-01 13:25:24 -06:00
clint shryock 2313281eba fix db option group test 2017-01-30 15:48:52 -06: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
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
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
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
Evan Brown b9e9e777c8 providers/google: Support managing projects
Add support for creating, updating, and deleting projects, as well as
their enabled services and their IAM policies.

Various concessions were made for backwards compatibility, and will be
removed in 0.9 or 0.10.
2017-01-25 14:59:50 -08:00
Clint c453c6d189 Merge pull request #10953 from Biteable/spot-fleet-terminate
only wait for spot fleet instance termination if requested
2017-01-25 15:11:48 -06:00
Jake Champlin 1c805c49b0 provider/aws: Fix RouteTable data source test (#11410)
Fixes the `TestAccDataSourceAwsRouteTable_main` acceptance test.

```
=== RUN   TestAccDataSourceAwsRouteTable_main
--- PASS: TestAccDataSourceAwsRouteTable_main (11.19s)
```
2017-01-25 19:50:37 +02:00
Jake Champlin a60f35e694
provider/aws: Add EBS Volume support for EMR Instance Groups
Adds EBS Volume support and tests for EMR Instnace Groups

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEMRInstanceGroup_ebsBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/25 10:14:58 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEMRInstanceGroup_ebsBasic -timeout 120m
=== RUN   TestAccAWSEMRInstanceGroup_ebsBasic
--- PASS: TestAccAWSEMRInstanceGroup_ebsBasic (675.14s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    675.171s
```
2017-01-25 10:29:41 -05:00
Jake Champlin dc91285949 Merge pull request #11369 from hashicorp/f-add-suppress-func-db-instance
provider/aws: Add diff suppress function for aws_db_instance
2017-01-24 12:30:25 -05:00
Brad Larson c5c2d27e25 Fix: Incorrect AWS Lambda Qualifier Regexp
Type of change:
===============
- Bug fix

What changed? ... and Why:
==========================
The regexp is currently set to:
`pattern := `^[a-zA-Z0-9$_]+$`

The AWS docs state that qualifer names must conform to the following
regexp:
`Pattern: (|[a-zA-Z0-9$_-]+)`

As you can see, the current regexp in Terraform is missing the `-` at
the end.

This addresses that.

How has it been tested?
=======================
Added a few test cases to the existing spec for `AwsLambdaQualifier`
validation.
2017-01-24 15:57:57 +00:00
Gauthier Wallet 92d723609e provider/aws: Added a S3 Bucket domain name attribute (#10088) 2017-01-24 15:54:46 +02:00
Radek Simko 4f7f048f76 provider/postgresql: Fix failing acceptance test (#11375) 2017-01-24 14:10:56 +02:00
Radek Simko 2077869be4 provider/heroku: Fix failing acceptance test (#11374) 2017-01-24 14:10:11 +02:00
Radek Simko cbaf051af5 provider/aws: Fix acceptance tests w/ missing values (#11377) 2017-01-24 14:09:29 +02:00
Radek Simko e81d096699 provider/aws: Fix failing ecs acceptance test w/ ALB (#11367) 2017-01-24 01:58:30 +02:00
Jake Champlin 4c5a08cae7
fix fat-fingered change in test 2017-01-23 18:28:16 -05:00
Jake Champlin 4e7ccc35a3
provider/aws: Add diff suppress function for aws_db_instance
Adds a diff suppress function for the `engine_version` attribute of the `db_instance` AWS resource.

The function only supresses the state diff, if the attribute key `auto_minor_version_upgrade` is set, and if the returned `engine_version` from the running RDS instance shares the same prefix as the configured `engine_version`.

 ```
 $ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBInstance_MinorVersion'
 ==> Checking that code complies with gofmt requirements...
 go generate $(go list ./... | grep -v /terraform/vendor/)
 2017/01/23 17:59:14 Generated command/internal_plugin_list.go
 TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBInstance_MinorVersion -timeout 120m
 === RUN   TestAccAWSDBInstance_MinorVersion
 --- PASS: TestAccAWSDBInstance_MinorVersion (503.48s)
 PASS
 ok      github.com/hashicorp/terraform/builtin/providers/aws    503.518s
 ```
2017-01-23 18:12:34 -05:00
Joe Topjian b593d6903d provider/openstack: Volume Attachment Updates (#11285)
This commit adds a StateRefresh func for volume attachments. Mostly
this is to add a buffer of time between the request and the return
of the attachment to give time for the volume to become attached,
however, in some cases the refresh function could work as specified.

Docs have also been updated to reflect that a device could be specified,
but to use with caution.
2017-01-23 22:19:50 +00:00
Nevins 03b6dfd7e3 adding (backwards compatible) support for providing multiple source filename and content (#11271) 2017-01-23 22:17:45 +00:00
Kit Ewbank 87d98b1ff1 Correct aws_s3_bucket_object data source acceptance tests. (#11346) 2017-01-23 21:53:02 +00:00
Kit Ewbank c5f94d2999 Add 'aws_vpc_endpoint' data source. (#11323) 2017-01-23 21:50:38 +00:00
Kit Ewbank cbe4a99d31 Add 'aws_canonical_user_id' data source. (#11332) 2017-01-23 21:44:42 +00:00