https://github.com/opszero/terraform-google-kubespot
https://github.com/opszero/terraform-google-kubespot
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/opszero/terraform-google-kubespot
- Owner: opszero
- License: other
- Created: 2022-04-15T23:02:58.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-11-06T12:42:22.000Z (8 months ago)
- Last Synced: 2025-11-06T14:28:13.703Z (8 months ago)
- Language: HCL
- Homepage: https://opszero.com
- Size: 54.2 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Support: SUPPORT
Awesome Lists containing this project
README
# Kubespot (GCP)

Compliance Oriented Kubernetes Setup for Google Cloud.
# Tools & Setup
```
brew install kubectl kubernetes-helm google-cloud-sdk terraform
```
# Terraform usage
```
gcloud auth activate-service-account --key-file=./account.json
terraform init && terraform get -update && terraform apply
gcloud config set account foo@opszero.com # Set account name
gcloud container clusters get-credentials --region us-central1
```
## Providers
| Name | Version |
|------|---------|
| [google](#provider\_google) | n/a |
| [helm](#provider\_helm) | n/a |
| [http](#provider\_http) | n/a |
| [null](#provider\_null) | n/a |
| [random](#provider\_random) | n/a |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [auto\_repair](#input\_auto\_repair) | Enables or disables automatic repair of nodes in the cluster. | `bool` | `true` | no |
| [auto\_upgrade](#input\_auto\_upgrade) | Enables or disables automatic upgrades of nodes in the cluster. | `bool` | `true` | no |
| [cluster\_create\_timeouts](#input\_cluster\_create\_timeouts) | Timeout for creating the cluster. | `string` | `"30m"` | no |
| [cluster\_delete\_timeouts](#input\_cluster\_delete\_timeouts) | Timeout for deleting the cluster. | `string` | `"30m"` | no |
| [cluster\_update\_timeouts](#input\_cluster\_update\_timeouts) | Timeout for updating the cluster. | `string` | `"30m"` | no |
| [cluster\_version](#input\_cluster\_version) | The minimum version of the master | `string` | `"1.27"` | no |
| [csi\_secrets\_store\_enabled](#input\_csi\_secrets\_store\_enabled) | Specify whether the CSI driver is enabled | `bool` | `false` | no |
| [disk\_size\_gb](#input\_disk\_size\_gb) | Size of the disk in gigabytes for each node in the cluster. | `number` | `10` | no |
| [disk\_type](#input\_disk\_type) | Type of disk to use for the nodes in the cluster. | `string` | `""` | no |
| [environment\_name](#input\_environment\_name) | Name of the resource. Provided by the client when the resource is created. | `string` | `""` | no |
| [image\_type](#input\_image\_type) | Type of image to use for the nodes in the cluster. | `string` | `""` | no |
| [initial\_node\_count](#input\_initial\_node\_count) | The number of nodes to create in this cluster's default node pool. | `number` | `0` | no |
| [kms\_enabled](#input\_kms\_enabled) | Specify whether the redis cluster is enabled | `bool` | `false` | no |
| [kubectl\_config\_path](#input\_kubectl\_config\_path) | Path to the kubectl config file. Defaults to $HOME/.kube/config | `string` | `""` | no |
| [location](#input\_location) | The location (region or zone) in which the cluster master will be created, as well as the default node location. | `string` | `""` | no |
| [location\_policy](#input\_location\_policy) | Specifies the policy for distributing nodes across locations, with the default being BALANCED | `string` | `"BALANCED"` | no |
| [machine\_type](#input\_machine\_type) | Specifies the machine type for the nodes in the cluster. | `string` | `""` | no |
| [max\_node\_count](#input\_max\_node\_count) | Maximum number of nodes in the cluster. | `number` | `1` | no |
| [min\_master\_version](#input\_min\_master\_version) | The minimum version of the master. | `string` | `""` | no |
| [min\_node\_count](#input\_min\_node\_count) | Minimum number of nodes in the cluster. | `number` | `1` | no |
| [preemptible](#input\_preemptible) | Specifies whether the nodes in the cluster should be preemptible. | `bool` | `false` | no |
| [project](#input\_project) | The Google project that will host the cluster | `string` | n/a | yes |
| [redis\_enabled](#input\_redis\_enabled) | Specify whether the redis cluster is enabled | `bool` | `false` | no |
| [redis\_ha\_enabled](#input\_redis\_ha\_enabled) | Specify whether HA is enabled for redis | `bool` | `false` | no |
| [redis\_memory\_in\_gb](#input\_redis\_memory\_in\_gb) | Redis memory size in GiB | `number` | `1` | no |
| [region](#input\_region) | The location (region or zone) in which the cluster master will be created | `string` | `""` | no |
| [remove\_default\_node\_pool](#input\_remove\_default\_node\_pool) | deletes the default node pool upon cluster creation. | `bool` | `true` | no |
| [service\_account](#input\_service\_account) | The Google Cloud Platform Service Account to be used by the node VMs created by GKE Autopilot or NAP. | `string` | `""` | no |
| [sql\_enabled](#input\_sql\_enabled) | Specify whether the sql instance is enabled | `bool` | `false` | no |
| [sql\_engine](#input\_sql\_engine) | The sql version to use | `string` | `"POSTGRES_15"` | no |
| [sql\_instance\_class](#input\_sql\_instance\_class) | The machine type to use | `string` | `"db-f1-micro"` | no |
| [sql\_master\_password](#input\_sql\_master\_password) | The password for the db user | `string` | `""` | no |
| [sql\_master\_username](#input\_sql\_master\_username) | The name of the db user | `string` | `""` | no |
| [tags](#input\_tags) | Terraform map to create custom tags for the Google resources | `map` | `{}` | no |
## Resources
| Name | Type |
|------|------|
| [google_compute_global_address.private_ip_address](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_global_address) | resource |
| [google_compute_network.network](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_network) | resource |
| [google_compute_router.nat_router](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_router) | resource |
| [google_compute_router_nat.nat_config](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_router_nat) | resource |
| [google_compute_subnetwork.subnet](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_subnetwork) | resource |
| [google_container_cluster.primary](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster) | resource |
| [google_container_node_pool.node_pool](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool) | resource |
| [google_kms_crypto_key.key](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/kms_crypto_key) | resource |
| [google_kms_key_ring.keyring](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/kms_key_ring) | resource |
| [google_redis_instance.cache](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/redis_instance) | resource |
| [google_service_networking_connection.private_vpc_connection](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_networking_connection) | resource |
| [google_sql_database_instance.default](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_database_instance) | resource |
| [google_sql_user.user](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_user) | resource |
| [helm_release.csi_secrets_store](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [null_resource.configure_kubectl](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [null_resource.csi_secrets_store_aws_provider](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [null_resource.sql_vpc_lock](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [random_id.server](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource |
| [google_client_config.default](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/client_config) | data source |
| [http_http.csi_secrets_store_gcp_provider](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
## Outputs
| Name | Description |
|------|-------------|
| [private\_vpc\_network](#output\_private\_vpc\_network) | n/a |
| [sql\_database](#output\_sql\_database) | n/a |
# 🚀 Built by opsZero!
[opsZero](https://opszero.com) provides software and consulting for Cloud + AI. With our decade plus of experience scaling some of the world’s most innovative companies we have developed deep expertise in Kubernetes, DevOps, FinOps, and Compliance.
Our software and consulting solutions enable organizations to:
- migrate workloads to the Cloud
- setup compliance frameworks including SOC2, HIPAA, PCI-DSS, ITAR, FedRamp, CMMC, and more.
- FinOps solutions to reduce the cost of running Cloud workloads
- Kubernetes optimized for web scale and AI workloads
- finding underutilized Cloud resources
- setting up custom AI training and delivery
- building data integrations and scrapers
- modernizing onto modern ARM based processors
We do this with a high-touch support model where you:
- Get access to us on Slack, Microsoft Teams or Email
- Get 24/7 coverage of your infrastructure
- Get an accelerated migration to Kubernetes
Please [schedule a call](https://calendly.com/opszero-llc/discovery) if you need support.
