Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Add support for Shared VPCs #39

Open
jackmurphy opened this issue May 29, 2018 · 0 comments
Open

Add support for Shared VPCs #39

jackmurphy opened this issue May 29, 2018 · 0 comments

Comments

@jackmurphy
Copy link

jackmurphy commented May 29, 2018

I'm getting the following errors when I specify IP addresses while utilizing shared VPCs.

* google_compute_firewall.mig-health-check: Error creating firewall: googleapi: Error 404: The resource 'projects/ecomm-browse-staging/global/networks/vpc-staging' was not found, notFound
* module.us-west1-a-egress.module.nat-gateway.var.access_config: Resource 'data.google_compute_address.default' not found for variable 'data.google_compute_address.default.address'
* module.us-west1-b-egress.output.external_ip: Resource 'data.google_compute_address.default' not found for variable 'data.google_compute_address.default.address'

There's a number of things going on. While I'm able to specify which project the google_compute_network lives in by passing the network_project variable, this causes issues since it's also being passed to the google_compute_address data resource. I don't believe this should be the case since the documentation states:

External IP addresses defined in the host project are only usable by resources in that project. They are not available for use in service projects. Service projects can maintain their own set of external IP addresses.

Unfortunately that's not the only complication. The nat-gateway module is hardcoded to look for it's google_compute_network resources in var.project not var.network_project.

In order to really support shared VPCs we'll have to make some changes upstream as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant