hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.75k stars 9.11k forks source link

[Docs]: aws_ec2_transit_gateway_attachments example usage is using the wrong parameter for aws_ec2_transit_gateway_attachment #35099

Closed chuajiesheng closed 8 months ago

chuajiesheng commented 8 months ago

Documentation Link

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ec2_transit_gateway_attachments

Description

By filter example usage is displaying

data "aws_ec2_transit_gateway_attachment" "unit" {
  count = length(data.aws_ec2_transit_gateway_attachments.filtered.ids)
  id    = data.aws_ec2_transit_gateway_attachments.filtered.ids[count.index]
}

It is supposed to be

data "aws_ec2_transit_gateway_attachment" "unit" {
  count = length(data.aws_ec2_transit_gateway_attachments.filtered.ids)
  transit_gateway_attachment_id    = data.aws_ec2_transit_gateway_attachments.filtered.ids[count.index]
}

References

No response

Would you like to implement a fix?

Yes

github-actions[bot] commented 8 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

McGon-Fid commented 8 months ago

I will work on this and open a PR shortly. Thanks!

johnsonaj commented 8 months ago

closed in #35196

github-actions[bot] commented 7 months ago

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.