forked from Spirent-Terraform-Modules/terraform-aws-stcv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
92 lines (76 loc) · 2.77 KB
/
variables.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
variable "ami" {
description = "The Spirent TestCenter Virtual AMI. When not specified, the latest marketplace image will be used."
type = string
default = ""
validation {
condition = var.ami == "" || can(regex("^ami-", var.ami))
error_message = "Please provide a valid ami id, starting with \"ami-\". or leave blank for latest Spirent TestCenter Virtual AMI."
}
}
variable "vpc_id" {
description = "AWS VPC ID"
type = string
validation {
condition = can(regex("^vpc-", var.vpc_id))
error_message = "Please provide a valid vpc id, starting with \"vpc-\"."
}
}
variable "instance_name_prefix" {
description = "Name assigned to the instance. An instance number will be appended to the name."
type = string
default = "stcv-"
}
variable "instance_count" {
description = "Number of instances to create"
type = number
default = 2
}
variable "instance_type" {
description = "AWS instance type"
type = string
default = "m5.large"
}
variable "mgmt_plane_subnet_id" {
description = "Management public AWS subnet ID"
type = string
validation {
condition = can(regex("^subnet-", var.mgmt_plane_subnet_id))
error_message = "Please provide a valid subnet id, starting with \"subnet-\"."
}
}
variable "mgmt_plane_eips" {
description = "List of management plane elastic IP IDs. Leave empty if subnet auto assigns IPs."
type = list(string)
default = []
}
variable "ingress_cidr_blocks" {
description = "List of management interface ingress IPv4/IPv6 CIDR ranges. Set to empty list when using mgmt_plane_security_group_ids."
type = list(string)
}
variable "mgmt_plane_security_group_ids" {
description = "List of management plane security group IDs. Leave empty to create a default security group using ingress_cidr_blocks."
type = list(string)
default = []
}
variable "test_plane_subnet_ids" {
description = "Test plane AWS subnet ID list. Each instance will have a network interface on each subnet."
type = list(string)
}
variable "test_plane_security_group_ids" {
description = "List of test plane security group IDs. Leave empty to create a default security group."
type = list(string)
default = []
}
variable "root_block_device" {
description = "Customize details about the root block device of the instance. See Block Devices below for details."
type = list(map(string))
default = []
}
variable "key_name" {
description = "AWS SSH key name to assign to each instance"
type = string
}
variable "user_data_file" {
description = "File path name containing AWS user data for the instance. Spirent TestCenter Virtual cloud-init configuration parameters are supported."
type = string
}