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

Bugfix/support empty subnets #97

Conversation

ChandranshuRao14
Copy link
Contributor

@ChandranshuRao14 ChandranshuRao14 commented Mar 12, 2020

Fixes #93

This PR supports empty lists for all submodules.

This PR uses an approach that creates a breaking change in projects_iam submodule by deprecating var.project. From my understanding, the projects and project variables in the projects_iam submodule are redundant. Passing in a single project_id in var.projects will handle both static and dynamic use cases. This would also fit the input pattern all the other submodules use (e.g var.storage_buckets, var.subnets). However, if there's a use case for keeping var.project, please let me know and I can take a different approach.

Changes:

  • Remove var.entity from helper
  • Remove var.project from project_iam
  • Add fixture that passes in an empty list of subnets

Also Fixes #96 by updating documentation

@morgante
Copy link
Contributor

We need to preserve var.project or at least otherwise verify that in the case of a dynamically generated project ID the module still works. Can you test/confirm that?

@ChandranshuRao14
Copy link
Contributor Author

ChandranshuRao14 commented Mar 12, 2020

Yes I modified a test that dynamically gets a generated project ID and passes it into var.projects which passes. Another existing test that uses dynamically generated project IDs in authoritative mode also passes. Would these tests suffice?

@morgante morgante merged commit 2f04df9 into terraform-google-modules:master Mar 24, 2020
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 this pull request may close these issues.

Support empty map of bindings for all submodules Support empty list of subnets for subnet submodule
2 participants