aws_db_instance: Only write lowercase engines to the state file.

Amazon accepts mixed-case engines, but only returns lowercase. Without
the proper StateFunc, every apply of a mixed-case engine will result in
a new db instance. Standardize on lowercase.
This commit is contained in:
Christopher Tiwald 2015-07-16 01:37:21 -04:00
parent 009dba178f
commit dfe0efaf17
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,10 @@ func resourceAwsDbInstance() *schema.Resource {
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Required: true,
ForceNew: true, ForceNew: true,
StateFunc: func(v interface{}) string {
value := v.(string)
return strings.ToLower(value)
},
}, },
"engine_version": &schema.Schema{ "engine_version": &schema.Schema{