-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
RouterBgpPeer BFD support #3258
Conversation
This is causing a panic here:
when we read back the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failing:
TestAccComputeRouterPeer_enable
=== RUN TestAccComputeRouterPeer_enable
=== PAUSE TestAccComputeRouterPeer_enable
=== CONT TestAccComputeRouterPeer_enable
--- FAIL: TestAccComputeRouterPeer_enable (272.74s)
testing.go:635: Step 2 error: errors during apply:
Error: Error updating RouterBgpPeer "projects/ci-test-project-188019/regions/us-central1/routers/router-peer-test-bveczl1ojl/router-peer-test-bveczl1ojl": googleapi: Error 400: Invalid value for field '': ''. Bgp Peer Enable field is not supported yet., invalid
on /opt/teamcity-agent/temp/buildTmp/tf-test516292606/main.tf line 78:
(source code not available)
FAIL
TestAccComputeRouterPeer_bfd
=== RUN TestAccComputeRouterPeer_bfd
=== PAUSE TestAccComputeRouterPeer_bfd
=== CONT TestAccComputeRouterPeer_bfd
--- FAIL: TestAccComputeRouterPeer_bfd (273.17s)
testing.go:635: Step 2 error: errors during apply:
Error: Error updating RouterBgpPeer "projects/ci-test-project-188019/regions/us-central1/routers/router-peer-test-b33119hwzx/router-peer-test-b33119hwzx": googleapi: Error 400: Invalid value for field 'project': 'ci-test-project-188019'. Bgp Peer BFD Min Transmit Interval field is not supported yet., invalid
on /opt/teamcity-agent/temp/buildTmp/tf-test782931738/main.tf line 78:
(source code not available)
FAIL
products/compute/api.yaml
Outdated
routing information is removed. If set to TRUE, the peer connection | ||
can be established with routing information. The default is TRUE. | ||
min_version: beta | ||
default_value: "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does "true" work here or does it have to be all caps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprisingly it does. Regarding your errors this is because the feature is currently in closed Beta requiring project whitelisting, otherwise the fields are unavailable (and a reason why we shouldn't merge before the open Beta is launched, and the enable = TRUE by default will fail if the project is not whitelisted).
Tests all pass now, but as it still requires project whitelisting we should hold on merging as it would break peers on TPGB.
|
@drebes what's the current status on this? |
Sorry, mixed this with the firewall one. This is on hold as the public beta is delayed. |
BFD finally made it to Public Preview. Unfortunately, BFD on Cloud Routers attached to VPN tunnels has been removed so there is no easy way to implement acceptance tests (Only Partner and Dedicated Interconnect is supported, but Partner interconnected manages the interface and BGP peer automatically, so can't be used for acceptance testing). |
Added integration tests, using VPN. VPN accepts the bfd field as long as the state is set to |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccCloudbuildWorkerPool_withNetwork|TestAccCloudFunctionsFunction_vpcConnector|TestAccComputeFirewallPolicyRule_update|TestAccComputeForwardingRule_update|TestAccComputeInstanceFromMachineImage_basic|TestAccComputeInstanceFromMachineImage_overrideMetadataDotStartupScript|TestAccComputeInstanceFromMachineImage_diffProject|TestAccComputeOrganizationSecurityPolicyAssociation_organizationSecurityPolicyAssociationBasicExample|TestAccComputeOrganizationSecurityPolicy_organizationSecurityPolicyUpdateExample|TestAccComputeOrganizationSecurityPolicyRule_organizationSecurityPolicyRuleUpdateExample|TestAccComputeRegionNetworkEndpointGroup_regionNetworkEndpointGroupAppengineExample|TestAccComputeRouterPeer_bfd|TestAccContainerAnalysisOccurrence_multipleSignatures|TestAccContainerNodePool_ephemeralStorageConfig|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccSqlUser_postgresIAM You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=213519 |
Hey! Just noting I've seen this and it's in my inbox as a task, I'll get to it within a couple of days. |
Tests failed during RECORDING mode: TestAccComputeOrganizationSecurityPolicyRule_organizationSecurityPolicyRuleUpdateExample|TestAccCloudbuildWorkerPool_withNetwork|TestAccContainerAnalysisOccurrence_multipleSignatures|TestAccComputeFirewallPolicyRule_update|TestAccContainerNodePool_ephemeralStorageConfig|TestAccComputeInstanceFromMachineImage_basic|TestAccComputeInstanceFromMachineImage_overrideMetadataDotStartupScript|TestAccComputeRegionNetworkEndpointGroup_regionNetworkEndpointGroupAppengineExample|TestAccCloudFunctionsFunction_vpcConnector|TestAccComputeInstanceFromMachineImage_diffProject|TestAccSqlUser_postgresIAM Please fix these to complete your PR |
@@ -675,3 +718,100 @@ resource "google_compute_router_peer" "foobar" { | |||
} | |||
`, routerName, routerName, routerName, routerName, routerName, routerName, routerName, routerName, routerName, routerName, routerName, enable) | |||
} | |||
|
|||
func testAccComputeRouterPeerBfd(routerName, bfdMode string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What stops us from making this the example? It's a lot of config but if that's required to use the feature, I don't see a problem documenting it! See https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_service_attachment#example-usage---service-attachment-basic for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BFD doesn't make much sense for VPN right now as it can only be DISABLED
. A more realistic example is to use it with interconnect but that can't be tested due to the APIs. I'm OK making this a proper example once BFD support for VPN is added, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, thanks!
Release Note Template for Downstream PRs (will be copied)