-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
122 lines (109 loc) · 3.26 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
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
#Set variables for provisioner
variable "df_region" {}
variable "access_key" {}
variable "secret_key" {}
#Set variables for networking
variable "df_cidr_block_anywhere" {}
variable "vpc_cidr_block" {}
variable "subnet_cidr_block_a" {}
variable "subnet_cidr_block_b" {}
variable "availability_zone_a" {}
variable "availability_zone_b" {}
variable "public_ip" {}
#Set variables for instances
variable "ec2_ami_id" {}
variable "ec2_instance_type" {}
variable "key_name" {}
#Set IAM role for instances
variable "access_level" {default = "ec2_full_access_role"}
variable "ver" {default = "2012-10-17"}
variable "action" {default = "sts:AssumeRole"}
variable "effect" {default = "Allow"}
variable "principal_service" {default = "ec2.amazonaws.com"}
variable "policy_arn" {default = "arn:aws:iam::aws:policy/AdministratorAccess"}
variable "instance_profile_name" {default = "ec2_full_access_profile"}
variable "machine_role" {default = "dp6_machine_role"}
#Set variables for instance tags
variable "ec2_instance_tag_1" {
description = "tag for first instance"
type = map(string)
}
variable "ec2_instance_tag_2" {
description = "tag for second instance"
type = map(string)
}
# variable "ec2_instance_tag_3" {
# description = "tag for third instance"
# type = map(string)
# }
#Set variable for user data scripts
variable "ud_jenkins_controller" {
description = "path to controller script"
default = "ud_jenkins_controller.sh"
}
variable "ud_jenkins_agent_tf" {
description = "path to agent script"
default = "ud_jenkins_agent_tf.sh"
}
#Set variables for ingress (incoming) traffic
variable "ssh_access" {
description = "access through SSH on PORT 22"
type = object({
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
})
default = {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
variable "http_access" {
description = "access through http on PORT 8000"
type = object({
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
})
default = {
from_port = 8000
to_port = 8000
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
variable "jenkins_access" {
description = "access jenkins on PORT 8080"
type = object({
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
})
default = {
from_port = 8080
to_port = 8080
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
#Set variables for egress(outgoing) traffic
variable "anywhere_outgoing" {
description = "go anywhere outbound with any protocol"
type = object({
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
})
default = {
from_port = 0
to_port = 65000
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
}