This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmanager.tf
81 lines (68 loc) · 1.72 KB
/
manager.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
# Configure the Linode provider
variable "linode_token" {
type = string
}
variable "manager_label" {
type = string
}
# Regions ca-central, us-central, us-west, us-southeast, us-east
variable "manager_region" {
type = string
}
variable "manager_image" {
type = string
}
variable "manager_type" {
type = string
}
variable "manager_password" {
type = string
}
terraform {
required_providers {
linode = {
source = "linode/linode"
version = ">= 1.13.4"
}
}
required_version = ">= 0.13"
}
provider "linode" {
token = var.linode_token
}
variable "cluster_prefix" {
type = string
}
variable "ssh_key" {
type = string
}
resource "linode_instance" "drp_manager" {
image = var.manager_image
label = var.manager_label
region = var.manager_region
type = var.manager_type
root_pass = var.manager_password
tags = [ "cluster-${var.cluster_prefix}"]
authorized_keys = ["${var.ssh_key}"]
stackscript_id = "674971"
stackscript_data = {
"drp_version" = "tip"
"drp_password" = var.manager_password
"drp_user" = "rocketskates"
"drp_id" = var.manager_label
"initial_workflow" = "universal-bootstrap"
"initial_contents" = "universal,edge-lab"
"initial_plugins" = ""
"initial_profiles" = "bootstrap-contexts"
"initial_catalog" = "https://rebar-catalog.s3-us-west-2.amazonaws.com/jpmc-catalog.json"
"open_ports" = "8091/tcp,8092/tcp,9300/tcp,9200/tcp,5601/tcp"
}
}
output "drp_ip" {
value = linode_instance.drp_manager.ip_address
description = "The IP of DRP"
}
output "drp_manager" {
value = "https://${linode_instance.drp_manager.ip_address}:8092"
description = "The URL of DRP"
}