Support for shared vpc networks
-
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":
- "my-network" --> will use "Project" value in addition to "Network"
- "projects/shdvpc-my-project/global/network/shdvpc-network" --> will use "Network" value only
- "non-existent-network" --> should throw an error as the network does not exist.
What are the relevant issue numbers?
Remaining available for any further information.
Best regards, Matteo
Edited by Seltux