Commit Graph

4170 Commits

Author SHA1 Message Date
stack72 6e7ee05392 Merge branch 'gh3424-vgw-route-prop' 2017-06-09 14:13:27 +03:00
stack72 c7d6dfd7e7 provider/aws: go vet issue with aws_vpn_gateway_route_propagation 2017-06-09 14:12:18 +03:00
Puneeth Nanjundaswamy 4d7c0d4924 fix aws cidr validation error (#15158) 2017-06-09 13:38:34 +03:00
clint shryock d587b68863 provider/aws: Add an explicit depends on for the internet gateway, should help this test pass 2017-06-08 16:44:22 -05:00
Jan Škrášek 70e8d2d33f provider/aws/spot_fleet_request: fixed reading network associate_public_ip_address configuration (#13748) 2017-06-07 15:14:00 -05:00
Paul Stack 75842077da provider/aws: Add gov and cn hosted zone Ids to aws_elb_hosted_zone data source (#15149)
Fixes: #15128
2017-06-07 13:18:26 +03:00
Martin Atkins 1aff439c3d provider/aws: aws_vpn_gateway_route_propagation resource
This is a separate resource that serves a similar purpose to the
propagating_vgws argument on aws_route_table, but allows route
propagations to be created independently of the route table, which in
turn allows the VPN gateway to be created after the route table it will
contribute to, possibly in a separate Terraform module.

To make this work, propagating_vgws on aws_route_table is now marked
as Computed, meaning that it won't try to delete any existing propagation
edges if there is no setting for it in configuration at all. This allows
the user to choose whether to use the argument or the separate resource,
though using both together will not work, as explained in the docs.
2017-06-06 17:56:31 -07:00
Vasily Tarasov 677a418e78 provider/aws: Filter acm certificates by type (#15064)
* Filter ACM certificates by type

* Add schema tests for certificate types
2017-06-06 15:08:52 -05:00
Clint 372a80bc42 provider/aws: Add Sweeper setup, Sweepers for DB Option Group, Key Pair (#14773)
* provider/aws: Add Sweeper setup, Sweepers for DB Option Group, Key Pair

* provider/google: Add sweeper for any leaked databases
* more recursion and added LC sweeper, to test out the Dependency path

* implement a dependency example

* implement sweep-run flag to filter runs

* stub a test for TestMain

* test for multiple -sweep-run list
2017-06-06 10:34:17 -05:00
Radek Simko 3f3664a4e4 provider/aws: Expose reason of EMR cluster termination (#15117) 2017-06-06 13:55:13 +01:00
Radek Simko aac988da93 provider/aws: Fix race condition in Beanstalk acc test (#15116) 2017-06-06 12:28:13 +01:00
Joel Thompson 1812ce2ff3 Add task_parameters parameter to aws_ssm_maintenance_window_task resource (#15104)
* Add task_parameters support to aws_ssm_maintenance_window_task

task_parameters weren't supported yet. This adds support for them. It
also corrects a documentation typo in the maintenance_window resource.

* Respond to internal feedback
2017-06-06 14:11:05 +03:00
Paul Morton e4899de13e provider/aws: New SSM Parameter resource (#15035)
* New SSM Parameter resource

Can be used for creating parameters in AWS' SSM Parameter Store that can then be used by other applications that have access to AWS and necessary IAM permissions.

* Add docs for new SSM Parameter resource

* Code Review and Bug Hunt and KMS Key
- Addressed all issues in #14043
- Added ForceNew directive to type
- Added the ability to specify a KMS key for encryption and decryption

* Add SSM Parameter Data Source

* Fix bad merge

* Fix SSM Parameter Integration Tests

* docs/aws: Fix typo in SSM sidebar link
2017-06-06 09:55:25 +01:00
grayaii 42133f2077 ISSUE-10272 Lets not look at the requestor id. (#11849)
* ElastiCache replication group support

- Additional API coverage for ElastiCache replication groups.
- Update rep group error handling.
- ElastiCache rep group -- additional update coverage.
- Response to pull-request feedback for ElastiCache rep groups.
- Fix the replication group deletion code.
- Add rep group test coverage.
- Add preferred az support in elasticcache replication group
- Add PrimaryClusterID to Elasticache Replication Group
- AWS Elasticache Replication Group check if available

* Added ClearCare version number.

* NOJIRA Cherry pick lambda latest s3 version

* NOJIRA fixed merge issue that i missed before.

* NOJIRA fixed merge issue that i missed before.

* NOJIRA fixed merge issue that i missed before.

* NOJIRA fixed merge issue that i missed before.

* Add missing genRandInt function

* NOJIRA fixed merge issue that i missed before.

* Trying to get gofrmt to work...

* CS-157 Increase timeout of elasticsearch creation resource.

* Lambda ENI cleanup added to security group delete

* ISSUE-10272 Lets not look at the requestor id.

* provider/aws: Add test for VPC-enabled lambda w/ invocation
2017-06-06 09:19:23 +01:00
Paul Stack df11150a6a provider/aws: Revoke default ipv6 egress rule for aws_security_group (#15075)
Fixes: #14522

To follow similar work in IPv4, we are now going to revoke the default
IPv6 egress rule from an empty AWS security group

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSSecurityGroup_ipv4andipv6Egress'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/05 14:01:52 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSSecurityGroup_ipv4andipv6Egress -timeout 120m
=== RUN   TestAccAWSSecurityGroup_ipv4andipv6Egress
--- PASS: TestAccAWSSecurityGroup_ipv4andipv6Egress (63.39s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	63.423s
```
2017-06-06 00:53:04 +03:00
Radek Simko d7f54ed68d provider/aws: Raise timeout for DHCP opts creation (#15084) 2017-06-05 20:34:59 +01:00
Radek Simko a464e97979 provider/aws: Fix Beanstalk App Version acceptance test (#15083) 2017-06-05 20:34:39 +01:00
Radek Simko 7323b4d7eb provider/aws: Retry DB param grp delete on InvalidDBParameterGroupState (#15071) 2017-06-05 15:38:23 +01:00
Benjamin Lau ef4e89c7be [provider/aws] check that we actually have NodeGroupMembers (#13488) 2017-06-05 09:07:46 -05:00
Radek Simko cf58139378 provider/aws: Retry ECS svc update on ServiceNotFoundException (#15073) 2017-06-05 13:20:19 +01:00
Paul Stack 2aba79fa96 provider/aws: Add support for a configurable timeout in db_option_group (#15023)
Fixes: #14995

Adds a timeout block to configure deletes

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSDBOptionGroup'                                                       ✹ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/02 19:54:18 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSDBOptionGroup -timeout 120m
=== RUN   TestAccAWSDBOptionGroup_importBasic
--- PASS: TestAccAWSDBOptionGroup_importBasic (57.03s)
=== RUN   TestAccAWSDBOptionGroup_basic
--- PASS: TestAccAWSDBOptionGroup_basic (32.69s)
=== RUN   TestAccAWSDBOptionGroup_timeoutBlock
--- PASS: TestAccAWSDBOptionGroup_timeoutBlock (31.59s)
=== RUN   TestAccAWSDBOptionGroup_namePrefix
--- PASS: TestAccAWSDBOptionGroup_namePrefix (28.24s)
=== RUN   TestAccAWSDBOptionGroup_generatedName
--- PASS: TestAccAWSDBOptionGroup_generatedName (30.91s)
=== RUN   TestAccAWSDBOptionGroup_defaultDescription
--- PASS: TestAccAWSDBOptionGroup_defaultDescription (54.13s)
=== RUN   TestAccAWSDBOptionGroup_basicDestroyWithInstance
--- PASS: TestAccAWSDBOptionGroup_basicDestroyWithInstance (612.01s)
=== RUN   TestAccAWSDBOptionGroup_OptionSettings
--- PASS: TestAccAWSDBOptionGroup_OptionSettings (54.34s)
=== RUN   TestAccAWSDBOptionGroup_sqlServerOptionsUpdate
--- PASS: TestAccAWSDBOptionGroup_sqlServerOptionsUpdate (53.86s)
=== RUN   TestAccAWSDBOptionGroup_multipleOptions
--- PASS: TestAccAWSDBOptionGroup_multipleOptions (33.72s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	956.958s
```
2017-06-05 12:36:41 +03:00
Paul Stack 89aedb4802 provider/aws: Guard against panic when no aws_default_vpc found (#15070)
Found as part of #15065, when there is no default VPC, Terraform will
throw a panic. This prevents that as a user should never get that

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSDefaultVpc_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/05 12:16:09 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSDefaultVpc_basic -timeout 120m
=== RUN   TestAccAWSDefaultVpc_basic
--- PASS: TestAccAWSDefaultVpc_basic (44.65s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	44.669s
```
2017-06-05 12:28:12 +03:00
Radek Simko f24396b904 provider/aws: Retry ECS svc creation on ClusterNotFoundException (#15066) 2017-06-05 09:50:23 +01:00
Radek Simko b14b81f27d provider/aws: Retry Lambda func creation on IAM error (#15067) 2017-06-05 09:49:29 +01:00
Radek Simko 4baaada826 provider/aws: Retry Redshift cluster deletion on InvalidClusterState (#15068) 2017-06-05 09:48:33 +01:00
johnthedev97 de78838cd4 Fix issues in Cloudwatch Log Group tag (#14886)
* Fix issues in Cloudwatch Log Group tag
    1) Removing tags from terraform doesn’t actually get removed in AWS
    2) Trying to update a tag with empty value (“”) to a non-empty value
causes terraform to loop forever

The issue was caused by a mixup of using tag values where tag name
should have used and is corrected in this patch.
This patch also removes the comparison of old and new tag values,
because AWS api takes care of updates by itself and there is no need to
perform an unnecessary UnTag API to update an existing tag value

* Updated the test cases to cover the removal and empty update scenarios
2017-06-02 22:18:27 +03:00
clint shryock 29444aee87 bump the time we wait for RunInstances to succeed 2017-06-01 16:05:14 -05:00
Jake Champlin acb38e3782
provider/aws: Fix ModifyInstanceAttribute on new instances
Previously `ModifyInstanceAttribute` permissions were required on creating a new instance with an unmodified `source_dest_check` attribute, as we forced the `ModifyInstanceAttribute` set on a new AWS instance.

This change only calls `ModifyInstanceAttribute` if `source_dest_check` was changed from default on a new instance, or if `source_dest_check` was modified.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS="-run=TestAccAWSInstance_sourceDestCheck"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/01 11:18:31 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInstance_sourceDestCheck -timeout 120m
=== RUN   TestAccAWSInstance_sourceDestCheck
--- PASS: TestAccAWSInstance_sourceDestCheck (172.28s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    172.308s
```
2017-06-01 11:52:22 -04:00
Paul Stack cfcb4dff79 provider/aws: Support import of aws_lambda_event_source_mapping (#14898)
Fixes: #14017

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSLambdaEventSourceMapping_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/29 00:36:31 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSLambdaEventSourceMapping_importBasic -timeout 120m
=== RUN   TestAccAWSLambdaEventSourceMapping_importBasic
--- PASS: TestAccAWSLambdaEventSourceMapping_importBasic (144.23s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	144.258s
```
2017-06-01 13:35:34 +03:00
Radek Simko bc314ca8a0 provider/aws: Expect exception on deletion of APIG Usage Plan Key (#14958) 2017-06-01 06:23:02 +01:00
Radek Simko 8fa40c1ce7 provider/aws: Work around IAM eventual consistency in CW Log Subs (#14959) 2017-06-01 06:21:36 +01:00
Thomas Schaaf 79c91e11c8 provider/aws: Add aws elastic beanstalk solution stack (#14944)
* Add aws elastic beanstalk solution stack

Signed-off-by: Thomas Schaaf <thomaschaaf@Thomass-MBP.fritz.box>

* Fix incorrect naming

Signed-off-by: Thomas Schaaf <thomaschaaf@Thomass-MBP.fritz.box>

* Use unique go variable/function names

Signed-off-by: Thomas Schaaf <thomaschaaf@Thomass-MacBook-Pro.local>

* Add docs to sidebar

* Sort provider by alphabet

* Fix indent

* Add required statement

* Fix acceptance test
2017-06-01 02:23:06 +03:00
Mioi Hanaoka 805ff4021e provider/aws: Fix misleading error in aws_route validation
If more than one of the allowed targets is specified in an `aws_route`
resource, we should provide an error message that does not include
`route_table_id` as a valid target, since `route_table_id` is actually
a required argument.
2017-05-31 12:50:56 -07:00
Jake Champlin 0845ab8d0f Merge pull request #14964 from hashicorp/b-fix-panic-nil-dead-letter-config
provider/aws: Fix panic on nil dead_letter_config
2017-05-31 14:56:55 -04:00
rdark bebcc8796a export internal tunnel addresses + document (#14835) 2017-05-31 21:03:13 +03:00
PaulAtkins d3eed78d95 provider/aws: Add support for aws_ssm_patch_baseline (#14954)
* Add support for aws_ssm_patch_baseline and aws_ssm_patch_group

* Fix failing test

* Cleanup commented out code
2017-05-31 20:16:35 +03:00
Jake Champlin 6b72e08b72
provider/aws: Fix panic on nil dead_letter_config
Fixes a panic where specifying a nil `target_arn` for a `dead_letter_config` inside the `aws_lambda_function` resource would throw a panic.
Now, we return a nice error to the user instead of throwing a panic and stacktrace.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS="-run=TestAccAWSLambdaFunction_nilDeadLetterConfig"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/31 10:22:26 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSLambdaFunction_nilDeadLetterConfig -timeout 120m
=== RUN   TestAccAWSLambdaFunction_nilDeadLetterConfig
--- PASS: TestAccAWSLambdaFunction_nilDeadLetterConfig (20.86s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    20.884s
```
2017-05-31 10:26:13 -04:00
Jake Champlin 647a3940ea Merge pull request #13702 from bryanburgers/aws-instance-ipv6
provider/aws: Allow IPv6/IPv4 addresses to coexist
2017-05-31 10:11:39 -04:00
Paul Stack e28f9c11bf provider/aws: aws_elasticache_cluster data source (#14895)
* provider/aws: Add data source for aws_elasticache_cluster

Fixes: #11445

* provider/aws: Add acceptance tests for aws_elasticache_cluster data source

* provider/aws: Add documentation for the aws_elasticache_cluster datasource
2017-05-31 16:25:27 +03:00
Radek Simko b802897cea provider/aws: Avoid crash when EgressOnly IGW disappears (#14929) 2017-05-30 20:40:54 +01:00
Radek Simko 832b7bd456 provider/aws: Randomize IAM role names in flow log tests (#14928) 2017-05-30 16:23:21 +01:00
Radek Simko efd1e1ffb3 provider/aws: Run Configure as part of testAccPreCheck (#14925) 2017-05-30 16:22:56 +01:00
Paul Stack 0f7de130b1 provider/aws: ForceNew aws_launch_config on ebs_block_device change (#14899)
Fixes: #14826

aws_launch_configuration ebs_block_device only had selected properties in the set hash. I removed these to allow any changes to the block device config to force a new resource

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSLaunchConfiguration_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/29 01:08:55 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSLaunchConfiguration_ -timeout 120m
=== RUN   TestAccAWSLaunchConfiguration_importBasic
--- PASS: TestAccAWSLaunchConfiguration_importBasic (32.89s)
=== RUN   TestAccAWSLaunchConfiguration_basic
--- PASS: TestAccAWSLaunchConfiguration_basic (44.34s)
=== RUN   TestAccAWSLaunchConfiguration_withBlockDevices
--- PASS: TestAccAWSLaunchConfiguration_withBlockDevices (28.98s)
=== RUN   TestAccAWSLaunchConfiguration_updateRootBlockDevice
--- PASS: TestAccAWSLaunchConfiguration_updateRootBlockDevice (52.23s)
=== RUN   TestAccAWSLaunchConfiguration_withSpotPrice
--- PASS: TestAccAWSLaunchConfiguration_withSpotPrice (23.04s)
=== RUN   TestAccAWSLaunchConfiguration_withVpcClassicLink
--- PASS: TestAccAWSLaunchConfiguration_withVpcClassicLink (62.30s)
=== RUN   TestAccAWSLaunchConfiguration_withIAMProfile
--- PASS: TestAccAWSLaunchConfiguration_withIAMProfile (51.62s)
=== RUN   TestAccAWSLaunchConfiguration_withEncryption
--- PASS: TestAccAWSLaunchConfiguration_withEncryption (27.91s)
=== RUN   TestAccAWSLaunchConfiguration_updateEbsBlockDevices
--- PASS: TestAccAWSLaunchConfiguration_updateEbsBlockDevices (62.98s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	386.308s
```
2017-05-30 01:16:43 +03:00
Nick Johnstone ab7cbb1cf9 Fix typo in validators.go (#14900)
s/conatains/contains
2017-05-29 06:07:44 +01:00
Jeff Theriault 07f89e2728 Export RDS instance and cluster resource id (#14882) 2017-05-28 06:47:55 +01:00
Paul Stack be58c809b6 provider/aws: Add support for X-Ray tracing to aws_lambda_function (#14728)
Fixes: #13801
2017-05-24 11:37:04 +01:00
Paul Stack 88d9254661 provider/aws: Add ability to define timeouts for DMS replication instance (#14729)
Fixes: #13996
2017-05-23 19:31:26 +01:00
Paul Stack cb5b5c034e provider/aws: Provider ability to enable snapshotting on ElastiCache RG (#14757)
Fixes: #10581

When a cluster was originally created, you could not enable snapshotting
on it. An error message like this was found:

```
* aws_elasticache_replication_group.bar: Error updating Elasticache replication group: InvalidParameterCombination: Must specify both SnapshotRetentionLimit and SnapshottingClusterId to turn on snapshots
    status code: 400, request id: 98d2ea4e-3fb1-11e7-b077-5967719aeab4
```

There is no guidance from AWS on which is the preferred Cluster in the RG to use for snapshotting. Therefore, I decided to set it to be the first cluster. We can now enable snapshotting

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_enableSnapshotting'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/23 15:02:21 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSElasticacheReplicationGroup_enableSnapshotting -timeout 120m
=== RUN   TestAccAWSElasticacheReplicationGroup_enableSnapshotting
--- PASS: TestAccAWSElasticacheReplicationGroup_enableSnapshotting (1261.47s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	1261.496s
```
2017-05-23 19:30:34 +01:00
Techbrunch 170533c026 Fixes #14765 Handle migration when restoring db cluster from snapshot (#14766)
Add `migrating` to the list of pending statuses when creating a cluster from a snapshot using a different engine.
2017-05-23 18:48:15 +01:00
Jake Champlin 722436a880 Merge pull request #14727 from hashicorp/b-fix-instance-panic
provider/aws: Fix panic on instance shutdown
2017-05-22 09:53:04 -04:00