tests/data-source/aws_vpc_dhcp_options: TestAccDataSourceAwsVpcDhcpOptions_Filter Failures #14561
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
Community Note
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 beresource_type.resource_name
rather than the more correctresource_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:To not affect other testing, the fix for this should theoretically be as simple as adding
.0
to the end of theresourceName
variable:https://github.com/terraform-providers/terraform-provider-aws/blob/d148d85330ff4cc95700043d8e6947fa71db7f2f/aws/data_source_aws_vpc_dhcp_options_test.go#L49
Or more preferably removing the count from the existing configuration and creating a separate test configuration for testing multiple matches.
Affected Data Source(s)
Definition of Done
TestAccDataSourceAwsVpcDhcpOptions_Filter
testing passesReferences
The text was updated successfully, but these errors were encountered: