https://github.com/atb00ker/terraform-gcp-openwisp
Terraform files for deploying docker-openwisp infrastructure in Google Cloud.
https://github.com/atb00ker/terraform-gcp-openwisp
docker-openwisp google-cloud openwisp terraform terraform-module
Last synced: about 1 year ago
JSON representation
Terraform files for deploying docker-openwisp infrastructure in Google Cloud.
- Host: GitHub
- URL: https://github.com/atb00ker/terraform-gcp-openwisp
- Owner: atb00ker
- License: gpl-3.0
- Created: 2020-01-30T14:17:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-03T08:25:38.000Z (about 6 years ago)
- Last Synced: 2025-02-10T15:50:41.220Z (over 1 year ago)
- Topics: docker-openwisp, google-cloud, openwisp, terraform, terraform-module
- Language: HCL
- Size: 60.5 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform(GCP): OpenWISP
[](https://registry.terraform.io/modules/atb00ker/openwisp/gcp)
[](https://github.com/openwisp/terraform-gcp-openwisp/blob/master/LICENSE)
Terraform files for deploying docker-openwisp infrastructure in Google Cloud.
This module creates the infrastructure required for deploying the
kubernetes cluster.
## Requirements
1. Create a Google Cloud service account that has atleast the following roles:
- Compute Admin
- Compute Network Admin
- Compute Security Admin
- Kubernetes Engine Admin
- Service Account User
- Service Usage Admin
- DNS Administrator (When `google_services.use_cloud_dns` is `true`)
- Cloud SQL Admin (When `google_services.use_cloud_sql` is `true`)
2. Enable following APIs allow terraform to create resources:
- [serviceusage.googleapis.com](https://console.developers.google.com/apis/api/serviceusage.googleapis.com)
- [cloudresourcemanager.googleapis.com](https://console.developers.google.com/apis/library/cloudresourcemanager.googleapis.com)
3. If you using the following options, please follow the requirements as per the variable's documentation:
- `google_services.configure_gloud`
## Usage
**Note: The following links work only when you are viewing on github.com**
### Variables
- Inputs documentation available [here](docs/input.md).
- Outputs documentation available [here](docs/output.md).
### Examples
- Standalone example available [here](examples/standalone).
### Create:
1. Configure the options in the module. (`examples/` may be helpful)
2. Apply the configurations: `terraform apply`
3. If using Cloud DNS, get the [NS records](https://console.cloud.google.com/net-services/dns/zones/openwisp-dns) and add them in your domain registrar records.
4. Destroy resources only required for management (Creation / Updation)
```bash
terraform destroy \
--target=module.infrastructure.google_compute_router.openwisp_cluster_router \
--target=module.infrastructure.google_compute_router_nat.openwisp_connection_nat
```
### Destroy:
Remember to use terraform when you want to destroy a resource created by terraform.
To destroy all resources: `terraform destroy`
## Contribute to documentation
Some of the parts of documentations are re-used from the [terraform-kubernetes-openwisp](https://github.com/atb00ker/terraform-kubernetes-openwisp) to reduce maintenance, changes need to made in that repository in such cases.
1. Install MarkdownPP: `pip install MarkdownPP`
2. Make changes in `docs/build/` directory.
3. To create documentation, in the root of repository:
```bash
markdown-pp docs/build/input.mdpp -o docs/input.md
markdown-pp docs/build/output.mdpp -o docs/output.md
```