-
Notifications
You must be signed in to change notification settings - Fork 0
/
infra.tf
44 lines (37 loc) · 997 Bytes
/
infra.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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
}
data "digitalocean_ssh_key" "pubkey" {
name = "Mac laptop"
}
resource "digitalocean_volume" "chiilhopvolume" {
name = "chiilhop"
region = "ams3"
size = 5
}
resource "digitalocean_droplet" "uploader" {
image = "ubuntu-18-04-x64"
name = "musicuploader"
region = "ams3"
size = "s-1vcpu-1gb"
ssh_keys = [data.digitalocean_ssh_key.pubkey.id]
}
resource "digitalocean_volume_attachment" "foobar" {
droplet_id = digitalocean_droplet.uploader.id
volume_id = digitalocean_volume.chiilhopvolume.id
}
resource "digitalocean_kubernetes_cluster" "kittyhashcluster" {
name = "kittyhash-cluster"
region = "ams3"
version = "1.16.6-do.1"
node_pool {
name = "autoscale-worker-pool"
size = "s-1vcpu-2gb"
auto_scale = true
node_count = 3
}
}