Commit Graph

6157 Commits

Author SHA1 Message Date
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
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
Paul Stack 987b910828 Ns1 provider (#10782)
* vendor: update gopkg.in/ns1/ns1-go.v2

* provider/ns1: Port the ns1 provider to Terraform core

* docs/ns1: Document the ns1 provider

* ns1: rename remaining nsone -> ns1 (#10805)

* Ns1 provider (#11300)

* provider/ns1: Flesh out support for meta structs.

Following the structure outlined by @pashap.

Using reflection to reduce copy/paste.

Putting metas inside single-item lists.  This is clunky, but I couldn't
figure out how else to have a nested struct.  Maybe the Terraform people
know a better way?

Inside the meta struct, all fields are always written to the state; I
can't figure out how to omit fields that aren't used.  This is not just
verbose, it actually causes issues because you can't have both "up" and
"up_feed" set).

Also some minor other changes:
- Add "terraform" import support to records and zones.
- Create helper class StringEnum.

* provider/ns1: Make fmt

* provider/ns1: Remove stubbed out RecordRead (used for testing metadata change).

* provider/ns1: Need to get interface that m contains from Ptr Value with Elem()

* provider/ns1: Use empty string to indicate no feed given.

* provider/ns1: Remove old record.regions fields.

* provider/ns1: Removes redundant testAccCheckRecordState

* provider/ns1: Moves account permissions logic to permissions.go

* provider/ns1: Adds tests for team resource.

* provider/ns1: Move remaining permissions logic to permissions.go

* ns1/provider: Adds datasource.config

* provider/ns1: Small clean up of datafeed resource tests

* provider/ns1: removes testAccCheckZoneState in favor of explicit name check

* provider/ns1: More renaming of nsone -> ns1

* provider/ns1: Comment out metadata for the moment.

* Ns1 provider (#11347)

* Fix the removal of empty containers from a flatmap

Removal of empty nested containers from a flatmap would sometimes fail a
sanity check when removed in the wrong order. This would only fail
sometimes due to map iteration. There was also an off-by-one error in
the prefix check which could match the incorrect keys.

* provider/ns1: Adds ns1 go client through govendor.

* provider/ns1: Removes unused debug line

* docs/ns1: Adds docs around apikey/datasource/datafeed/team/user/record.

* provider/ns1: Gets go vet green
2017-01-23 21:41:07 +00:00
Radek Simko 6791735790 Merge pull request #11358 from radeksimko/f-aws-skip-region-validation
provider/aws: Allow bypassing region validation
2017-01-23 21:31:52 +00:00
Jake Champlin ca21fd0141 Merge pull request #11327 from hashicorp/b-fix-ignition-systemd-units
provider/ignition: Fix systemd unit errors
2017-01-23 16:28:28 -05:00
James Nugent 19e55457c9 Merge pull request #11360 from hashicorp/asg-hook-errors
provider/aws: Improve error message from ASG Hooks
2017-01-23 17:47:07 +00:00
James Nugent b95faa3f12 provider/aws: Improve error message from ASG Hooks
This commit switches out the use of `fmt.Errorf` to `errwrap.Wrapf` in
the `aws_autoscaling_lifecycle_hook` resource, and corrects a typo which
causes the parameter object to be returned to a user rather than the
underlying error.
2017-01-23 17:35:47 +00:00
Jake Champlin 8580f58063
Use strings.HasPrefix instead of regexp for lambda_permission 2017-01-23 12:34:56 -05:00
Jake Champlin 763cfcdb1f
Use strings.HasPrefix instead of regexp for ecs_service 2017-01-23 12:02:53 -05:00
Jake Champlin 8159731c91
provider/aws: Allow ARN identifier to be set
Allows users from govcloud and other regions (aws-cn) to now use the following resources correctly:

```
- data "aws_billing_service_account"
- data "aws_elb_service_account"
- resource "aws_cloudfront_origin_access_identity"
- resource "aws_ecs_service"
- resource "aws_iam_saml_provider"
- resource "aws_lambda_permission"
- resource "aws_sns_topic_policy"
```
2017-01-23 11:30:28 -05:00
Radek Simko 6d8d596883
provider/aws: Allow bypassing region validation 2017-01-23 15:04:46 +00:00
Jake Champlin c5126b5add Merge pull request #11340 from svanzoest/patch-1
provider/aws: Remove MaxFrameRate default on Elastictranscoder Preset
2017-01-23 09:21:20 -05:00
Jake Champlin 2efe489d59 Merge pull request #11339 from jmcarp/issue-10061
Set correct aws partition on s3 resource.
2017-01-23 09:17:33 -05:00
James Nugent 6013dc06a9 Merge pull request #11333 from radeksimko/f-aws-alb-wait
provider/aws: Wait until ALB is actually provisioned
2017-01-23 01:48:09 +00:00
Jake Champlin aa3eda7642 Merge pull request #11313 from hashicorp/f-fix-s3bucketpolicy-acctests
provider/aws: Fix S3BucketPolicy Acceptance Tests
2017-01-22 15:41:21 -05:00
Sander van Zoest ec9aff034f aws/elastic_transcoder remove default MaxFrameRate
Fixes #9847
2017-01-22 12:39:23 -08:00
Joshua Carp 353430e08a
Set correct aws partition on s3 resource.
[Resolves #10061]
2017-01-22 15:05:35 -05:00
Radek Simko 41da963d07
provider/aws: Make ALBs internal or add IGW in tests 2017-01-21 22:00:36 +00:00
Jake Champlin f458feb055
provider/ignition: Fix systemd unit errors
According to the coreos [documentation](https://coreos.com/ignition/docs/latest/configuration.html), systemd units only require the name attribute per each unit. This can also be validated with the CoreOS config validator. This change allows the `ignition_systemd_unit` resource to no longer fail if given an empty `content` and `dropin`.

Also adds a test to cover this use case.
2017-01-21 00:28:04 -05:00
Jake Champlin b9ade93a48 Merge pull request #11298 from hashicorp/f-update-ecs-definitions-constraints
provider/aws: Update ECS task_definition and service
2017-01-20 17:34:10 -05:00
Clint 7c5b3a5012 Merge pull request #11291 from hashicorp/pr-10985
provider/aws: implement CloudFront Lambda Function Associations (supersedes #10985)
2017-01-20 16:34:03 -06:00