Created
February 10, 2024 12:27
-
-
Save donalmacc/0efbb0b377533232da3f776c60690869 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
digitalocean = { | |
source = "digitalocean/digitalocean" | |
version = "~> 2.0" | |
} | |
} | |
} | |
# Set the variable value in *.tfvars file | |
# or using -var="do_token=..." CLI option | |
variable "do_token" {} | |
# Configure the DigitalOcean Provider | |
provider "digitalocean" { | |
token = var.do_token | |
} | |
resource "digitalocean_kubernetes_cluster" "foo" { | |
name = "foo" | |
region = "nyc1" | |
# Grab the latest version slug from `doctl kubernetes options versions` | |
version = "1.22.8-do.1" | |
node_pool { | |
name = "worker-pool" | |
size = "s-2vcpu-2gb" | |
node_count = 3 | |
taint { | |
key = "workloadKind" | |
value = "database" | |
effect = "NoSchedule" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment