provider/aws: Lower case DB Instance's maintenance window

Fixes https://github.com/hashicorp/terraform/issues/2719
This commit is contained in:
Clint Shryock 2015-08-24 11:08:19 -05:00
parent d793c6dbff
commit 22e73d7b68
2 changed files with 10 additions and 0 deletions

View File

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

View File

@ -183,6 +183,12 @@ resource "aws_db_instance" "bar" {
password = "barbarbarbar"
username = "foo"
# Maintenance Window is stored in lower case in the API, though not strictly
# documented. Terraform will downcase this to match (as opposed to throw a
# validation error).
maintenance_window = "Fri:09:00-Fri:09:30"
backup_retention_period = 0
parameter_group_name = "default.mysql5.6"