diff --git a/aws/resource_aws_elb.go b/aws/resource_aws_elb.go index 4a776e8d19a..caf28742c20 100644 --- a/aws/resource_aws_elb.go +++ b/aws/resource_aws_elb.go @@ -37,16 +37,6 @@ func resourceAwsElb() *schema.Resource { ForceNew: true, ConflictsWith: []string{"name_prefix"}, ValidateFunc: validateElbName, - // This is to work around an unexpected schema behaviour returning diff - // for an empty field when it has a pre-computed value from previous run - // (e.g. from name_prefix) - // TODO: Revisit after we find the real root cause - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if new == "" { - return true - } - return false - }, }, "name_prefix": &schema.Schema{ Type: schema.TypeString, diff --git a/aws/resource_aws_elb_test.go b/aws/resource_aws_elb_test.go index 4afd2228f70..d6b263f6970 100644 --- a/aws/resource_aws_elb_test.go +++ b/aws/resource_aws_elb_test.go @@ -1231,6 +1231,11 @@ resource "aws_elb" "foo" { lb_protocol = "http" } } + +# See https://github.com/terraform-providers/terraform-provider-aws/issues/2498 +output "lb_name" { + value = "${aws_elb.foo.name}" +} ` const testAccAWSELBConfig_AvailabilityZonesUpdate = ` diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index a60901774ee..f016ac09001 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -54,16 +54,6 @@ func resourceAwsLb() *schema.Resource { ForceNew: true, ConflictsWith: []string{"name_prefix"}, ValidateFunc: validateElbName, - // This is to work around an unexpected schema behaviour returning diff - // for an empty field when it has a pre-computed value from previous run - // (e.g. from name_prefix) - // TODO: Revisit after we find the real root cause - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if new == "" { - return true - } - return false - }, }, "name_prefix": { diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index 18d4e13e30e..6baf7968ae1 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -1218,6 +1218,11 @@ resource "aws_lb" "lb_test" { } } +# See https://github.com/terraform-providers/terraform-provider-aws/issues/2498 +output "lb_name" { + value = "${aws_lb.lb_test.name}" +} + variable "subnets" { default = ["10.0.1.0/24", "10.0.2.0/24"] type = "list"