-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
68 lines (58 loc) · 1.82 KB
/
main.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
variable "region" {
type = string
description = "AWS region"
default = "us-east-1"
}
variable "bucket_name" {
description = "Name of S3 bucket that stores config files"
type = string
default = "aws-tf-bucket-state"
}
variable "az" {
type = string
description = "AWS availability zone"
default = "us-east-1a"
}
variable "node_root_disk_size" {
type = number
description = "Disk size to allocate for nodes' root disk in GiB"
default = 512 # GB
}
variable "tenancy" {
type = string
description = "Tenacy: default, dedicated or host"
default = "default"
}
variable "admin_public_key" {
type = string
}
variable "base_instance_ami" {
type = string
description = "AWS ami image to use for core instances"
default = "ami-02207126df36eb80c" # From https://cloud-images.ubuntu.com/locator/ec2/
}
variable "validator_node_instance_type" {
type = string
description = "Instance type for validator nodes"
default = "m6g.large"
}
variable "validator_node_count" {
type = number
description = "Count of validator nodes"
default = 1
}
module "aws-deployment" {
source = "./tf-modules/aws"
region = var.region
bucket_name = var.bucket_name
az = var.az
node_root_disk_size = var.node_root_disk_size
tenancy = var.tenancy
admin_public_key = var.admin_public_key
base_instance_ami = var.base_instance_ami
validator_node_instance_type = var.validator_node_instance_type
validator_node_count = var.validator_node_count
}
output "validator_node_ip_address" {
value = module.aws-deployment.validator_node_ip_address
}