Skip to content

Commit

Permalink
Update documentation on how to use shared vpc network using toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
harshthakkar01 committed Oct 28, 2024
1 parent c7f9795 commit dcf93cb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
25 changes: 24 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,29 @@ the controller and login nodes. Also since this blueprint doesn't use external
IPs for compute nodes, one must needs to [set up cloud nat][cloudnat] and
[set up iap][iap].

Now, one need to update the blueprint to include shared vpc details. One should
replace the host-project to the project in which shared vpc is created. In the
network configuration, update the details for shared vpc.

```yaml
vars:
project_id: <service-project>
host_project_id: <host-project>
deployment_name: hpc-small-shared-vpc
region: us-central1
zone: us-central1-c
deployment_groups:
- group: primary
modules:
- id: network1
source: modules/network/pre-existing-vpc
settings:
project_id: $(vars.host_project_id)
network_name: <shared-network>
subnetwork_name: <shared-subnetwork>
```

[hpc-slurm-sharedvpc.yaml]: ../community/examples/hpc-slurm-sharedvpc.yaml
[fs-shared-vpc]: https://cloud.google.com/filestore/docs/shared-vpc

Expand Down Expand Up @@ -1751,7 +1774,7 @@ deployment_groups:
# GitHub module over HTTPS, prefixed with github.com
- source: github.com/org/repo//path/to/module

# Local absolute source, prefixed with /
# Local absolute source, prefixed with /
- source: /path/to/module

# Local relative (to current working directory) source, prefixed with ./ or ../
Expand Down
10 changes: 10 additions & 0 deletions modules/network/pre-existing-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ VM will be created.
> **_NOTE:_** The `project_id` and `region` settings would be inferred from the
> deployment variables of the same name, but they are included here for clarity.

### Use shared-vpc

If a network is created in different project, this module can be used to reference
the network and use in different project by setting up [cloud nat][cloudnat] and
[IAP][iap] forwarding. For more details, refer [shared-vpc][shared-vpc-doc]

[cloudnat]: https://cloud.google.com/nat/docs/overview
[iap]: https://cloud.google.com/iap/docs/using-tcp-forwarding
[shared-vpc-doc]: ../../../examples/README.md#hpc-slurm-sharedvpcyaml-community-badge-experimental-badge

## License

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Expand Down

0 comments on commit dcf93cb

Please sign in to comment.