Forcing all Route 53 Healthcheck Types to be Uppercase or it would show diffs unnecessarily
This commit is contained in:
parent
3ebbb62bb0
commit
e635878b11
|
@ -3,6 +3,7 @@ package aws
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
|
@ -24,6 +25,9 @@ func resourceAwsRoute53HealthCheck() *schema.Resource {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
|
StateFunc: func(val interface{}) string {
|
||||||
|
return strings.ToUpper(val.(string))
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"failure_threshold": &schema.Schema{
|
"failure_threshold": &schema.Schema{
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
|
|
|
@ -41,19 +41,19 @@ func TestAccAWSRoute53HealthCheck_basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAccAWSRoute53HealthCheck_withChildHealthChecks(t *testing.T) {
|
func TestAccAWSRoute53HealthCheck_withChildHealthChecks(t *testing.T) {
|
||||||
resource.Test(t, resource.TestCase{
|
resource.Test(t, resource.TestCase{
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
PreCheck: func() { testAccPreCheck(t) },
|
||||||
Providers: testAccProviders,
|
Providers: testAccProviders,
|
||||||
CheckDestroy: testAccCheckRoute53HealthCheckDestroy,
|
CheckDestroy: testAccCheckRoute53HealthCheckDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
resource.TestStep{
|
resource.TestStep{
|
||||||
Config: testAccRoute53HealthCheckConfig_withChildHealthChecks,
|
Config: testAccRoute53HealthCheckConfig_withChildHealthChecks,
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccCheckRoute53HealthCheckExists("aws_route53_health_check.foo"),
|
testAccCheckRoute53HealthCheckExists("aws_route53_health_check.foo"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAccAWSRoute53HealthCheck_IpConfig(t *testing.T) {
|
func TestAccAWSRoute53HealthCheck_IpConfig(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue