Commit Graph

3819 Commits

Author SHA1 Message Date
Gauthier Wallet 42557dae12 provider/aws: Added API Gateway integration update (#13249) 2017-03-31 19:45:06 +03:00
Paul Stack 74c0353231 provider/aws: Wait for aws_opsworks_instance to be running when it's specified (#13218)
Fixes: #9959

When we specify that we want an opsworks_instance state of running, we
should wait for that the be the case. This will then allow us to use the
Computed values (e.g. private_ip) etc and allow us to use provisioners
as part of the terraform config

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksInstance'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/30 20:55:21 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksInstance -timeout 120m
=== RUN   TestAccAWSOpsworksInstance_importBasic
--- PASS: TestAccAWSOpsworksInstance_importBasic (72.28s)
=== RUN   TestAccAWSOpsworksInstance
--- PASS: TestAccAWSOpsworksInstance (110.17s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	182.479s
```
2017-03-31 14:45:45 +03:00
Paul Stack d06db23197 provider/aws: Set aws_vpn_connection to recreate when in deleted state (#13204)
Fixes: #12440

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVpnConnection_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/30 16:16:13 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpnConnection_ -timeout 120m
=== RUN   TestAccAWSVpnConnection_importBasic
--- PASS: TestAccAWSVpnConnection_importBasic (208.68s)
=== RUN   TestAccAWSVpnConnection_basic
--- PASS: TestAccAWSVpnConnection_basic (391.02s)
=== RUN   TestAccAWSVpnConnection_withoutStaticRoutes
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (316.99s)
=== RUN   TestAccAWSVpnConnection_disappears
--- PASS: TestAccAWSVpnConnection_disappears (202.84s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	1119.563s
```
2017-03-31 14:40:37 +03:00
Paul Stack 46a5cd543c provider/aws: Refresh aws_alb_target_group tags (#13200)
Fixes: #8847

We actually didn't get the list of tags from the API, therefore, any
manual changes were not actually showing up in subsequent plans

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSALBTargetGroup_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/30 15:45:53 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSALBTargetGroup_basic -timeout 120m
=== RUN   TestAccAWSALBTargetGroup_basic
--- PASS: TestAccAWSALBTargetGroup_basic (62.76s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	62.787s
```
2017-03-31 14:36:15 +03:00
Paul Stack e4e9d1e073 provider/aws: Preserve default retain_on_delete in cloudfront import (#13209)
Fixes: #10969
2017-03-31 14:34:51 +03:00
Paul Stack 293922e5ae provider/aws: Refresh aws_alb_target_group stickiness on manual updates (#13199)
Fixes: #13167

When changes to the target group were made via CLI or AWS Console, they
were not being picked up by terraform. This is because we were not
catching an error setting the `stickiness` parameters:

```
Error refreshing state: 1 error(s) occurred:

* aws_alb_target_group.test: aws_alb_target_group.test: stickiness.0.enabled: '' expected type 'bool', got unconvertible type 'string'
```

This meant that changes were not picked up in the following plan. The changes mean the following now:

```
~ aws_alb_target_group.test
    stickiness.0.cookie_duration: "10440" => "10000"
    stickiness.0.enabled:         "false" => "true"

Plan: 0 to add, 1 to change, 0 to destroy.
```
2017-03-31 14:28:56 +03:00
Radek Simko 829649f44c provider/aws: Add support for Lightsail Static IP Attachment (#13207) 2017-03-31 07:30:25 +01:00
Paul Stack 7fce65d427 provider/aws: Add DiffSuppression to aws_ecs_service placement_strategies (#13220)
Fixes: #13216

Prior to Terraform 0.9.2, we always set placement_strategies to
lowercase. Therefore, people using it in Terraform 0.9.2 are getting
continual diffs:

```
-/+ aws_ecs_service.mongo
    cluster:                             "arn:aws:ecs:us-west-2:187416307283:cluster/terraformecstest1" => "arn:aws:ecs:us-west-2:187416307283:cluster/terraformecstest1"
    deployment_maximum_percent:          "200" => "200"
    deployment_minimum_healthy_percent:  "100" => "100"
    desired_count:                       "1" => "1"
    name:                                "mongodb" => "mongodb"
    placement_strategy.#:                "1" => "1"
    placement_strategy.1676812570.field: "instanceid" => "" (forces new resource)
    placement_strategy.1676812570.type:  "spread" => "" (forces new resource)
    placement_strategy.3946258308.field: "" => "instanceId" (forces new resource)
    placement_strategy.3946258308.type:  "" => "spread" (forces new resource)
    task_definition:                     "arn:aws:ecs:us-west-2:187416307283:task-definition/mongodb:1991" => "arn:aws:ecs:us-west-2:187416307283:task-definition/mongodb:1991"

Plan: 1 to add, 0 to change, 1 to destroy.
```

This adds a DiffSuppression func to make sure this doesn't trigger a
ForceNew resource:

```
% terraform plan                                                                                                                           ✹ ✭
[WARN] /Users/stacko/Code/go/bin/terraform-provider-aws overrides an internal plugin for aws-provider.
  If you did not expect to see this message you will need to remove the old plugin.
  See https://www.terraform.io/docs/internals/internal-plugins.html
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_ecs_cluster.default: Refreshing state... (ID: arn:aws:e...ecstest1)
aws_ecs_task_definition.mongo: Refreshing state... (ID: mongodb)
aws_ecs_service.mongo: Refreshing state... (ID: arn:aws:e.../mongodb)
No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, Terraform
doesn't need to do anything.
```

```

```
2017-03-30 23:42:16 +03:00
Jake Champlin 0f7b43ad75 Merge pull request #13213 from mathematician/aws-iam-role-data-source
Added data source aws_iam_role
2017-03-30 12:36:08 -04:00
mathematician fc4cec3c40 Create AWS IAM Role data source, acceptance tests, documentation, and website link 2017-03-30 11:09:11 -05:00
Radek Simko 7d8a6f8533 provider/aws: Add support for aws_lightsail_static_ip (#13175) 2017-03-30 14:59:28 +01:00
Paul Stack 9ed8bb2498 provider/aws: Support the ability to enable / disable ipv6 support in (#12527)
VPC

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVpc_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/28 15:49:20 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpc_ -timeout 120m
=== RUN   TestAccAWSVpc_importBasic
--- PASS: TestAccAWSVpc_importBasic (102.01s)
=== RUN   TestAccAWSVpc_basic
--- PASS: TestAccAWSVpc_basic (63.75s)
=== RUN   TestAccAWSVpc_enableIpv6
--- PASS: TestAccAWSVpc_enableIpv6 (231.41s)
=== RUN   TestAccAWSVpc_dedicatedTenancy
--- PASS: TestAccAWSVpc_dedicatedTenancy (66.65s)
=== RUN   TestAccAWSVpc_tags
--- PASS: TestAccAWSVpc_tags (130.26s)
=== RUN   TestAccAWSVpc_update
--- PASS: TestAccAWSVpc_update (120.21s)
=== RUN   TestAccAWSVpc_bothDnsOptionsSet
--- PASS: TestAccAWSVpc_bothDnsOptionsSet (50.10s)
=== RUN   TestAccAWSVpc_DisabledDnsSupport
--- PASS: TestAccAWSVpc_DisabledDnsSupport (67.47s)
=== RUN   TestAccAWSVpc_classiclinkOptionSet
--- PASS: TestAccAWSVpc_classiclinkOptionSet (64.57s)
PASS
ok	github.com/hashicorp/terraform/builtin/providers/aws	896.464s
```
2017-03-30 16:20:42 +03:00
Ian Morgan 1dca12201a fix error message in route53 data source (#13174) 2017-03-30 11:12:15 +03:00
Paul Hinze 43242bbeae Merge pull request #13140 from hashicorp/b-rds-snapshot-restore-db-name
provider/aws: Don't set DBName on `aws_db_instance` from snapshot
2017-03-29 14:17:32 -05:00
Radek Simko dc5b1d936b provider/aws: Increase timeouts for ELB (#13161) 2017-03-29 18:10:38 +01:00
Radek Simko 75979afcb7 provider/aws: Fix ES Domain acceptance tests (#13160) 2017-03-29 18:07:11 +01:00
Radek Simko 261f5f8a76 provider/aws: Increase timeout for AMI registration (#13159) 2017-03-29 18:06:17 +01:00
Radek Simko 5db819d852 provider/aws: Mark password fields as sensitive (#13147) 2017-03-29 11:15:22 +01:00
Paul Stack f44f0d8c86 provider/aws: Add Support for maintenance_window and back_window to rds_cluster_instance (#13134)
* provider/aws: Add Support for maintenance_window and back_window to rds_cluster_instance

Fixes: #9489

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRDSClusterInstance_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/28 23:08:45 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRDSClusterInstance_basic -timeout 120m
=== RUN   TestAccAWSRDSClusterInstance_basic
--- PASS: TestAccAWSRDSClusterInstance_basic (1433.41s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	1433.438s
```

* Update rds_cluster_instance.html.markdown

* Update rds_cluster_instance.html.markdown
2017-03-29 12:44:44 +03:00
Paul Stack bee2791286 provider/aws: Make alb_target_group_attachment port optional (#13139)
Fixes: #9460

```
% TF_LOG=1 make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSALBTargetGroupAttachment_' 2>~/tf.log
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSALBTargetGroupAttachment_ -timeout 120m
=== RUN   TestAccAWSALBTargetGroupAttachment_basic
--- PASS: TestAccAWSALBTargetGroupAttachment_basic (267.66s)
=== RUN   TestAccAWSALBTargetGroupAttachment_withoutPort
--- PASS: TestAccAWSALBTargetGroupAttachment_withoutPort (147.89s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	415.589s
```
2017-03-29 12:43:23 +03:00
Paul Hinze 4619897f92
provider/aws: Don't set DBName on `aws_db_instance` from snapshot
It turns out if you're trying to write a config to conditionally restore
an instance from a snapshot, you end up painted into a corner with the
combination of `snapshot_identifier` and `name`.

You need `name` to be specified for DBs you're creating, but when
`snapshot_identifier` is populated you need it to be blank or else the
AWS API throws an error.

The logical next step is to drop a ternary in:

```tf
resource "aws_db_instance" "foo" {
 # ...
 snapshot_identifier = "${var.snap}"
 name = "${var.snap != "" ? "" : var.dbname}"
}
```

**BUT** the above config will _replace_ the DB on subsequent runs as the
config basically has `name = ""` which will trigger a ForceNew diff once
the `name` is populated from the snapshot restore.

**SO** we can get a workable solution by actively avoiding populating
DBName when we're using one of the engines the docs explicitly mention.

It does not look like there are any tests covering `snapshot_identifer`,
so I'll subject this to some manual tests and follow up with some
results.
2017-03-28 17:10:34 -05:00
Matthew Frahry d20783d2e5 Merge pull request #13135 from hashicorp/p-aws-randomize-test-names
P aws randomize test names
2017-03-28 15:45:05 -06:00
= 5662b7e60f add randomness to gateway and efs file system tests 2017-03-28 15:07:13 -06:00
= da7ef1bb76 added randomness to elastic beanstalk environment tests 2017-03-28 15:06:56 -06:00
= 52390473e2 Add randomness to roles for dms replication 2017-03-28 15:06:30 -06:00
Paul Stack dcbfaabb95 provider/aws: Deprecate roles in favour of role in iam_instance_profile (#13130)
* provider/aws: Deprecate roles in favour of role in iam_instance_profile

You can only specify a single role to an IAM Instance Profile. So having
a slice of roles in the provider makes no sense. Therefore, we are going
to deprecate this infavour of `role`

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSIAMInstanceProfile_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/28 21:24:20 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSIAMInstanceProfile_ -timeout 120m
=== RUN   TestAccAWSIAMInstanceProfile_importBasic
--- PASS: TestAccAWSIAMInstanceProfile_importBasic (25.08s)
=== RUN   TestAccAWSIAMInstanceProfile_basic
--- PASS: TestAccAWSIAMInstanceProfile_basic (22.40s)
=== RUN   TestAccAWSIAMInstanceProfile_withRoleNotRoles
--- PASS: TestAccAWSIAMInstanceProfile_withRoleNotRoles (22.63s)
=== RUN   TestAccAWSIAMInstanceProfile_missingRoleThrowsError
--- PASS: TestAccAWSIAMInstanceProfile_missingRoleThrowsError (4.02s)
=== RUN   TestAccAWSIAMInstanceProfile_namePrefix
--- PASS: TestAccAWSIAMInstanceProfile_namePrefix (22.18s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	96.349s
```

* Update iam_instance_profile.html.markdown
2017-03-28 22:07:50 +03:00
stack72 6ab1b8ad83 provider/aws: Change of alb_listener_rule listener_arn forces new resource
Fixes: #13006

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSALBListenerRule_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/28 18:16:04 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSALBListenerRule_ -timeout 120m
=== RUN   TestAccAWSALBListenerRule_basic
--- PASS: TestAccAWSALBListenerRule_basic (303.34s)
=== RUN   TestAccAWSALBListenerRule_updateRulePriority
--- PASS: TestAccAWSALBListenerRule_updateRulePriority (319.42s)
=== RUN   TestAccAWSALBListenerRule_changeListenerRuleArnForcesNew
--- PASS: TestAccAWSALBListenerRule_changeListenerRuleArnForcesNew (281.93s)
=== RUN   TestAccAWSALBListenerRule_multipleConditionThrowsError
--- PASS: TestAccAWSALBListenerRule_multipleConditionThrowsError (0.01s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	904.724s
```
2017-03-28 21:53:02 +03:00
stack72 d588fdd9ba provider/aws: Support of updates to ALB Listener Rule priority
Fixes: #9227

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSALBListenerRule_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/28 18:02:08 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSALBListenerRule_ -timeout 120m
=== RUN   TestAccAWSALBListenerRule_basic
--- PASS: TestAccAWSALBListenerRule_basic (261.41s)
=== RUN   TestAccAWSALBListenerRule_updateRulePriority
--- PASS: TestAccAWSALBListenerRule_updateRulePriority (289.84s)
=== RUN   TestAccAWSALBListenerRule_multipleConditionThrowsError
--- PASS: TestAccAWSALBListenerRule_multipleConditionThrowsError (0.01s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	551.294s
```
2017-03-28 21:53:02 +03:00
Matthew Frahry 8b1df456eb Merge pull request #13101 from hashicorp/p-aws-opsworks-instance
Fixes TestAccAWSOpsworksInstance
2017-03-28 08:39:15 -06:00
Paul Stack 78768e00f2 provider/aws: Add support to set iam_role_arn on cloudformation Stack (#12547)
Fixes: #11266

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudFormation_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/09 01:39:16 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudFormation_basic -timeout 120m
=== RUN   TestAccAWSCloudFormation_basic
--- PASS: TestAccAWSCloudFormation_basic (89.38s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	89.416s
```
2017-03-28 15:54:28 +03:00
Clint dd25334b46 provider/aws: Add failing test for OpsWorks endpoints (#13024)
Fix an issue when upgrading from Terraform < 0.9 to 0.9+, when we added
support for the regional endpoints in OpsWorks Stacks. OpsWorks Stacks
can only be managed via the endpoint with which they were created, not
where the stack resides.
2017-03-28 12:29:20 +03:00
= 5ea834d27f Randomize test name 2017-03-27 15:22:58 -06:00
= 63cd65d138 Add randomness to ses receipt rule 2017-03-27 14:26:30 -06:00
= dfb34c85b9 Add randomness to aws ses tests 2017-03-27 14:02:20 -06:00
= ae5903a103 Fixes TestAccAWSOpsworksInstance 2017-03-27 11:25:43 -06:00
Paul Stack 43b74cfe79 provider/aws: Support Import of iam_server_certificate (#13065)
* Adding import to resource_aws_iam_server_certificate.

* provider/aws: Update tests for import of aws_iam_server_certificate

Builds upon the work of @mrcopper in #12940

Resource:
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSIAMServerCertificate_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/25 00:08:48 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSIAMServerCertificate_ -timeout 120m
=== RUN   TestAccAWSIAMServerCertificate_importBasic
--- PASS: TestAccAWSIAMServerCertificate_importBasic (22.81s)
=== RUN   TestAccAWSIAMServerCertificate_basic
--- PASS: TestAccAWSIAMServerCertificate_basic (19.68s)
=== RUN   TestAccAWSIAMServerCertificate_name_prefix
--- PASS: TestAccAWSIAMServerCertificate_name_prefix (19.88s)
=== RUN   TestAccAWSIAMServerCertificate_disappears
--- PASS: TestAccAWSIAMServerCertificate_disappears (13.94s)
=== RUN   TestAccAWSIAMServerCertificate_file
--- PASS: TestAccAWSIAMServerCertificate_file (32.67s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	109.062s
```

Data Source:
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDataSourceIAMServerCertificate_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/25 13:07:10 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDataSourceIAMServerCertificate_ -timeout 120m
=== RUN   TestAccAWSDataSourceIAMServerCertificate_basic
--- PASS: TestAccAWSDataSourceIAMServerCertificate_basic (43.86s)
=== RUN   TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix
--- PASS: TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix (2.68s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	46.569s
```
2017-03-27 18:49:11 +03:00
Doug Neal e7e35b5c07 provider/aws: aws_ses_receipt_rule: fix off-by-one errors (#12961)
In function `resourceAwsSesReceiptRuleRead` the position of the receipt
rules in the rule set was taken directly from the index of the rule's
position in the slice returned by the AWS API call. As the slice is
zero-based and the ruleset is one-based, this results in an incorrect
representation.

This manifests as `aws_ses_receipt_rule` resources always showing a
diff during plan or apply.
2017-03-27 15:56:57 +03:00
Kit Ewbank 08c0ac68e9 Correct handling of network ACL default IPv6 ingress/egress rules. (#12835) 2017-03-27 12:42:49 +03:00
Paul Stack 6b44a1b9ba provider/aws: Only allow 1 value in alb_listener_rule condition (#13051)
Fixes: #12983

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSALBListenerRule_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/24 19:31:26 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSALBListenerRule_ -timeout 120m
=== RUN   TestAccAWSALBListenerRule_basic
--- PASS: TestAccAWSALBListenerRule_basic (247.76s)
=== RUN   TestAccAWSALBListenerRule_multipleConditionThrowsError
--- PASS: TestAccAWSALBListenerRule_multipleConditionThrowsError (0.02s)
PASS
ok	github.com/hashicorp/terraform/builtin/providers/aws	247.815s
```
2017-03-24 19:49:27 +02:00
Paul Stack 48a4b3deaa provider/aws: aws_network_acl_rule treat all and -1 for protocol the (#13049)
same

Fixes: #13012

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSNetworkAclRule_allProtocol'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/24 18:42:05 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSNetworkAclRule_allProtocol -timeout 120m
=== RUN   TestAccAWSNetworkAclRule_allProtocol
--- PASS: TestAccAWSNetworkAclRule_allProtocol (53.95s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	53.974s
```
2017-03-24 19:35:36 +02:00
= 84a9bcde9a Fixes route53 test 2017-03-24 10:22:50 -06:00
Paul Stack 4fe7ee16e6 provider/aws: Migrate the state for AWS VPC after IPv6 changes (#13041)
Fixes: #13035

It was pointed out in the issue that the addition of a new parameter
with a default value AND a ForceNew: true is causing Terraform to try
and recreate the VPC

This PR migrates the state to add the default value of false for `assign_generated_ipv6_cidr_block`

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAWSVpcMigrateState'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/24 12:51:41 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAWSVpcMigrateState -timeout 120m
=== RUN   TestAWSVpcMigrateState
2017/03/24 12:52:26 [INFO] Found AWS VPC State v0; migrating to v1
2017/03/24 12:52:26 [DEBUG] Attributes before migration: map[string]string{"assign_generated_ipv6_cidr_block":"true"}
2017/03/24 12:52:26 [DEBUG] Attributes after migration: map[string]string{"assign_generated_ipv6_cidr_block":"false"}
2017/03/24 12:52:26 [INFO] Found AWS VPC State v0; migrating to v1
2017/03/24 12:52:26 [DEBUG] Attributes before migration: map[string]string{}
2017/03/24 12:52:26 [DEBUG] Attributes after migration: map[string]string{"assign_generated_ipv6_cidr_block":"false"}
--- PASS: TestAWSVpcMigrateState (0.00s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	0.024s
```
2017-03-24 13:02:11 +02:00
Paul Stack 1a80044397 provider/aws: Specify that aws_network_acl_rule requires a cidr block (#13013)
Fixes: #13011

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSNetworkAclRule_'           2 ↵ ✚
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/23 17:45:25 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSNetworkAclRule_ -timeout 120m
=== RUN   TestAccAWSNetworkAclRule_basic
--- PASS: TestAccAWSNetworkAclRule_basic (41.10s)
=== RUN   TestAccAWSNetworkAclRule_missingParam
--- PASS: TestAccAWSNetworkAclRule_missingParam (21.21s)
=== RUN   TestAccAWSNetworkAclRule_ipv6
--- PASS: TestAccAWSNetworkAclRule_ipv6 (53.00s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	115.333s
```
2017-03-23 19:16:56 +02:00
lwilliams-oats 67eeeb368a Fix for #11844. (#12998)
AWS API requires ECS placement strategies "field" attribute to be
"memory" or "cpu" (lowercase) when type=bin, but these read back as
"MEMORY" and "CPU" (uppercase) respectively.

PR #11565 (which fixed separately reported #11644) deals with this by
always lowering the case of the resource received from the API, but this
breaks for other "field" values (e.g. "instanceId" -> "instanceid").

This PR only lowers the case of the returned resource when field
"MEMORY" or "CPU". Haven't checked if any other fields need this
treatment.
2017-03-23 16:10:50 +02:00
Jake Champlin 9f02543db1 Merge pull request #12992 from hashicorp/b-update-iam-role-policy-acctests
provider/aws: Update IAM Role Policy Attachment Acctests
2017-03-23 09:58:46 -04:00
Jake Champlin 3d090b203e provider/aws: Update data_source_route53_zone acctest (#12993)
Updates the `data_source_route53_zone` acceptance test to better handle parallel runs. Also better handles tests that potentially leak resources by adding a random integer suffix to domain names.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRolePolicyAttachment_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/22 20:18:05 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRolePolicyAttachment_basic -timeout 120m
=== RUN   TestAccAWSRolePolicyAttachment_basic
--- PASS: TestAccAWSRolePolicyAttachment_basic (31.94s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    31.949s
```
2017-03-23 09:29:04 -04:00
Jake Champlin 9076e5a010
update test-resource names 2017-03-23 09:27:44 -04:00
Radek Simko 1fb810d1fc provider/aws: Randomize acc tests for Inspector Assesment Tpl (#12990) 2017-03-23 09:30:45 +00:00
Radek Simko 0804c34946 provider/aws: Randomize names in APIGateway method acc tests (#12989) 2017-03-23 09:30:28 +00:00
Radek Simko 202cde6282 provider/aws: Consider ACTIVE as pending state during ECS svc deletion (#12986) 2017-03-23 09:29:15 +00:00