-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
#396 fix vpn connection tunnel output sorting #10584
Conversation
This does not fix the problem. You simply sorted the test xml blob yourself. |
no! i just removed the senseless sorting of an correct xml wich is the root-problem. the original list is perfectly sorted. https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeVpnConnectionsOutput |
For the case the order of tunnels in the XML does not match the order of Do you agree? |
Checked that again..
I fucked up copying the custom builds around.. Sry My version applied: tunnel1_address = "52.58.153.17"
tunnel1_bgp_asn = "65500"
tunnel1_bgp_holdtime = 30
tunnel1_cgw_inside_address = "169.254.128.230"
tunnel1_inside_cidr = "169.254.128.228/30"
tunnel1_preshared_key = (sensitive value)
tunnel1_vgw_inside_address = "169.254.128.229"
tunnel2_address = "18.185.134.28"
tunnel2_bgp_asn = "65500"
tunnel2_bgp_holdtime = 30
tunnel2_cgw_inside_address = "169.254.128.226"
tunnel2_inside_cidr = "169.254.128.224/30"
tunnel2_preshared_key = (sensitive value)
tunnel2_vgw_inside_address = "169.254.128.225" Your version applied: tunnel1_address = "18.185.134.28"
tunnel1_bgp_asn = "65500"
tunnel1_bgp_holdtime = 30
tunnel1_cgw_inside_address = "169.254.128.226"
tunnel1_inside_cidr = "169.254.128.228/30"
tunnel1_preshared_key = (sensitive value)
tunnel1_vgw_inside_address = "169.254.128.225"
tunnel2_address = "52.58.153.17"
tunnel2_bgp_asn = "65500"
tunnel2_bgp_holdtime = 30
tunnel2_cgw_inside_address = "169.254.128.230"
tunnel2_inside_cidr = "169.254.128.224/30"
tunnel2_preshared_key = (sensitive value)
tunnel2_vgw_inside_address = "169.254.128.229" As you can see the CIDR notations are mixed up. |
hi @n3ph , i think you are facing another issue than me. My issue is just the wrong order of the tunnels itself. it is hard to debug for the operators at the client-side if they are wrong ordered. f.e. the results of the following command should be in the same order as the provided connection-parameter vom resource-output or statefile. aws ec2 describe-vpn-connections --vpn-connection-id <some_connection_idf> --query 'VpnConnections[*].VgwTelemetry[*]' the same for aws console. your issue seems to be much more complex. for me it looks like you are right with the wrong tunnel*_vgw_inside_address, but your solution:
Perhaps your issue should be reported to aws support? |
Marking as a breaking change since removing the existing sorting without accounting for what was in the previous Terraform configuration/state was can cause potential differences with existing Terraform environments. My understanding of this issue is that the EC2 API may not return tunnel results consistently, which was why the sorting was originally added a long while ago. |
you are right. it's an breaking change. but the sorting in the current version doesn't make sense at all. a complext object is sorted without an definition which fields are used and how the sorting of complex strings like ip-networks/addresses are done. so: the sorting was never correct with the line of code. and it's also impossible that this sorting fixed any previous sorting-problem on aws-side. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #396
Release note for CHANGELOG:
Output from acceptance testing: