-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
data-source/aws_lb_listener: Add missing attributes from resource #6830
Conversation
… default_action attribute
Previously, the data source would silently fail setting "default_action" attributes. ``` --- FAIL: TestAccDataSourceAWSLBListener_basic (194.84s) testing.go:538: Step 0 error: Check failed: 6 errors occurred: * Check 3/14 error: data.aws_lb_listener.front_end: Attribute 'default_action.0.target_group_arn' expected to be set * Check 6/14 error: data.aws_lb_listener.front_end: Attribute 'default_action.#' not found * Check 7/14 error: data.aws_lb_listener.front_end: Attribute 'default_action.0.type' not found * Check 10/14 error: data.aws_lb_listener.from_lb_and_port: Attribute 'default_action.0.target_group_arn' expected to be set * Check 13/14 error: data.aws_lb_listener.from_lb_and_port: Attribute 'default_action.#' not found * Check 14/14 error: data.aws_lb_listener.from_lb_and_port: Attribute 'default_action.0.type' not found ``` With error handling enabled in the resource, we now receive proper errors to catch this problem: ``` --- FAIL: TestAccDataSourceAWSLBListener_basic (173.14s) testing.go:538: Step 0 error: Error applying: 2 errors occurred: * data.aws_lb_listener.from_lb_and_port: data.aws_lb_listener.from_lb_and_port: error setting default_action: Invalid address to set: []string{"default_action", "0", "order"} * data.aws_lb_listener.front_end: data.aws_lb_listener.front_end: error setting default_action: Invalid address to set: []string{"default_action", "0", "order"} ``` After adding the attributes to the data source and the error handling, all existing acceptance testing is now passing: ``` --- PASS: TestAccAWSLBListener_oidc (201.60s) --- PASS: TestAccAWSLBListener_fixedResponse (212.49s) --- PASS: TestAccAWSLBListener_BackwardsCompatibility (212.58s) --- PASS: TestAccDataSourceAWSLBListener_basic (213.95s) --- PASS: TestAccAWSLBListener_redirect (223.34s) --- PASS: TestAccAWSLBListener_basic (223.43s) --- PASS: TestAccAWSLBListener_DefaultAction_Order (224.11s) --- PASS: TestAccDataSourceAWSLBListener_https (225.09s) --- PASS: TestAccDataSourceAWSLBListener_BackwardsCompatibility (225.14s) --- PASS: TestAccAWSLBListener_https (235.40s) --- PASS: TestAccAWSLBListener_cognito (234.78s) --- PASS: TestAccAWSLBListener_DefaultAction_Order_Recreates (255.74s) ```
…s compatibility test names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you be setting these on read? I should read.
This has been released in version 1.52.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Another pull request in the series to reduce flakey/failing tests before our next major version development.
Previously, the data source would silently fail setting "default_action" attributes.
With error handling enabled in the resource, we now receive proper errors to catch this problem:
After adding the attributes to the data source and the error handling, all existing acceptance testing is now passing: