F5Networks / terraform-gcp-bigip-module

Terraform module for Deploying BIG-IP in GCP
Apache License 2.0
9 stars 13 forks source link

allow to use shared VPCs #40

Open sagor999 opened 1 year ago

sagor999 commented 1 year ago

Hello,

this PR adds ability to use shared VPC when configuring NIC. It adds two variables: network_id - to be able to specify parent network VPC. subnet_project_id - to be able to specify the project which shares a subnetwork into your google project.

Both parameters are optional and can be set to null to not use them. But it is required to have them if you want to be able to use shared VPC.

Let me know if there are any other changes required to be able to merge this. I updated README and examples.

janibashamd commented 2 months ago

@sagor999 can you please fix merge conflicts

memes commented 1 month ago

Just a quick comment - the subnet_id as used in this module can be a fully-qualified self-link which includes the project ID containing the subnetwork resource. By using the full self-link instead of a simple name you get support for Shared VPCs without needing an additional field.

E.g. with full self-link projects/HOST_PROJECT/regions/us-east1/subnetworks/emes-ext-us-ea1 the BIG-IP will use subnet emes-ext-us-ea1 from Shared VPC host project HOST_PROJECT.