Commit Graph

12 Commits

Author SHA1 Message Date
Paul Stack 4f1ed2287a provider/aws: Fix bug to allow update of maintenance_window in (#11850)
elasticache_replication_group

Fixes: #11832

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/10 13:34:15 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow -timeout 120m
=== RUN   TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow
--- PASS: TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow (1023.52s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	1023.552s
```
2017-02-10 14:04:09 +00:00
Paul Stack cb1acca2be provider/aws: Add snapshotting to the list of pending state for (#10965)
elasticache

Fixes #10964
2017-01-02 20:37:43 +00:00
Paul Stack 38cd7947b6 provider/aws: Fix the validateFunc of aws_elasticache_replication_group (#9918)
Fixes #9895

The replication_group_id should allow length to be max of 20 not 16

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestResourceAWSElastiCacheReplicationGroupIdValidation'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/07 16:17:52 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestResourceAWSElastiCacheReplicationGroupIdValidation -timeout
120m
=== RUN   TestResourceAWSElastiCacheReplicationGroupIdValidation
--- PASS: TestResourceAWSElastiCacheReplicationGroupIdValidation (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws0.032s
```
2016-11-07 21:02:00 +00:00
Krzysztof Wilczynski a078b893d6 Add support for `AutoMinorVersionUpgrade` to aws_elasticache_replication_group resource. (#9657)
This commit adds an ability to modify the `AutoMinorVersionUpgrade` property of the
Replication Group (which is enabled by default) accordingly.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2016-10-28 00:08:14 +01:00
dario-simonetti dbdaf20a19 provider/aws: fix aws_elasticache_replication_group for Redis in cluster mode (#9601)
This is a fix for issue https://github.com/hashicorp/terraform/issues/9596.

Changes:
 - Adds new output attribute `configuration_endpoint_address`. Only
   used in Redis when in cluster mode.
 - Read the `snapshot_window` and `snapshot_retention_limit` from
   the
   replication group description instead of the cache cluster
   description.
 - Adds acceptance test and modifies an existing acceptance test to
   make sure that everything is still good in non-cluster mode
 - Updates docs to describe new output attribute
2016-10-25 23:59:54 +01:00
stack72 520f96e84b
provider/aws: Support Import of AWS elasticache_replication_groups
Fixes #9094

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/30 00:09:04 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSElasticacheReplicationGroup_importBasic -timeout 120m
=== RUN   TestAccAWSElasticacheReplicationGroup_importBasic
--- PASS: TestAccAWSElasticacheReplicationGroup_importBasic (756.38s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws756.398s
```
2016-10-03 16:52:29 +01:00
stack72 2efd93a67e
provider/aws: Modifying the parameter_group_name of
aws_elasticache_replication_group caused a panic

Fixes #9097

The update for `parameter_group_name` was trying to find the incorrect
value to set `cache_parameter_group_name` - this is what was causing the
panic

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_updateParameterGroup'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/28 11:17:30 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSElasticacheReplicationGroup_updateParameterGroup -timeout
120m
=== RUN   TestAccAWSElasticacheReplicationGroup_updateParameterGroup
--- PASS: TestAccAWSElasticacheReplicationGroup_updateParameterGroup
(903.90s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws903.931s
```
2016-09-28 11:48:17 +01:00
Paul Stack eec7b342c8 provider/aws: Support `snapshot_name` for ElastiCache Cluster and (#8419)
Replication Groups

In order to be able to restore a named snapshot as ElastiCache Cluster
or a Replication Group, the `snapshot_name` parameter was needed to be
passed. Changing the `snapshot_name` will force a new resource to be
created

```

```
2016-08-24 10:55:20 +01:00
Paul Stack 83dc4d0535 provider/aws: Add Primary Endpoint Address output for (#8385)
`aws_elasticache_replication_group`

Fixes #8377

Now we can output the endpoint of the primary

```
resource "aws_elasticache_replication_group" "bar" {
    replication_group_id = "tf-11111"
    replication_group_description = "test description"
    node_type = "cache.m1.small"
    number_cache_clusters = 2
    port = 6379
    parameter_group_name = "default.redis2.8"
    apply_immediately = true
}

output "primary_endpoint_address" {
  value = "${aws_elasticache_replication_group.bar.primary_endpoint_address}"
}
```

This gives us:

```
% terraform apply
...................
aws_elasticache_replication_group.bar: Creation complete

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

primary_endpoint_address = tf-11111.d5jx4z.ng.0001.use1.cache.amazonaws.com
```

This was the addition of a computed field only so the basic test still works as expected:

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_basic'                        ✹
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/22 17:11:13 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticacheReplicationGroup_basic -timeout 120m
=== RUN   TestAccAWSElasticacheReplicationGroup_basic
--- PASS: TestAccAWSElasticacheReplicationGroup_basic (741.71s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	741.735s
```
2016-08-23 11:13:26 +01:00
Paul Stack 780ef8b27e provider/aws: `aws_elasticache_replication_group_id` validation change (#8381)
The AWS documentation tells us the following:

```
--replication-group-id (string)

The replication group identifier. This parameter is stored as a
lowercase string.
Constraints:
A name must contain from *1 to 20* alphanumeric characters or hyphens.
The first character must be a letter.
A name cannot end with a hyphen or contain two consecutive hyphens.
```

This is not correct and is causing users errors:

```
* aws_elasticache_replication_group.bar: Error creating Elasticache
* Replication Group: InvalidParameterValue: Replication group id should
* be no more than 16 characters.
    status code: 400, request id:
```

Tuning the Validation from 20 to 16 characters to avoid user issues
2016-08-23 11:05:54 +01:00
Paul Stack 09de4f82ce provider/aws: `aws_elasticache_replication_groups` only support Redis (#8297)
* provider/aws: `aws_elasticache_replication_groups` only support Redis

therefore, making our users add `engine = redis` to the configuration
felt wasted

* Update resource_aws_elasticache_replication_group.go

* Update resource_aws_elasticache_replication_group.go

* Update resource_aws_elasticache_replication_group.go

* Update resource_aws_elasticache_replication_group_test.go

* Update resource_aws_elasticache_replication_group_test.go

* Update resource_aws_elasticache_replication_group.go
2016-08-18 20:30:12 +01:00
Paul Stack 51f216306f provider/aws: Implement the `aws_elasticache_replication_group` resource (#8275) 2016-08-18 19:42:29 +01:00