blob: 41dc4e63d0882dcd2c195f8a09723d477df7bfa9 (
plain)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
variable "vault-name" {
default = "dynamic-aws-creds-vault-fdio-csit-jenkins"
}
variable "region" {
description = "AWS Region."
type = string
default = "eu-central-1"
}
variable "resource_prefix" {
description = "Resources name prefix."
type = string
default = "csit-2n-c6in"
}
variable "testbed_name" {
description = "Testbed name."
type = string
default = "testbed1"
}
# Variables for Private Key
variable "private_key_algorithm" {
description = "The name of the algorithm to use for the key."
type = string
default = "RSA"
}
variable "private_key_ecdsa_curve" {
description = "When algorithm is ECDSA, the name of the elliptic curve to use."
type = string
default = "P521"
}
variable "private_key_rsa_bits" {
description = "When algorithm is RSA, the size of the generated RSA key in bits."
type = number
default = 4096
}
# Variables for Placement Group
variable "placement_group_strategy" {
description = "The placement strategy. Can be cluster, partition or spread."
type = string
default = "cluster"
}
# Variables for Instance
variable "tg_ami" {
description = "AMI to use for the instance."
type = string
default = "ami-00ff6ec6a76b31665"
}
variable "tg_associate_public_ip_address" {
description = "Whether to associate a public IP address with an instance in a VPC."
type = bool
default = true
}
variable "tg_instance_initiated_shutdown_behavior" {
description = "Shutdown behavior for the instance."
type = string
default = "terminate"
}
variable "tg_instance_type" {
description = "The instance type to use for the instance."
type = string
default = "c6in.4xlarge"
}
variable "tg_private_ip" {
description = "Private IP address to associate with the instance in a VPC."
type = string
default = "192.168.0.10"
}
variable "tg_source_dest_check" {
description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
type = bool
default = false
}
variable "sut1_ami" {
description = "AMI to use for the instance."
type = string
default = "ami-0217b4ddda6e9c79c"
}
variable "sut1_associate_public_ip_address" {
description = "Whether to associate a public IP address with an instance in a VPC."
type = bool
default = true
}
variable "sut1_instance_initiated_shutdown_behavior" {
description = "Shutdown behavior for the instance."
type = string
default = "terminate"
}
variable "sut1_instance_type" {
description = "The instance type to use for the instance."
type = string
default = "c6in.4xlarge"
}
variable "sut1_private_ip" {
description = "Private IP address to associate with the instance in a VPC."
type = string
default = "192.168.0.11"
}
variable "sut1_source_dest_check" {
description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
type = bool
default = false
}
# Variables for Network Interface
variable "tg_if1_private_ip" {
description = "List of private IPs to assign to the ENI without regard to order."
type = string
default = "192.168.10.254"
}
variable "tg_if2_private_ip" {
description = "List of private IPs to assign to the ENI without regard to order."
type = string
default = "192.168.20.254"
}
variable "destination_cidr_block_tg_if1" {
description = "The destination CIDR block."
type = string
default = "10.0.0.0/24"
}
variable "destination_cidr_block_tg_if2" {
description = "The destination CIDR block."
type = string
default = "20.0.0.0/24"
}
variable "sut1_if1_private_ip" {
description = "List of private IPs to assign to the ENI without regard to order."
type = string
default = "192.168.10.11"
}
variable "sut1_if2_private_ip" {
description = "List of private IPs to assign to the ENI without regard to order."
type = string
default = "192.168.20.11"
}
# Variables for Null Resource
variable "first_run_commands" {
description = "List of private IPs to assign to the ENI without regard to order."
type = list(string)
default = [
"sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config",
"sudo systemctl restart ssh.service",
"sudo useradd --create-home -s /bin/bash provisionuser",
"echo 'provisionuser:Csit1234' | sudo chpasswd",
"echo 'provisionuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers",
"sudo useradd --create-home -s /bin/bash testuser",
"echo 'testuser:Csit1234' | sudo chpasswd",
"echo 'testuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers"
]
}
# Variables for Null Resource
variable "ansible_topology_path" {
description = "Ansible topology path."
type = string
default = "../../fdio.infra.ansible/cloud_topology.yaml"
}
|