Commit Graph

3474 Commits

Author SHA1 Message Date
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
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 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
clint shryock fd3f4bbf3d fix up a test to actually compare them 2017-01-20 16:20:32 -06:00
Paul Stack 3b2c4ee2ed provider/aws: Remove hardcoded https from the ecr repository (#11307)
* provider/aws: Remove hardcoded https from the ecr repository

When the ECR resource was created, we hardcoded the repository URL to
start with https://

This was a mistake as all interaction with the repository now must
include a replace function for the https:// to "" for this to be usable

We need to note this change in the backward incompatibilities

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEcrRepository_'                                                      ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/20 14:37:36 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEcrRepository_ -timeout 120m
=== RUN   TestAccAWSEcrRepository_importBasic
--- PASS: TestAccAWSEcrRepository_importBasic (20.46s)
=== RUN   TestAccAWSEcrRepository_basic
--- PASS: TestAccAWSEcrRepository_basic (18.77s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	39.251s
```

* Update ecr_repository.html.markdown
2017-01-20 17:34:52 +00:00
clint shryock 91753409b9 fix issue where, depending on a creation of flattening, the lambda functions may be a set or an []interface{} 2017-01-20 11:25:30 -06:00
Jake Champlin 191bb15830
provider/aws: Fix S3BucketPolicy Acceptance Tests
Fixes AwsS3BucketPolicy Acceptance Tests to match policy document changes from upstream.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSS3BucketPolicy'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/20 11:55:23 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSS3BucketPolicy -timeout 120m
=== RUN   TestAccAWSS3BucketPolicy_basic
--- PASS: TestAccAWSS3BucketPolicy_basic (33.64s)
=== RUN   TestAccAWSS3BucketPolicy_policyUpdate
--- PASS: TestAccAWSS3BucketPolicy_policyUpdate (61.91s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    95.591s
```
2017-01-20 11:58:15 -05:00
Radek Simko acd2b247b4
provider/aws: Wait until ALB is provisioned 2017-01-20 06:50:50 -08:00
Dylan Vaughn 2aca4a4d99 provider/aws: CloudFormation YAML template support (#11121) 2017-01-20 14:00:32 +00:00
Paul Stack f8a3564065 provider/aws: Add DataSource to get a list of Autoscaling groups in a (#11303)
region
2017-01-20 13:21:12 +00:00
Jake Champlin 5276496e6d
provider/aws: Update ECS task_definition and service
Updates ECS task_definition documentation, and schema validation functions to match the AWS API documentation.

Updates ECS service documentation, and schema validation functions match the AWS API documentation.
2017-01-19 17:54:52 -05:00
clint shryock 6d4f4007fe restore lambdasethash, include in cache behavior id hash, and document (including limits) 2017-01-19 15:53:52 -06:00
clint shryock 5400f7c68e fix hash problem 2017-01-19 09:28:49 -06:00
clint shryock 2cf64ef72c tweaks to restore TypeSet functionality 2017-01-19 09:22:02 -06:00
Jake Champlin de80ebd073 Merge pull request #11272 from hashicorp/f-add-instance-datasource
provider/aws: Add aws_instance data source
2017-01-18 18:30:49 -05:00
Jake Champlin c99bc8a807
Add instance_tags as an additional filter 2017-01-18 13:14:49 -05:00
Jake Champlin 9cbd67dd0b
provider/aws: Add aws_instance data source
Adds the `aws_instance` data source, tests, and documentation.

```
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/18 11:49:09 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInstanceDataSource -timeout 120m
=== RUN   TestAccAWSInstanceDataSource_basic
--- PASS: TestAccAWSInstanceDataSource_basic (106.24s)
=== RUN   TestAccAWSInstanceDataSource_AzUserData
--- PASS: TestAccAWSInstanceDataSource_AzUserData (108.52s)
=== RUN   TestAccAWSInstanceDataSource_gp2IopsDevice
--- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (80.71s)
=== RUN   TestAccAWSInstanceDataSource_blockDevices
--- PASS: TestAccAWSInstanceDataSource_blockDevices (94.07s)
=== RUN   TestAccAWSInstanceDataSource_rootInstanceStore
--- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (95.17s)
=== RUN   TestAccAWSInstanceDataSource_privateIP
--- PASS: TestAccAWSInstanceDataSource_privateIP (241.75s)
=== RUN   TestAccAWSInstanceDataSource_keyPair
--- PASS: TestAccAWSInstanceDataSource_keyPair (208.77s)
=== RUN   TestAccAWSInstanceDataSource_VPC
--- PASS: TestAccAWSInstanceDataSource_VPC (109.89s)
=== RUN   TestAccAWSInstanceDataSource_SecurityGroups
--- PASS: TestAccAWSInstanceDataSource_SecurityGroups (118.66s)
=== RUN   TestAccAWSInstanceDataSource_VPCSecurityGroups
--- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (136.79s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    1300.625s
```
2017-01-18 12:19:44 -05:00
Clint c5f899d64c Merge pull request #11247 from hashicorp/b-aws-rds-mssql-timezone
provider/aws: Add support for setting MSSQL Timezone in aws_db_instance
2017-01-18 08:39:41 -06:00
clint shryock 549fd22c87 provider/aws: Add support for setting MSSQL Timezone in aws_db_instance 2017-01-18 08:39:18 -06:00
Eric Lee 33f781be36 provider/aws allow ALB target group stickiness to be enabled (#11251)
* aws_alb_target_group allow stickiness to be disabled

* aws_alb_target_group document stickiness enabled flag
2017-01-18 14:10:09 +00:00
Paul Stack 36b6384956 provider/aws: Add support for placement_constraint to aws_ecs_service (#11242)
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEcsServiceWithPlacementConstraints'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/17 18:25:27 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEcsServiceWithPlacementConstraints -timeout 120m
=== RUN   TestAccAWSEcsServiceWithPlacementConstraints
--- PASS: TestAccAWSEcsServiceWithPlacementConstraints (113.18s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	113.208s
```

//cc @catsby
2017-01-17 18:43:34 +00:00
Greg Thole e06f32ffe9 Provider AWS: Add Placement Strategy to aws_ecs_service resource (#11201)
* Add aws_ecs_service placement_strategy param

* Update docs
2017-01-17 18:10:44 +00:00
David Blooman 05c83a3ca1 provider/aws: Add Inspector Support (#11217)
* provider/aws: Add Inspector Support

* inscrease time to 1 hour
2017-01-17 17:30:46 +00:00
James Bardin ee1d6d3d43 Fix vet errors in providers 2017-01-13 17:31:44 -05:00
Clint 2599137150 Merge pull request #11164 from johanneswuerbach/aws-route53-changeable-record-type
provider/aws: Make the type of a route53_record changeable
2017-01-13 13:51:35 -06:00
Paul Stack 8e4f19918a provider/aws: Add Support for aws_cloudwatch_metric_alarm extended (#11193)
statistic

Fixes: #11189

This introduces a new parameter and makes an existing parameter from
`required` to `optional` as both cannot be specified together

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm_' 2 ↵ ✹ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/13 11:25:24 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudWatchMetricAlarm_ -timeout 120m
=== RUN   TestAccAWSCloudWatchMetricAlarm_importBasic
--- PASS: TestAccAWSCloudWatchMetricAlarm_importBasic (19.80s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_basic
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (20.42s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_extendedStatistic
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (18.92s)
PASS
```
2017-01-13 14:47:58 +00:00
Jake Champlin a2c0b85b2d Merge pull request #11162 from hashicorp/f-add-route53-record-import-10941
provider/aws: Add import to route53 record
2017-01-12 12:08:46 -05:00
Jake Champlin bb0b9048b0 Merge pull request #11178 from hashicorp/cloudwatch-log-tags
provider/aws: Add Support for Tags to aws_cloudwatch_log_group
2017-01-12 10:21:07 -05:00
Paul Stack 6b292c23dc Update resource_aws_cloudwatch_log_group.go 2017-01-12 17:14:29 +02:00
Paul Stack bcdabe7619 provider/aws: New DataSource: aws_elb_hosted_zone_id (#11027)
* provider/aws: New DataSource: aws_elb_hosted_zone_id

This datasource is a list of all of the ELB DualStack Hosted Zone IDs.
This will allow us to reference the correct hosted zone id when creating
route53 alias records

There are many bugs for this - this is just the beginning of fixing them

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElbHostedZoneId_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/04 13:04:32 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElbHostedZoneId_basic -timeout 120m
=== RUN   TestAccAWSElbHostedZoneId_basic
--- PASS: TestAccAWSElbHostedZoneId_basic (20.46s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	20.484s
```

* Update elb_hosted_zone_id.html.markdown
2017-01-12 16:50:58 +02:00
stack72 188350458c
provider/aws: Add Support for Tags to aws_cloudwatch_log_group
``````
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchLogGroup_'                               2 ↵ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/12 16:22:07 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudWatchLogGroup_ -timeout 120m
=== RUN   TestAccAWSCloudWatchLogGroup_importBasic
--- PASS: TestAccAWSCloudWatchLogGroup_importBasic (44.20s)
=== RUN   TestAccAWSCloudWatchLogGroup_basic
--- PASS: TestAccAWSCloudWatchLogGroup_basic (38.08s)
=== RUN   TestAccAWSCloudWatchLogGroup_retentionPolicy
--- PASS: TestAccAWSCloudWatchLogGroup_retentionPolicy (55.85s)
=== RUN   TestAccAWSCloudWatchLogGroup_multiple
--- PASS: TestAccAWSCloudWatchLogGroup_multiple (20.68s)
=== RUN   TestAccAWSCloudWatchLogGroup_disappears
--- PASS: TestAccAWSCloudWatchLogGroup_disappears (21.48s)
=== RUN   TestAccAWSCloudWatchLogGroup_tagging
--- PASS: TestAccAWSCloudWatchLogGroup_tagging (39.09s)
ok
PASS	github.com/hashicorp/terraform/builtin/providers/aws	219.411s
```
2017-01-12 16:39:12 +02:00
Paul Stack 73e950989c provider/aws: Allow creating aws_codecommit repository outside of (#11177)
us-east-1

Fixes #11175

Because of a previous limitation that codecommit only ran in us-east-1,
we hard coded the session under which it should run. This has caused the
repository to be spun up in the wrong region regardless of what region
was passed to the provider

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCodeCommitRepository_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/12 16:09:52 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCodeCommitRepository_ -timeout 120m
=== RUN   TestAccAWSCodeCommitRepository_basic
--- PASS: TestAccAWSCodeCommitRepository_basic (23.28s)
=== RUN   TestAccAWSCodeCommitRepository_withChanges
--- PASS: TestAccAWSCodeCommitRepository_withChanges (33.71s)
=== RUN   TestAccAWSCodeCommitRepository_create_default_branch
--- PASS: TestAccAWSCodeCommitRepository_create_default_branch (22.70s)
=== RUN   TestAccAWSCodeCommitRepository_create_and_update_default_branch
--- PASS: TestAccAWSCodeCommitRepository_create_and_update_default_branch (32.72s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	112.437s
```
2017-01-12 16:27:04 +02:00
Johannes Würbach ef0196f754
provider/aws: Make the type of a route53_record changeable
Utilize the ChangeResourceRecordSets to change the type of a record by
deleting and recreating with a new type.

As change batches are considered transactional changes, Amazon Route 53
either makes all or none of the changes in the batch request ensuring the
update will never be partially applied.
2017-01-12 13:13:35 +01:00
Jake Champlin e579c1c90f
provider/aws: Add import to route53 record
Allows the user to run:

```
terraform import aws_route53_record.record_name <record_id>
```

Fixes: #10941
2017-01-11 17:38:02 -05:00
Jake Champlin 642e0107e1
Update error message to 'route_table_id' 2017-01-11 13:23:40 -05:00
Jake Champlin 439b94707e
Use 'route_table_id' instead of 'rtb_id' 2017-01-11 13:22:29 -05:00
Jake Champlin d794bdfc26
provider/aws: Add missing id argument for Route Table data source
Documentation for the `aws_route_table` data source mentions that it supports a route table `id` as an argument, however it was missing from the actual provider code.

Adds in the missing provider code, adds a test, and updates the documentation to use `rtb_id` as the argument, instead of the more ambiguous `id`.
2017-01-11 13:16:52 -05:00