@@ -167,6 +167,22 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) {
167167 })
168168}
169169
170+ func TestAccAWSDBParameterGroup_caseWithMixedParameters (t * testing.T ) {
171+ groupName := fmt .Sprintf ("parameter-group-test-terraform-%d" , acctest .RandInt ())
172+
173+ resource .ParallelTest (t , resource.TestCase {
174+ PreCheck : func () { testAccPreCheck (t ) },
175+ Providers : testAccProviders ,
176+ CheckDestroy : testAccCheckAWSDBParameterGroupDestroy ,
177+ Steps : []resource.TestStep {
178+ {
179+ Config : testAccAWSDBParameterGroupConfigCaseWithMixedParameters (groupName ),
180+ Check : resource .ComposeTestCheckFunc (),
181+ },
182+ },
183+ })
184+ }
185+
170186func TestAccAWSDBParameterGroup_limit (t * testing.T ) {
171187 var v rds.DBParameterGroup
172188 resourceName := "aws_db_parameter_group.test"
@@ -288,7 +304,7 @@ func TestAccAWSDBParameterGroup_limit(t *testing.T) {
288304 }),
289305 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
290306 "name" : "event_scheduler" ,
291- "value" : "ON " ,
307+ "value" : "on " ,
292308 }),
293309 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
294310 "name" : "innodb_buffer_pool_dump_at_shutdown" ,
@@ -324,7 +340,7 @@ func TestAccAWSDBParameterGroup_limit(t *testing.T) {
324340 }),
325341 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
326342 "name" : "log_output" ,
327- "value" : "FILE " ,
343+ "value" : "file " ,
328344 }),
329345 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
330346 "name" : "max_allowed_packet" ,
@@ -348,7 +364,7 @@ func TestAccAWSDBParameterGroup_limit(t *testing.T) {
348364 }),
349365 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
350366 "name" : "tx_isolation" ,
351- "value" : "REPEATABLE-READ " ,
367+ "value" : "repeatable-read " ,
352368 }),
353369 ),
354370 },
@@ -467,7 +483,7 @@ func TestAccAWSDBParameterGroup_limit(t *testing.T) {
467483 }),
468484 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
469485 "name" : "event_scheduler" ,
470- "value" : "ON " ,
486+ "value" : "on " ,
471487 }),
472488 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
473489 "name" : "innodb_buffer_pool_dump_at_shutdown" ,
@@ -503,7 +519,7 @@ func TestAccAWSDBParameterGroup_limit(t *testing.T) {
503519 }),
504520 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
505521 "name" : "log_output" ,
506- "value" : "FILE " ,
522+ "value" : "file " ,
507523 }),
508524 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
509525 "name" : "max_allowed_packet" ,
@@ -527,7 +543,7 @@ func TestAccAWSDBParameterGroup_limit(t *testing.T) {
527543 }),
528544 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "parameter.*" , map [string ]string {
529545 "name" : "tx_isolation" ,
530- "value" : "REPEATABLE-READ " ,
546+ "value" : "repeatable-read " ,
531547 }),
532548 ),
533549 },
@@ -916,6 +932,51 @@ resource "aws_db_parameter_group" "test" {
916932` , n )
917933}
918934
935+ func testAccAWSDBParameterGroupConfigCaseWithMixedParameters (n string ) string {
936+ return composeConfig (testAccAWSDBInstanceConfig_orderableClassMysql (), fmt .Sprintf (`
937+ resource "aws_db_parameter_group" "test" {
938+ name = %[1]q
939+ family = "mysql5.6"
940+
941+ parameter {
942+ name = "character_set_server"
943+ value = "utf8mb4"
944+ apply_method = "pending-reboot"
945+ }
946+ parameter {
947+ name = "innodb_large_prefix"
948+ value = 1
949+ apply_method = "pending-reboot"
950+ }
951+ parameter {
952+ name = "innodb_file_format"
953+ value = "Barracuda"
954+ apply_method = "pending-reboot"
955+ }
956+ parameter {
957+ name = "innodb_log_file_size"
958+ value = 2147483648
959+ apply_method = "pending-reboot"
960+ }
961+ parameter {
962+ name = "sql_mode"
963+ value = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
964+ apply_method = "pending-reboot"
965+ }
966+ parameter {
967+ name = "innodb_log_buffer_size"
968+ value = 268435456
969+ apply_method = "pending-reboot"
970+ }
971+ parameter {
972+ name = "max_allowed_packet"
973+ value = 268435456
974+ apply_method = "pending-reboot"
975+ }
976+ }
977+ ` , n ))
978+ }
979+
919980func testAccAWSDBParameterGroupConfigWithApplyMethod (n string ) string {
920981 return fmt .Sprintf (`
921982resource "aws_db_parameter_group" "test" {
0 commit comments