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

data alicloud_cen_transit_router_route_table_associations requires "transit_router_route_table_id" #6154

Closed
jocortems opened this issue May 16, 2023 · 2 comments

Comments

@jocortems
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

1.4.4

Affected Resource(s)

  • data alicloud_cen_transit_router_route_table_associations

Terraform Configuration Files

data "alicloud_cen_transit_router_route_table_associations" "china_transit_router_peering" {
  provider                            = alicloud.china
  count                               = var.cen_instance_id != null ? 1 : 0
  transit_router_attachment_id  = local.china_transit_router_attachment[0]
}

Debug Output

│ Error: Missing required argument

│ on .terraform/modules/interconnect_global_china.cen/main.tf line 65, in data "alicloud_cen_transit_router_route_table_associations" "china_transit_router_peering":
│ 65: data "alicloud_cen_transit_router_route_table_associations" "china_transit_router_peering" {

│ The argument "transit_router_route_table_id" is required, but no definition was found.


│ Error: Unsupported argument

│ on .terraform/modules/interconnect_global_china.cen/main.tf line 68, in data "alicloud_cen_transit_router_route_table_associations" "china_transit_router_peering":
│ 68: transit_router_attachment_id = local.china_transit_router_attachment[0]

│ An argument named "transit_router_attachment_id" is not expected here.

Panic Output

N/A

Expected Behavior

According to the provider documentation, one of transit_router_attachment_id or transit_router_route_table_id is required, but not both - (https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cen_transit_router_route_table_associations). Additionally, according to the API documentation only one argument is required:

When calling the ListTransitRouterRouteTableAssociations interface, at least one of the request parameters TransitRouterRouteTableId and TransitRouterAttachmentId must be entered:

If only the value of the TransitRouterRouteTableId parameter is specified , it means that you want to query the connection information of the network instance associated with the routing table of the enterprise edition forwarding router.
If only the value of the TransitRouterAttachmentId parameter is specified , it means that you want to query the routing table information of the enterprise edition forwarding router that is connected to the network instance to create an associated forwarding relationship.

Actual Behavior

Terraform throws an error if transit_router_route_table_id is not provided and doesn't recognize argument transit_router_attachment_id

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a Data Source as follows:
data "alicloud_cen_transit_router_route_table_associations" "china_transit_router_peering" {
  transit_router_attachment_id  = local.china_transit_router_attachment[0]
}
2. Run terraform Plan
### Important Factoids
N/A

### References
N/A
@xiaozhu36
Copy link
Member

HI @jocortems The PR #6158 has fixed it and please be patient for the next version.

@xiaozhu36
Copy link
Member

Fixed by 1.205.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants