terraform {
required_version = ">= 1.5"
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.30.0"
}
}
# Configure the DigitalOcean Provider
# export DIGITALOCEAN_TOKEN="..."
provider "digitalocean" {
token = var.do_token
}
module "mathminds-w2app-nyc1" {
source = "github.com/CHIP0K/tf-do-k8s-cluster-module.git?ref=v.0.0.0"
PROJECT_NAME = "my-k8s-cluster"
DO_K8S_VERSION_PREFIX = "1.28."
DO_MACHINE_GENERAL_NODES_AUTOSCALE = true
}
No modules.
Name |
Description |
Type |
Default |
Required |
DO_AUTO_UPGRATE_CLUSTER |
(Optional) A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. |
bool |
true |
no |
DO_K8S_VERSION_PREFIX |
The Version Kubernetes cluster to deployment |
string |
"1.28." |
no |
DO_MACHINE_GENERAL_NODES_AUTOSCALE |
Enable auto-scaling of the number of nodes in the node pool within the given min/max range. |
bool |
false |
no |
DO_MACHINE_GENERAL_NODES_COUNT |
The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value. |
number |
2 |
no |
DO_MACHINE_GENERAL_NODES_MAX |
If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to. |
number |
5 |
no |
DO_MACHINE_GENERAL_NODES_MIN |
If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to |
number |
1 |
no |
DO_MACHINE_GENERAL_TYPE |
Droplet size. List all size: doctl compute size list |
string |
"s-2vcpu-2gb" |
no |
DO_MAINTENANCE_DAY |
(Required) The day of the maintenance window policy. May be one of "monday" through "sunday", or "any" to indicate an arbitrary week day. |
string |
"monday" |
no |
DO_MAINTENANCE_TIME |
(Required) The day of the maintenance window policy. May be one of "monday" through "sunday", or "any" to indicate an arbitrary week day. |
string |
"04:00" |
no |
DO_REGION |
DO region to use |
string |
"nyc1" |
no |
DO_SURGE_UPGRADE_CLUSTER |
(Optional) Enable/disable surge upgrades for a cluster. Default: false |
bool |
true |
no |
PROJECT_NAME |
Cluster name |
string |
"k8s-demo" |
no |
No outputs.