Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/aws_lb+aws_elb: Fix regression with undefined 'name' #2939

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Jan 11, 2018

Fixes #2498

This also addresses the following test failure:

=== RUN   TestAccAWSAutoScalingGroup_WithLoadBalancer
--- FAIL: TestAccAWSAutoScalingGroup_WithLoadBalancer (2.67s)
    testing.go:513: Step 0 error: Error planning: 1 error(s) occurred:
        
        * aws_autoscaling_group.bar: 1 error(s) occurred:
        
        * aws_autoscaling_group.bar: Resource 'aws_elb.bar' does not have attribute 'name' for variable 'aws_elb.bar.name'
FAIL

and basically reverts #2314 which was (wrongly) based on the assumption that the new schema behaviour is desired. The upstream regression was already fixed and merged in #2348

Test results

=== RUN   TestAccAWSAutoScalingGroup_WithLoadBalancer
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (526.14s)
=== RUN   TestAccAWSELB_generatesNameForZeroValue
--- PASS: TestAccAWSELB_generatesNameForZeroValue (52.35s)
=== RUN   TestAccAWSLB_generatesNameForZeroValue
--- PASS: TestAccAWSLB_generatesNameForZeroValue (307.74s)

@radeksimko radeksimko added bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. labels Jan 11, 2018
@radeksimko radeksimko changed the title resource/aws_lb+aws_elb: Fix regression with undefined 'name' [WIP] resource/aws_lb+aws_elb: Fix regression with undefined 'name' Jan 11, 2018
@radeksimko radeksimko changed the title [WIP] resource/aws_lb+aws_elb: Fix regression with undefined 'name' resource/aws_lb+aws_elb: Fix regression with undefined 'name' Jan 11, 2018
@radeksimko radeksimko added this to the v1.7.0 milestone Jan 11, 2018
@@ -1231,6 +1231,11 @@ resource "aws_elb" "foo" {
lb_protocol = "http"
}
}

# See https://github.com/terraform-providers/terraform-provider-aws/issues/2498
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to include these outputs in the test configurations? Only other place I see one is: https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_emr_cluster_test.go#L636-L638

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was the intention - to reference it somewhere to make the test fail if someone gets the idea of re-implementing #2314 in the future 😄

@bflad bflad added service/elbv2 Issues and PRs that pertain to the elbv2 service. service/elb Issues and PRs that pertain to the elb service. labels Jan 11, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, verified locally (outputs in test configuration are nitpicks)

 make testacc TEST=./aws TESTARGS='-run=\(TestAccAWSAutoScalingGroup_WithLoadBalancer\|TestAccAWSELB_generatesNameForZeroValue\|TestAccAWSLB_generatesNameForZeroValue\)'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -run=\(TestAccAWSAutoScalingGroup_WithLoadBalancer\|TestAccAWSELB_generatesNameForZeroValue\|TestAccAWSLB_generatesNameForZeroValue\) -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSAutoScalingGroup_WithLoadBalancer
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (342.57s)
=== RUN   TestAccAWSELB_generatesNameForZeroValue
--- PASS: TestAccAWSELB_generatesNameForZeroValue (21.17s)
=== RUN   TestAccAWSLB_generatesNameForZeroValue
--- PASS: TestAccAWSLB_generatesNameForZeroValue (241.53s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	605.316s

@radeksimko radeksimko merged commit b2c14ca into master Jan 11, 2018
@radeksimko radeksimko deleted the b-elb-name-empty branch January 11, 2018 16:52
@bflad
Copy link
Contributor

bflad commented Jan 12, 2018

This has been released in terraform-provider-aws version 1.7.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@tonygyerr
Copy link

Has there been any update on this issue?

@ghost
Copy link

ghost commented Apr 6, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/elb Issues and PRs that pertain to the elb service. service/elbv2 Issues and PRs that pertain to the elbv2 service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_elb does not have attribute "name" when optional parameter not provided
3 participants