Skip to content

Commit

Permalink
Merge pull request #1415 from stack72/b-aws-rdscluster-set-engine-15803
Browse files Browse the repository at this point in the history
resource/aws_rds_cluster: Allow setting of rds cluster engine
  • Loading branch information
Ninir authored Aug 15, 2017
2 parents 2137b50 + b342880 commit e280538
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions aws/resource_aws_rds_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ func resourceAwsRDSCluster() *schema.Resource {

"engine": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Default: "aurora",
},

"storage_encrypted": {
Expand Down Expand Up @@ -274,7 +275,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error
opts := rds.RestoreDBClusterFromSnapshotInput{
DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)),
SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)),
Engine: aws.String("aurora"),
Engine: aws.String(d.Get("engine").(string)),
Tags: tags,
}

Expand Down Expand Up @@ -352,7 +353,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error
} else if _, ok := d.GetOk("replication_source_identifier"); ok {
createOpts := &rds.CreateDBClusterInput{
DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)),
Engine: aws.String("aurora"),
Engine: aws.String(d.Get("engine").(string)),
StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)),
ReplicationSourceIdentifier: aws.String(d.Get("replication_source_identifier").(string)),
Tags: tags,
Expand Down Expand Up @@ -414,7 +415,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error

createOpts := &rds.CreateDBClusterInput{
DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)),
Engine: aws.String("aurora"),
Engine: aws.String(d.Get("engine").(string)),
MasterUserPassword: aws.String(d.Get("master_password").(string)),
MasterUsername: aws.String(d.Get("master_username").(string)),
StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)),
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/rds_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Default: A 30-minute window selected at random from an 8-hour block of time per
* `kms_key_id` - (Optional) The ARN for the KMS encryption key. When specifying `kms_key_id`, `storage_encrypted` needs to be set to true.
* `iam_roles` - (Optional) A List of ARNs for the IAM roles to associate to the RDS Cluster.
* `iam_database_authentication_enabled` - (Optional) Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled.
* `engine` - (Optional) The name of the database engine to be used for this DB cluster. Defaults to `aurora`.


## Attributes Reference
Expand Down

0 comments on commit e280538

Please sign in to comment.