Terraform module to create Storage resource on gcp .
This module has a few dependencies:
IMPORTANT: Since the master
branch used in source
varies based on new modifications, we suggest that you use the release versions [here](https://github.com/slovink/terraform-gcp-gke /releases).
Here is an example of how you can use this module in your inventory structure:
module "gke" {
source = "../"
name = "gke"
environment = var.environment
label_order = var.label_order
network = module.vpc.vpc_id
subnetwork = module.subnet.id
module_enabled = true
google_container_cluster_enabled = true
location = "europe-west3"
remove_default_node_pool = false
gke_version = "1.25.6-gke.1000"
initial_node_count = 1
google_container_node_pool_enabled = true
node_count = 1
cluster_name = "test-gke"
project_id = var.gcp_project_id
region = var.gcp_region
service_account = ""
}
If you come accross a bug or have any feedback, please log it in our issue tracker, or feel free to drop us an email at devops@slovink.com.
If you have found it worth your time, go ahead and give us a ★ on our GitHub!
Name | Version |
---|---|
terraform | >= 1.9.5 |
>= 5.0.0, < 5.11.0 | |
null | ~> 3.0 |
Name | Version |
---|---|
>= 5.0.0, < 5.11.0 | |
null | ~> 3.0 |
Name | Source | Version |
---|---|---|
labels | git::https://github.com/slovink/terraform-google-labels.git | add-precommit-136 |
Name | Type |
---|---|
google_container_cluster.primary | resource |
google_container_node_pool.node_pool | resource |
null_resource.configure_kubectl | resource |
google_client_config.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
auto_repair | Enables or disables automatic repair of nodes in the cluster. | bool |
true |
no |
auto_upgrade | Enables or disables automatic upgrades of nodes in the cluster. | bool |
true |
no |
cluster_create_timeouts | Timeout for creating the cluster. | string |
"30m" |
no |
cluster_delete_timeouts | Timeout for deleting the cluster. | string |
"30m" |
no |
cluster_enabled | Flag to control the cluster_enabled creation. | bool |
true |
no |
cluster_update_timeouts | Timeout for updating the cluster. | string |
"30m" |
no |
disk_size_gb | Size of the disk in gigabytes for each node in the cluster. | number |
10 |
no |
disk_type | Type of disk to use for the nodes in the cluster. | string |
"" |
no |
environment | Environment (e.g. prod , dev , staging ). |
string |
"" |
no |
image_type | Type of image to use for the nodes in the cluster. | string |
"" |
no |
initial_node_count | The number of nodes to create in this cluster's default node pool. | number |
1 |
no |
kubectl_config_path | Path to the kubectl config file. Defaults to $HOME/.kube/config | string |
"" |
no |
label_order | Label order, e.g. sequence of application name and environment name ,environment ,'attribute' [webserver ,qa ,devops ,public ,] . |
list(any) |
[ |
no |
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 | Specifies the policy for distributing nodes across locations, with the default being BALANCED | string |
"BALANCED" |
no |
machine_type | Specifies the machine type for the nodes in the cluster. | string |
"" |
no |
managedby | ManagedBy, eg 'slovink'. | string |
"slovink" |
no |
max_node_count | Maximum number of nodes in the cluster. | number |
1 |
no |
min_master_version | The minimum version of the master. | string |
"" |
no |
min_node_count | Minimum number of nodes in the cluster. | number |
1 |
no |
module_enabled | Flag to control the service_account_enabled creation. | bool |
true |
no |
name | Name of the resource. Provided by the client when the resource is created. | string |
"test" |
no |
network | A reference (self link) to the VPC network to host the cluster in | string |
"" |
no |
preemptible | Specifies whether the nodes in the cluster should be preemptible. | bool |
false |
no |
region | Google Cloud region | string |
"asia-northeast1" |
no |
remove_default_node_pool | deletes the default node pool upon cluster creation. | bool |
true |
no |
service_account | The Google Cloud Platform Service Account to be used by the node VMs created by GKE Autopilot or NAP. | string |
"" |
no |
subnetwork | A reference (self link) to the subnetwork to host the cluster in | string |
"" |
no |
Name | Description |
---|---|
client_certificate | Base64 encoded public certificate used by clients to authenticate to the cluster endpoint. |
client_key | Base64 encoded private key used by clients to authenticate to the cluster endpoint. |
cluster_autoscaling | Specifies the Auto Upgrade knobs for the node pool. |
cluster_ca_certificate | Base64 encoded public certificate that is the root certificate of the cluster. |
cluster_location | Location of the GKE cluster that GitLab is deployed in. |
cluster_name | an identifier for the resource with format |
endpoint | The IP address of this cluster's Kubernetes master. |
id | an identifier for the resource with format |
instance_group_urls | The resource URLs of the managed instance groups associated with this node pool. |
label_fingerprint | an identifier for the resource with format |
maintenance_policy | Duration of the time window, automatically chosen to be smallest possible in the given scenario. |
master_version | The current version of the master in the cluster. |
node_id | An identifier for the resource with format. |
self_link | The server-defined URL for the resource. |
services_ipv4_cidr | The IP address range of the Kubernetes services in this cluster |
tpu_ipv4_cidr_block | The IP address range of the Cloud TPUs in this cluster, |