Skip to content

Support for shared vpc networks

Seltux requested to merge Seltux/autoscaler:support-for-shared-vpc-networks into main
  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

Hello Madam/Sir,

Merge Request to fix issue: #100

What does this MR do?

I added a check on the value provided in the "config.toml" for "Network" (getInstanceSpecs | providers/gcp/provider.go) to decide which value should be used.

For example:

  • Network = "my-network" --> using the value of "Project" to make the call to GCP API
  • Network = "projects/shdvpc-my-project/global/network/shdvpc-network" --> using the value of "Network" to make the call to GCP API

Why was this MR needed?

To fix this issue: #100

What's the best way to test this MR?

Trying to provide 3 different values for "Network":

  1. "my-network" --> will use "Project" value in addition to "Network"
  2. "projects/shdvpc-my-project/global/network/shdvpc-network" --> will use "Network" value only
  3. "non-existent-network" --> should throw an error as the network does not exist.

What are the relevant issue numbers?

#100

Remaining available for any further information.

Best regards, Matteo

Edited by Seltux

Merge request reports