Skip to content

Commit

Permalink
service/rds: Address PR #5010 feedback
Browse files Browse the repository at this point in the history
* Note aws_rds_cluster engine_version updates will cause an outage
* Revert aws_rds_cluster source_engine_version ForceNew
* Revert aws_rds_cluster_instance ForceNew
* Remove engine and engine_version from testAccAWSClusterConfig_EngineVersionWithPrimaryInstance
  • Loading branch information
bflad committed Oct 5, 2018
1 parent a45d4a9 commit 10024db
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 23 deletions.
3 changes: 1 addition & 2 deletions aws/resource_aws_rds_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ func resourceAwsRDSCluster() *schema.Resource {
"engine_version": {
Type: schema.TypeString,
Optional: true,
ForceNew: false,
Computed: true,
},

Expand Down Expand Up @@ -231,7 +230,7 @@ func resourceAwsRDSCluster() *schema.Resource {
"source_engine_version": {
Type: schema.TypeString,
Required: true,
ForceNew: false,
ForceNew: true,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_rds_cluster_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func resourceAwsRDSClusterInstance() *schema.Resource {
"engine_version": {
Type: schema.TypeString,
Optional: true,
ForceNew: false,
ForceNew: true,
Computed: true,
},

Expand Down
25 changes: 6 additions & 19 deletions aws/resource_aws_rds_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1557,38 +1557,25 @@ func testAccAWSClusterConfig_EngineVersionWithPrimaryInstance(rInt int, engine,
data "aws_availability_zones" "available" {}
variable "cluster_identifier" {
default = "tf-acc-test-%d"
}
variable "engine" {
default = "%s"
}
variable "engine_version" {
default = "%s"
}
resource "aws_rds_cluster" "test" {
availability_zones = ["${data.aws_availability_zones.available.names}"]
cluster_identifier = "${var.cluster_identifier}"
cluster_identifier = "tf-acc-test-%d"
database_name = "mydb"
db_cluster_parameter_group_name = "default.aurora-postgresql9.6"
engine = "${var.engine}"
engine_version = "${var.engine_version}"
engine = %q
engine_version = %q
master_password = "mustbeeightcharaters"
master_username = "foo"
skip_final_snapshot = true
apply_immediately = true
}
resource "aws_rds_cluster_instance" "test" {
identifier = "${var.cluster_identifier}"
identifier = "tf-acc-test-%d"
cluster_identifier = "${aws_rds_cluster.test.cluster_identifier}"
engine = "${var.engine}"
engine_version = "${var.engine_version}"
engine = "${aws_rds_cluster.test.engine}"
instance_class = "db.r4.large"
}`, rInt, engine, engineVersion)
}`, rInt, engine, engineVersion, rInt)
}

func testAccAWSClusterConfig_Port(rInt, port int) string {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/rds_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Default: A 30-minute window selected at random from an 8-hour block of time per
* `iam_database_authentication_enabled` - (Optional) Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. Please see [AWS Documentation][6] for availability and limitations.
* `engine` - (Optional) The name of the database engine to be used for this DB cluster. Defaults to `aurora`. Valid Values: `aurora`, `aurora-mysql`, `aurora-postgresql`
* `engine_mode` - (Optional) The database engine mode. Valid values: `parallelquery`, `provisioned`, `serverless`. Defaults to: `provisioned`. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/aurora-serverless.html) for limitations when using `serverless`.
* `engine_version` - (Optional) The database engine version.
* `engine_version` - (Optional) The database engine version. Updating this argument results in an outage.
* `source_region` - (Optional) The source region for an encrypted replica DB cluster.
* `enabled_cloudwatch_logs_exports` - (Optional) List of log types to export to cloudwatch. If omitted, no logs will be exported.
The following log types are supported: `audit`, `error`, `general`, `slowquery`.
Expand Down

0 comments on commit 10024db

Please sign in to comment.