terraform-google-modules / terraform-google-vault

Deploys Vault on Compute Engine
https://registry.terraform.io/modules/terraform-google-modules/vault/google
Apache License 2.0
192 stars 127 forks source link

feat: support shared VPC with allow_public_egress #174

Closed ggprod closed 1 year ago

ggprod commented 1 year ago

Closes #173

When using allow_public_egress with shared VPC the Cloud NAT resources need to be in the host project. This PR adds that enhancement/fix. It also fixes the firewall rules in the case of a shared VPC deployment (by creating them in the host project as is necessary in that case)

Also adds a new variable user_vault_config that is appended to the vault config in the config.hcl.tpl template

ggprod commented 1 year ago

@cft-admins could I get a /gcbrun? Thanks!

apeabody commented 1 year ago

/gcbrun

apeabody commented 1 year ago

Thanks for the contribution @ggprod, from the LINT:

Checking for documentation generation
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' '--exclude=autogen' '--exclude=*.tfvars' /workspace/README.md /tmp/tmp.7OFOl7jETz/generate_docs/workspace/README.md
177a178
> | host\_project\_id | The project id of the shared VPC host project, when deploying into a shared VPC | `string` | `""` | no |
187d187
< | host\_project\_id | ID of the host project for shared VPC when deploying into a shard VPC. | `string` | `""` | no |
Error: Documentation generation has not been run, please run the
'make docker_generate_docs' command and commit the above changes.
ggprod commented 1 year ago

Thanks for the contribution @ggprod, from the LINT:

Checking for documentation generation
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' '--exclude=autogen' '--exclude=*.tfvars' /workspace/README.md /tmp/tmp.7OFOl7jETz/generate_docs/workspace/README.md
177a178
> | host\_project\_id | The project id of the shared VPC host project, when deploying into a shared VPC | `string` | `""` | no |
187d187
< | host\_project\_id | ID of the host project for shared VPC when deploying into a shard VPC. | `string` | `""` | no |
Error: Documentation generation has not been run, please run the
'make docker_generate_docs' command and commit the above changes.

done, could I get another /gcbrun please? Thanks!

apeabody commented 1 year ago

/gcbrun

ggprod commented 1 year ago

@ctf-admins I discovered a problem with the firewall rules when using a shared_vpc and fixed it. could I get another /gcbrun? Thanks!

apeabody commented 1 year ago

/gcbrun

ggprod commented 1 year ago

@ctf-admins I added an extra variable that allows the user to provide extra vault configuration (which would allow configuring the vault instance for prometheus metrics for example)... could I get another /gcbrun? Thanks!

apeabody commented 1 year ago

/gcbrun

apeabody commented 1 year ago

/gcbrun

apeabody commented 1 year ago

/gcbrun

ggprod commented 1 year ago

@apeabody any chance this could be approved and merged?

apeabody commented 1 year ago

/gcbrun

apeabody commented 1 year ago

@apeabody any chance this could be approved and merged?

Hi @ggprod - I just triggered the CI and will ask @bharathkkb or @g-awmalik to also review per the note above.