Commit Graph

36 Commits

Author SHA1 Message Date
netjunki 2cfe385653 provider/aws: improve redshift cluster validation (#12313)
* provider/aws: improve redshift cluster validation

* aws/provider: redshift cluster mixed case name should be an invalid name
2017-03-01 23:56:22 +00:00
stack72 9bb678d76c
provider/aws: Only send the Owner Account to Redshift cluster if not
empty
2017-02-20 19:14:13 +02:00
Jeff Klukas 305eaf6968 Add owner_account option to aws_redshift_cluster 2017-02-17 16:40:55 -05:00
Paul Stack da2202277d provider/aws: Enable snapshotting by default on aws_redshift_cluster (#11695)
This extends the work in #11668 to enable final snapshots by default.
This time it's for redshift

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_withFinalSnapshot'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/04 13:53:02 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRedshiftCluster_withFinalSnapshot -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_withFinalSnapshot
--- PASS: TestAccAWSRedshiftCluster_withFinalSnapshot (859.96s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	859.986s
```
2017-02-15 16:37:06 +00:00
Kazuma Watanabe c560c72e58 provider/aws: Validate window time format (#11089)
* create window format validate function

* apply ValidateFunc for window time format
2017-01-09 13:12:07 +00:00
Christian Hildebrando Hercules 63eb0ba870 Increasing timeout for redshift cluster creation
This is in response to creating 25 node cluster, and taking longer than 40 min max.
2017-01-04 13:03:57 -08:00
Daniel del Castillo cbcb313c08 aws_redshift_cluster: Fix typo security groups update (#11025) 2017-01-04 11:19:49 +00:00
Ninir c250c10d4e Force the master username & password to be defined when not in a restore mode 2016-12-04 19:04:26 +01:00
Ninir 5481e9ecb3 provider/aws: Enforced kms_key_* attributes to be ARNs (#10356)
* Added kms_key_* validation to force ARNs

* Added Redshift Cluster KMS key test

* Added cloudtrail kms key test

* Added EBS volume kms key

* Added Elastic Transcoder Pipeline kms key arn test
2016-11-30 13:50:26 +02:00
Anshul Sharma e1919edbb3 Allow underscore in database_name [redshift] (#10019)
* allow underscore in database_name [redshift]

Fixes #10009

* Added Test Cases To Validate Redshift DBName

* Remove Old Test Cases Regarding Redshift DBName Validation

* Added More Test Cases For Redshift DBName
2016-11-11 11:59:00 +02:00
Anshul Sharma e9821eaced Updated Redshift Documentation and Added Test Cases for Redshift Enchaned VPC routing 2016-11-08 18:13:10 +05:30
Anshul Sharma 1030cc1344 Added AWS Redshift Enhanced VPC Routing 2016-11-08 17:36:29 +05:30
Joshua Carp a8e68ab25e Add partition to remaining ARN builders. 2016-10-08 00:52:50 -04:00
stack72 01fca172cb
provider/aws: Removing the merge conflict from the redshift_cluster resource 2016-08-24 20:50:06 +01:00
Paul Stack 3a2d73a2b1 provider/aws: Add support to `aws_redshift_cluster` for restoring from (#8414)
snapshot

Fixes #6406

Adds 2 new parameters:

* `snapshot_identifier`
* `snapshot_cluster_identifier`

These will be used to allow the Redshift cluster to be restored from a
pre-existing snapshot. Also makes the redshift username and password
fields optional as these are not required for the snapshot

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/23 12:04:53 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSRedshiftCluster_ -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_importBasic
--- PASS: TestAccAWSRedshiftCluster_importBasic (741.03s)
=== RUN   TestAccAWSRedshiftCluster_basic
--- PASS: TestAccAWSRedshiftCluster_basic (656.33s)
=== RUN   TestAccAWSRedshiftCluster_loggingEnabled
--- PASS: TestAccAWSRedshiftCluster_loggingEnabled (718.65s)
=== RUN   TestAccAWSRedshiftCluster_iamRoles
--- PASS: TestAccAWSRedshiftCluster_iamRoles (818.10s)
=== RUN   TestAccAWSRedshiftCluster_publiclyAccessible
--- PASS: TestAccAWSRedshiftCluster_publiclyAccessible (853.30s)
=== RUN   TestAccAWSRedshiftCluster_updateNodeCount
--- PASS: TestAccAWSRedshiftCluster_updateNodeCount (2083.37s)
=== RUN   TestAccAWSRedshiftCluster_tags
--- PASS: TestAccAWSRedshiftCluster_tags (621.15s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws
6491.963s
```

When deploying this, I was able to use config as follows:

```
resource "aws_redshift_cluster" "restore" {
  cluster_identifier = "my-test-restored-cluster"
  snapshot_identifier = "sample-snapshot-for-restore"
  node_type = "dc1.large"
}
```

And it resulted in:

```
terraform apply
[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
aws_redshift_cluster.restore: Creating...
  allow_version_upgrade:               "" => "true"
  automated_snapshot_retention_period: "" => "1"
  availability_zone:                   "" => "<computed>"
  bucket_name:                         "" => "<computed>"
  cluster_identifier:                  "" => "my-test-restored-cluster"
  cluster_parameter_group_name:        "" => "<computed>"
  cluster_public_key:                  "" => "<computed>"
  cluster_revision_number:             "" => "<computed>"
  cluster_security_groups.#:           "" => "<computed>"
  cluster_subnet_group_name:           "" => "<computed>"
  cluster_type:                        "" => "<computed>"
  cluster_version:                     "" => "1.0"
  database_name:                       "" => "<computed>"
  enable_logging:                      "" => "false"
  encrypted:                           "" => "<computed>"
  endpoint:                            "" => "<computed>"
  iam_roles.#:                         "" => "<computed>"
  kms_key_id:                          "" => "<computed>"
  node_type:                           "" => "dc1.large"
  number_of_nodes:                     "" => "1"
  port:                                "" => "5439"
  preferred_maintenance_window:        "" => "<computed>"
  publicly_accessible:                 "" => "true"
  s3_key_prefix:                       "" => "<computed>"
  skip_final_snapshot:                 "" => "true"
  snapshot_identifier:                 "" => "sample-snapshot-for-restore"
  vpc_security_group_ids.#:            "" => "<computed>"
..........
aws_redshift_cluster.restore: Still creating... (5m20s elapsed)
aws_redshift_cluster.restore: Creation complete

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
```
2016-08-24 10:58:05 +01:00
Mike Brannigan e281ad6481 Fix error message for master password being too short 2016-08-23 17:40:05 -05:00
Mike Brannigan aad01a665c Add password validation rules for redshift passwords 2016-08-23 17:30:57 -05:00
Dennis Webb 8c10720a22 adding final-snapshot status to resourceAwsRedshiftClusterDelete (#8270) 2016-08-18 15:23:47 +01:00
Alexander Zhukau bd22a4f65a provider/aws: allow numeric characters in RedshiftClusterDbName (#8178) 2016-08-14 21:57:44 +01:00
Paul Stack 3f83f0b9f9 provider/aws: Enable Redshift Cluster Logging (#7813)
Fixes #7423

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_loggingEnabled'
==> 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=TestAccAWSRedshiftCluster_loggingEnabled -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_loggingEnabled
--- PASS: TestAccAWSRedshiftCluster_loggingEnabled (675.21s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    675.233s
```
2016-07-27 22:16:32 +01:00
Paul Stack 8c88038647 provider/aws: `aws_redshift_cluster` `number_of_nodes` was having the (#7771)
wrong value set to state

we used `len(ClusterNodes)` rather than NumberOfNodes :)

This was picked up by the nightly tests! <3
2016-07-22 18:14:30 +01:00
Paul Stack 7879450cf3 provider/aws: Fix the import of `aws_redshift_cluster` breaking (#7677)
`skip_final_snapshot`

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_importBasic'
==> 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=TestAccAWSRedshiftCluster_importBasic -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_importBasic
--- PASS: TestAccAWSRedshiftCluster_importBasic (641.87s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    641.888s
```
2016-07-20 19:38:44 +01:00
stack72 a746b28fc1
provider/aws: Support Import of `aws_redshift_cluster`
```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSRedshiftCluster_importBasic -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_importBasic
--- PASS: TestAccAWSRedshiftCluster_importBasic (623.52s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    623.546s
```
2016-07-07 18:27:13 +01:00
Paul Stack ce4841e6a6 provider/aws: Add support to `aws_redshift_cluster` for ``iam_roles`` (#6647) 2016-05-24 22:44:46 +01:00
Paul Stack 1df8290134 provider/aws: Support tags for AWS redshift cluster (#5356) 2016-05-24 18:43:12 +01:00
Robert Conrad faa6ddb2ee provider/aws: Support for Redshift Cluster encryption using a KMS key (#6712) 2016-05-17 11:12:39 -05:00
Paul Stack dc30bd29fc provider/aws: Redshift Cluster not allowing 0 for (#6537)
automated_snapshot_retention_period

The default value for `automated_snapshot_retention_period` is 1.
Therefore, it can be included in the `CreateClusterInput` without
needing to check that it is set.

This was actually stopping people from setting the value to 0 (disabling
the snapshots) as there is an issue in `d.GetOk()` evaluating 0 for int
2016-05-08 19:29:36 +01:00
Paul Stack 2d2c0b2068 provider/aws: Fix `aws_redshift_cluster` number_of_nodes update (#6333)
Currently, the number of nodes was broken due to not passing the
node_type with the update. This PR adds the correct parameters and a
test to prove this works as expected
2016-04-25 23:00:57 +01:00
Cameron Stokes a7c24835d7 provider/aws: increase timeout for aws_redshift_cluster (#6305)
* provider/aws: increase timeout for aws_redshift_cluster

* provider/aws: increase timeout for redshift updates too
2016-04-22 10:42:22 -05:00
Ethan Gunderson 1c5c58d072 Redshift master usernames may contain underscores 2016-03-30 17:41:58 -05:00
stack72 12ac0761b7 provider/aws: Modify `aws_redshift_cluster` now allows
`publicly_accessible` to be changed

Also updated the AWS Go SDK from 1.1.9 -> 1.1.12 as this was required to
allow the new behavior for the Redshift API
2016-03-19 01:05:09 +05:30
clint shryock 66eb7c6055 provider/aws: Guard against Nil Reference in Redshift Endpoints 2016-03-11 12:16:29 -06:00
stack72 e822d46843 provider/aws: `aws_redshift_cluster` publicly_accessible now defaults to
true
2016-02-22 23:11:55 +00:00
stack72 e6e18a4a9e provider/aws: Change Redshift Cluster cluster_type to be computed
It will be based off the number of nodes. Can only be multi-node (>1
node) or single-node (nodes=1)
2016-02-21 19:42:02 +00:00
Ian Duffy 47ac10d66b Change resource.StateChangeConf to use an array for target states
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-01-21 01:20:41 +00:00
stack72 bf03752552 Adding the documentation for the AWS Redshift Subnet Group resource
also removed the notion of tags from the redshift security group and
parameter group documentation until that has been implemented

Redshift Cluster CRUD and acceptance tests

Removing the Acceptance test for the Cluster Updates. You cannot delete
a cluster immediately after performing an operation on it. We would need
to add a lot of retry logic to the system to get this test to work

Adding some schema validation for RedShift cluster

Adding the last of the pieces of a first draft of the Redshift work - this is the documentation
2015-12-20 20:20:05 +00:00