diff --git a/builtin/providers/aws/resource_aws_route53_health_check.go b/builtin/providers/aws/resource_aws_route53_health_check.go index 16ad47c81..3f4a2ae6f 100644 --- a/builtin/providers/aws/resource_aws_route53_health_check.go +++ b/builtin/providers/aws/resource_aws_route53_health_check.go @@ -59,6 +59,7 @@ func resourceAwsRoute53HealthCheck() *schema.Resource { Type: schema.TypeBool, Optional: true, Default: false, + ForceNew: true, }, "tags": tagsSchema(), }, @@ -133,8 +134,10 @@ func resourceAwsRoute53HealthCheckCreate(d *schema.ResourceData, meta interface{ healthConfig.ResourcePath = aws.String(v.(string)) } - if v, ok := d.GetOk("measure_latency"); ok { - healthConfig.MeasureLatency = aws.Bool(v.(bool)) + if *healthConfig.Type != route53.HealthCheckTypeCalculated { + if v, ok := d.GetOk("measure_latency"); ok { + healthConfig.MeasureLatency = aws.Bool(v.(bool)) + } } input := &route53.CreateHealthCheckInput{ 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 0886b7ba3..f6f837c92 100644 --- a/builtin/providers/aws/resource_aws_route53_health_check_test.go +++ b/builtin/providers/aws/resource_aws_route53_health_check_test.go @@ -20,6 +20,8 @@ func TestAccAWSRoute53HealthCheck_basic(t *testing.T) { Config: testAccRoute53HealthCheckConfig, Check: resource.ComposeTestCheckFunc( testAccCheckRoute53HealthCheckExists("aws_route53_health_check.foo"), + resource.TestCheckResourceAttr( + "aws_route53_health_check.foo", "measure_latency", "true"), ), }, resource.TestStep{