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

tests/resource/aws_network_acl_rule: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate Failures #14567

Closed
1 task
bflad opened this issue Aug 11, 2020 · 2 comments · Fixed by #14918
Assignees
Labels
good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Aug 11, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

We recently upgraded to Terraform Plugin SDK version 2, which uses actual Terraform binaries and command outputs for testing rather than relying on an (aging/divergent) internal Terraform core implementation in the SDK, mostly based on Terraform 0.11 with some shims for 0.12 handling. The shims in the previous version of the acceptance testing framework automatically accepted/consolidated resource addresses of count = 1 to be resource_type.resource_name rather than the more correct resource_type.resource_name.0 in Terraform 0.12 and later, which is now being used and expected. It appears this testing is not accounting for that difference:

=== CONT  TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate
TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate: resource_aws_network_acl_rule_test.go:182: Check 4/4 error: Not found: aws_network_acl_rule.test
--- FAIL: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (36.69s)

To not affect other testing, the fix for this should theoretically be as simple as adding .0 to the end of the resourceName variable:

https://github.com/terraform-providers/terraform-provider-aws/blob/d148d85330ff4cc95700043d8e6947fa71db7f2f/aws/resource_aws_network_acl_rule_test.go#L180

Or more removing the count from the existing configuration and creating a separate test configuration for when there is no IPv6 enabled.

Affected Data Source(s)

  • aws_network_acl_rule

Definition of Done

  • TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate testing passes

References

@bflad bflad added good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Aug 11, 2020
@bflad bflad added this to the Roadmap milestone Aug 11, 2020
@bflad bflad self-assigned this Sep 4, 2020
@bflad bflad modified the milestones: Roadmap, v3.6.0 Sep 10, 2020
@ghost
Copy link

ghost commented Sep 11, 2020

This has been released in version 3.6.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Oct 11, 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 as resolved and limited conversation to collaborators Oct 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
1 participant