-
Notifications
You must be signed in to change notification settings - Fork 0
/
bla.tf
36 lines (34 loc) · 979 Bytes
/
bla.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
# Set the variable value in *.tfvars file
# or using -var="do_token=..." CLI option
variable "do_token" { default = "<CHANGE ME>" }
# Configure the DigitalOcean Provider
provider "digitalocean" {
token = "${var.do_token}"
}
# Create a web server
resource "digitalocean_droplet" "web" {
image = "ubuntu-18-04-x64"
name = "node1"
region = "lon1"
size = "s-1vcpu-1gb"
}
#resource "dockermachine_digitalocean" "node" {
#resource "digitalocean_droplet" "web" {
# count = 2
# name = "${format("node-%02d", count.index+1)}"
# cpu_count = 2
# memory = 1024
#
# provisioner "remote-exec" {
# inline = [
# "touch /tmp/this_is_a_test",
# ]
# connection {
# type = "ssh"
# host = "${self.ssh_hostname}"
# port = "${self.ssh_port}"
# user = "${self.ssh_username}"
# private_key = "${file("${self.ssh_keypath}")}"
# }
# }
#}