hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.34k stars 1.74k forks source link

Port issues with resource google_network_management_connectivity_test #13218

Open msampathkumar opened 1 year ago

msampathkumar commented 1 year ago

Port issues with resource google_network_management_connectivity_test

Issue 1. This is not a functionality or not working issue but, rather related to best practices. The default destination port of google_network_management_connectivity_test, used port zero which is a Reserved port.

Issue 2. The second example shared in Hasicorp docs for google_network_management_connectivity_test is not working. In default network, we have a firewall rule default-allow-internal.

Please check b/261974567

Community Note

Terraform Version

Using Google Cloud Shell

Affected Resource(s)

Terraform Configuration Files

Code samples shared at google_network_management_connectivity_test

Debug Output

Panic Output

Expected Behavior

  1. For newly created vpn network, has no firewall rule to all vm to vm communition (Ex: defaul-allow-internal firewall rule) As a result connectivity test between VM's will be failing.

  2. Connectivity test should be happening at Port 80 not at Port 0

More detail at b/261974567

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

b/321386880

melinath commented 9 months ago

Changing the default would be a breaking change and it's not clear that it's desirable from the product perspective. We are currently considering this a documentation issue regarding improvements to the samples for this resource. The second sample on the docs does work - we run it as part of our nightly tests - but it sounds like there may be a desire to have it better match internet best practices by not using port 0.