Merge pull request #3744 from stack72/f-aws-db-instance

provider/aws: Changing the db_instance resource to mark the engine_version as Optional
This commit is contained in:
Clint 2015-11-10 15:48:06 -06:00
commit 51fd5fafef
3 changed files with 4 additions and 5 deletions

View File

@ -54,7 +54,8 @@ func resourceAwsDbInstance() *schema.Resource {
"engine_version": &schema.Schema{ "engine_version": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Optional: true,
Computed: true,
}, },
"storage_encrypted": &schema.Schema{ "storage_encrypted": &schema.Schema{

View File

@ -31,8 +31,6 @@ func TestAccAWSDBInstance_basic(t *testing.T) {
"aws_db_instance.bar", "allocated_storage", "10"), "aws_db_instance.bar", "allocated_storage", "10"),
resource.TestCheckResourceAttr( resource.TestCheckResourceAttr(
"aws_db_instance.bar", "engine", "mysql"), "aws_db_instance.bar", "engine", "mysql"),
resource.TestCheckResourceAttr(
"aws_db_instance.bar", "engine_version", "5.6.21"),
resource.TestCheckResourceAttr( resource.TestCheckResourceAttr(
"aws_db_instance.bar", "license_model", "general-public-license"), "aws_db_instance.bar", "license_model", "general-public-license"),
resource.TestCheckResourceAttr( resource.TestCheckResourceAttr(
@ -111,7 +109,7 @@ func testAccCheckAWSDBInstanceAttributes(v *rds.DBInstance) resource.TestCheckFu
return fmt.Errorf("bad engine: %#v", *v.Engine) 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) return fmt.Errorf("bad engine_version: %#v", *v.EngineVersion)
} }

View File

@ -36,7 +36,7 @@ The following arguments are supported:
* `allocated_storage` - (Required) The allocated storage in gigabytes. * `allocated_storage` - (Required) The allocated storage in gigabytes.
* `engine` - (Required) The database engine to use. * `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 * `identifier` - (Required) The name of the RDS instance
* `instance_class` - (Required) The instance type of the RDS instance. * `instance_class` - (Required) The instance type of the RDS instance.
* `storage_type` - (Optional) One of "standard" (magnetic), "gp2" (general * `storage_type` - (Optional) One of "standard" (magnetic), "gp2" (general