Created
November 23, 2022 16:01
-
-
Save jarededwards/7e20522e40896297e7ca7d0e794b05b8 to your computer and use it in GitHub Desktop.
terraform hcl for provisioning civo cloud
This file contains 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 { | |
civo = { | |
source = "civo/civo" | |
} | |
} | |
} | |
# export CIVO_TOKEN=$MYTOKEN is set | |
provider "civo" { | |
region = "NYC1" | |
} | |
locals { | |
cluster_name = "mycluster-1" | |
} | |
resource "civo_network" "kubefirst" { | |
label = local.cluster_name | |
} | |
resource "civo_firewall" "kubefirst" { | |
name = local.cluster_name | |
network_id = civo_network.kubefirst.id | |
create_default_rules = true | |
} | |
resource "civo_kubernetes_cluster" "kubefirst" { | |
name = local.cluster_name | |
network_id = civo_network.kubefirst.id | |
firewall_id = civo_firewall.kubefirst.id | |
pools { | |
label = local.cluster_name | |
size = "g4s.kube.medium" | |
node_count = 3 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment