Commit Graph

16127 Commits

Author SHA1 Message Date
Mitchell Hashimoto 17cb8d8d8d Merge pull request #11510 from hashicorp/b-plan-config
backend/local: validate module exists for plan
2017-01-30 08:44:06 -08:00
Mitchell Hashimoto 00232f0994
terraform: acquireRun during test to avoid special case logic 2017-01-30 08:41:38 -08:00
Mitchell Hashimoto 5b42781117
terraform: defer unlock of lock in Stop to enure it always unlocks 2017-01-30 08:35:10 -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
Paul Stack 5411e7d36b provider/aws: Bump SDK version to 1.6.18 (#11514) 2017-01-30 14:18:29 +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
Thomas Schaaf 22cbca240c More complex example for db_event_subscription (#11513) 2017-01-30 12:13:02 +00: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
Mitchell Hashimoto a424203ea3
backend/local: validate module exists for plan
Fixes #11504

The local backend should error if `terraform plan` is called in a
directory with no Terraform config files (same behavior as 0.8.x).
**New behavior:** We now allow `terraform plan -destroy` with no
configuration files since that seems reasonable.
2017-01-29 20:02:12 -08:00
Mitchell Hashimoto 9183be4c83
update master version to 0.9.0-dev 2017-01-29 18:46:18 -08:00
Radek Simko d5ac48de2a helper/schema: Remove missed subfields when parent list is removed (#11498) 2017-01-29 21:15:00 +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
Christoph Blecker c01680b7a9 build: Update travis to go1.7.5 and go1.8rc3 and Vagrantfile to go1.7.5 (#11490)
* Update travis to go1.7.5 and go1.8rc3

* Update Vagrantfile to go1.7.5
2017-01-29 19:39:07 +00: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
Christoph Blecker 061c8cc7ef ip_address is an array and requires the instance number (#11389) 2017-01-29 16:36:57 +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
Adam Dehnel d17b4ed776 Added example showing multiple principles (#11495) 2017-01-29 15:57:46 +00:00
Lorentzca e98df5d8bc Fix do doc small typo (#11497) 2017-01-29 15:56:13 +00:00
Adam Dehnel 6fae202017 Adding details around using a data source (#11494)
landed on https://github.com/hashicorp/terraform/issues/5541 and wanted to take a shot at adding the appropriate details to the iam role page.
2017-01-29 15:55:46 +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
Mitchell Hashimoto b8c310c61e
command: update test failure to correct message 2017-01-27 21:24:58 -08:00
Mitchell Hashimoto cf46e1c3e0
terraform: don't validate computed values in validate
This disables the computed value check for `count` during the validation
pass. This enables partial support for #3888 or #1497: as long as the
value is non-computed during the plan, complex values will work in
counts.

**Notably, this allows data source values to be present in counts!**

The "count" value can be disabled during validation safely because we
can treat it as if any field that uses `count.index` is computed for
validation. We then validate a single instance (as if `count = 1`) just
to make sure all required fields are set.
2017-01-27 21:15:43 -08:00
Mitchell Hashimoto 0ba3fcdc63
terraform: test static var being passed into grandchild for count 2017-01-27 20:38:07 -08:00
Mitchell Hashimoto 2162d6cf3d
terraform: test a basic static var count passed into a module 2017-01-27 20:32:55 -08:00
Mitchell Hashimoto dd6d025dbb
terraform: commmit generated file 2017-01-27 20:31:29 -08:00
Roberto Jung Drebes 4dc9007e8e provider/google: acceptance tests for traffic selectors 2017-01-28 00:55:17 +01:00
Roberto Jung Drebes b41efe7dc7 provider/google: remote_traffic_selector for google_compute_vpn_tunnel 2017-01-28 00:09:58 +01: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
Paul Stack 017d7ebf4f Update CHANGELOG.md 2017-01-27 19:29:53 +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
Paul Stack 97a2bcecf1 Update CHANGELOG.md 2017-01-27 19:16:27 +00: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
Mitchell Hashimoto d224d872b9 Merge pull request #11454 from hashicorp/f-goodbye-legacy
core: remove legacy graph
2017-01-27 11:08:32 -08: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 2beb62c92b
terraform: remove flatten, forever 2017-01-26 21:03:27 -08:00
Mitchell Hashimoto 6d731b3b46
terraform: new provisioner node 2017-01-26 21:02:55 -08:00
Mitchell Hashimoto e89d738679
terraform: provider transform is converted to new graph world view 2017-01-26 20:58:22 -08:00
Mitchell Hashimoto 91c9c6032f
terraform: remove the old resource node 2017-01-26 20:48:05 -08:00