This repository has been archived by the owner on Jul 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsample.tf
131 lines (112 loc) · 4.16 KB
/
sample.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
provider "smartos" {
"host" = "10.99.50.60:22"
"user" = "root"
}
data "smartos_image" "illumos" {
"name" = "base-64-lts"
"version" = "18.4.0"
}
data "smartos_image" "linux" {
"name" = "ubuntu-16.04"
"version" = "20170403"
}
data "smartos_image" "linux_kvm" {
"name" = "ubuntu-certified-16.04"
"version" = "20190212"
}
resource "smartos_machine" "illumos" {
"alias" = "provider-test-illumos"
"brand" = "joyent"
"cpu_cap" = 100
"customer_metadata" = {
# Note: this is my public SSH key...use your own. :-)
"root_authorized_keys" = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYIHv3DoXnAMn+dggUup1a+jjSqpZiIU5ThgljXHG9KM+iy1W3zo9qshUE7vBj/l7l5aHzRKyXsmWb6EdmtlVBnYl7SH5IMGaEFlB6n7T+yoMRl7VczZZxvP+VSAac2HeLPvdrCDeJCckfkHeTg9E3rt2PcAz0REKDCm34lpsedgM4QrVh8D54NgqLCdpT+QpidEBwE1T5wGMId4OwBB+r1VJZyn+lstJreQ0mu67qn3TFKu5AxZoTdDj6BSDqqHEos5KirS4pz3zt3r5IbC3mv8vDm9+o6O5M2f7R6RRNfD9IPJANmO0k2Ajf529I0bGgAGgIpIXb8OaI6G+L48dR [email protected]"
"user-script" = "/usr/sbin/mdata-get root_authorized_keys > ~root/.ssh/authorized_keys"
}
"image_uuid" = "${data.smartos_image.illumos.id}"
"maintain_resolvers" = true
"max_physical_memory" = 512
"nics" = [
{
"nic_tag" = "external"
"ips" = ["10.0.222.222/16"]
"gateways" = ["10.0.0.1"]
"interface" = "net4"
}
]
"quota" = 25
"resolvers" = ["1.1.1.1", "1.0.0.1"]
provisioner "remote-exec" {
inline = [
"pkgin -y update",
"pkgin -y in htop",
]
}
}
resource "smartos_machine" "linux" {
"alias" = "provider-test-linux"
"brand" = "lx"
"kernel_version" = "3.16.0"
"cpu_cap" = 100
"customer_metadata" = {
# Note: this is my public SSH key...use your own. :-)
"root_authorized_keys" = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYIHv3DoXnAMn+dggUup1a+jjSqpZiIU5ThgljXHG9KM+iy1W3zo9qshUE7vBj/l7l5aHzRKyXsmWb6EdmtlVBnYl7SH5IMGaEFlB6n7T+yoMRl7VczZZxvP+VSAac2HeLPvdrCDeJCckfkHeTg9E3rt2PcAz0REKDCm34lpsedgM4QrVh8D54NgqLCdpT+QpidEBwE1T5wGMId4OwBB+r1VJZyn+lstJreQ0mu67qn3TFKu5AxZoTdDj6BSDqqHEos5KirS4pz3zt3r5IbC3mv8vDm9+o6O5M2f7R6RRNfD9IPJANmO0k2Ajf529I0bGgAGgIpIXb8OaI6G+L48dR [email protected]"
"user-script" = "/usr/sbin/mdata-get root_authorized_keys > ~root/.ssh/authorized_keys"
}
"image_uuid" = "${data.smartos_image.linux.id}"
"maintain_resolvers" = true
"max_physical_memory" = 512
"nics" = [
{
"nic_tag" = "external"
"ips" = ["10.0.222.223/16"]
"gateways" = ["10.0.0.1"]
"interface" = "net5"
}
]
"quota" = 25
"resolvers" = ["1.1.1.1", "1.0.0.1"]
provisioner "remote-exec" {
inline = [
"apt-get update",
"apt-get -y install htop",
]
}
}
resource "smartos_machine" "linux-kvm" {
"alias" = "provider-test-linux-kvm"
"brand" = "kvm"
"kernel_version" = "3.16.0"
"vcpus" = 2
"customer_metadata" = {
# Note: this is my public SSH key...use your own. :-)
"root_authorized_keys" = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYIHv3DoXnAMn+dggUup1a+jjSqpZiIU5ThgljXHG9KM+iy1W3zo9qshUE7vBj/l7l5aHzRKyXsmWb6EdmtlVBnYl7SH5IMGaEFlB6n7T+yoMRl7VczZZxvP+VSAac2HeLPvdrCDeJCckfkHeTg9E3rt2PcAz0REKDCm34lpsedgM4QrVh8D54NgqLCdpT+QpidEBwE1T5wGMId4OwBB+r1VJZyn+lstJreQ0mu67qn3TFKu5AxZoTdDj6BSDqqHEos5KirS4pz3zt3r5IbC3mv8vDm9+o6O5M2f7R6RRNfD9IPJANmO0k2Ajf529I0bGgAGgIpIXb8OaI6G+L48dR [email protected]"
}
"maintain_resolvers" = true
"ram" = 512
"nics" = [
{
"nic_tag" = "external"
"ips" = ["10.0.222.224/16"]
"gateways" = ["10.0.0.1"]
"interface" = "net0"
"model" = "virtio"
}
]
"quota" = 25
"resolvers" = ["1.1.1.1", "1.0.0.1"]
"disks" = [
{
"boot" = true
"image_uuid" = "${data.smartos_image.linux_kvm.id}"
"compression" = "lz4"
"model" = "virtio"
}
]
provisioner "remote-exec" {
inline = [
"apt-get update",
"apt-get -y install htop",
]
}
}