Open jdeluyck opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
The change from TypeSet
to TypeList
was done in v4.0.0 as part of https://github.com/hashicorp/terraform-provider-aws/pull/21219, but was not documented. This should be corrected.
I think that aws_ec2_transit_gateway_route_table
should be updated so this works when iterating over items from aws_ec2_transit_gateway_route_tables
?
I would say it should be left as a TypeSet
and properly Pass in the full set that the API call returns
https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-transit-gateway-route-tables.html
{
"TransitGatewayRouteTables": [
{
"TransitGatewayRouteTableId": "tgw-rtb-0ca78a549EXAMPLE",
"TransitGatewayId": "tgw-0bc994abffEXAMPLE",
"State": "available",
"DefaultAssociationRouteTable": true,
"DefaultPropagationRouteTable": true,
"CreationTime": "2018-11-28T14:24:49.000Z",
"Tags": []
},
{
"TransitGatewayRouteTableId": "tgw-rtb-0e8f48f148EXAMPLE",
"TransitGatewayId": "tgw-0043d72bb4EXAMPLE",
"State": "available",
"DefaultAssociationRouteTable": true,
"DefaultPropagationRouteTable": true,
"CreationTime": "2018-11-28T14:24:00.000Z",
"Tags": []
}
]
}
If a Set of all matched was passed, there would be no need for multiple data objects
Terraform Core Version
1.3.0
AWS Provider Version
4.30.0
Affected Resource(s)
Expected Behavior
data.aws_ec2_transit_gateway_route_tables.ids should return a set per documentation
If you look at https://github.com/hashicorp/terraform-provider-aws/blob/3c691a0a3f6ae42c95e502fd6dd58270067921fc/internal/service/ec2/outposts_local_gateway_route_tables_data_source.go#L14, it clearly shows it now returns a list. Diffing against older versions is difficult, as the module was renamed.
Actual Behavior
data.aws_ec2_transit_gateway_route_tables.ids returns a list
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Upgrade to a recent aws provider (4.24 already has the issue)
Provider 3.75.2 is fine.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No response