Skip to content

Commit

Permalink
Merge pull request #3744 from stack72/f-aws-db-instance
Browse files Browse the repository at this point in the history
provider/aws: Changing the db_instance resource to mark the engine_version as Optional
  • Loading branch information
catsby committed Nov 10, 2015
2 parents 8d8c1f9 + 6e21cd7 commit 51fd5fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion builtin/providers/aws/resource_aws_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func resourceAwsDbInstance() *schema.Resource {

"engine_version": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
Computed: true,
},

"storage_encrypted": &schema.Schema{
Expand Down
4 changes: 1 addition & 3 deletions builtin/providers/aws/resource_aws_db_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ func TestAccAWSDBInstance_basic(t *testing.T) {
"aws_db_instance.bar", "allocated_storage", "10"),
resource.TestCheckResourceAttr(
"aws_db_instance.bar", "engine", "mysql"),
resource.TestCheckResourceAttr(
"aws_db_instance.bar", "engine_version", "5.6.21"),
resource.TestCheckResourceAttr(
"aws_db_instance.bar", "license_model", "general-public-license"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -111,7 +109,7 @@ func testAccCheckAWSDBInstanceAttributes(v *rds.DBInstance) resource.TestCheckFu
return fmt.Errorf("bad engine: %#v", *v.Engine)
}

if *v.EngineVersion != "5.6.21" {
if *v.EngineVersion == "" {
return fmt.Errorf("bad engine_version: %#v", *v.EngineVersion)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The following arguments are supported:

* `allocated_storage` - (Required) The allocated storage in gigabytes.
* `engine` - (Required) The database engine to use.
* `engine_version` - (Required) The engine version to use.
* `engine_version` - (Optional) The engine version to use.
* `identifier` - (Required) The name of the RDS instance
* `instance_class` - (Required) The instance type of the RDS instance.
* `storage_type` - (Optional) One of "standard" (magnetic), "gp2" (general
Expand Down

0 comments on commit 51fd5fa

Please sign in to comment.