Skip to content
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

cannot create subnets separately from network itself #88

Closed
ideasculptor opened this issue Oct 25, 2019 · 1 comment · Fixed by #89
Closed

cannot create subnets separately from network itself #88

ideasculptor opened this issue Oct 25, 2019 · 1 comment · Fixed by #89

Comments

@ideasculptor
Copy link

Because the team(s) that have permission to modify networks in my architecture may differ from the team(s) that can perform other work, I really prefer to be able to declare subnets separately from declaring the network itself and making the project a VPC host project.

Declaring the network and host project alone is easy enough - just set var.subnets to []

However, it would be nice to be able to use this module to declare the subnets and routes, rather than copying those 2 resources into a module of their own. I don't see any obvious reason not to make those first 2 resources in main.tf optional, based on variables passed in, but before I put in the work of making a PR, it'd be nice to know if that change will be accepted - I don't know if that's an operating model google is interested in supporting.

The subnet and route resources really only use the network name, so it's very low-impact change to make, since that is already a variable. We just need to indicate whether we should create a network and then refer to that resource when creating subnets and routes or just use the passed-in network name (in my case, the passed-in name would be populated by remote_state that retrieves the network_name that got assigned when the network itself was created).

@morgante
Copy link
Contributor

I don't think this is a common scenario, but since its a low-impact change I don't mind adding it.

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

Successfully merging a pull request may close this issue.

2 participants