diff --git a/builtin/providers/aws/resource_aws_route53_health_check.go b/builtin/providers/aws/resource_aws_route53_health_check.go index b9db3050f..4034996a9 100644 --- a/builtin/providers/aws/resource_aws_route53_health_check.go +++ b/builtin/providers/aws/resource_aws_route53_health_check.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strings" "time" "github.com/hashicorp/terraform/helper/schema" @@ -24,6 +25,9 @@ func resourceAwsRoute53HealthCheck() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + StateFunc: func(val interface{}) string { + return strings.ToUpper(val.(string)) + }, }, "failure_threshold": &schema.Schema{ Type: schema.TypeInt, diff --git a/builtin/providers/aws/resource_aws_route53_health_check_test.go b/builtin/providers/aws/resource_aws_route53_health_check_test.go index c3f81de6a..3e27bc102 100644 --- a/builtin/providers/aws/resource_aws_route53_health_check_test.go +++ b/builtin/providers/aws/resource_aws_route53_health_check_test.go @@ -41,19 +41,19 @@ func TestAccAWSRoute53HealthCheck_basic(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withChildHealthChecks(t *testing.T) { - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckRoute53HealthCheckDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccRoute53HealthCheckConfig_withChildHealthChecks, - Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists("aws_route53_health_check.foo"), - ), - }, - }, - }) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRoute53HealthCheckDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRoute53HealthCheckConfig_withChildHealthChecks, + Check: resource.ComposeTestCheckFunc( + testAccCheckRoute53HealthCheckExists("aws_route53_health_check.foo"), + ), + }, + }, + }) } func TestAccAWSRoute53HealthCheck_IpConfig(t *testing.T) {