-
Notifications
You must be signed in to change notification settings - Fork 11
/
test-aws-variables.tf
189 lines (167 loc) · 5.73 KB
/
test-aws-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
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
181
182
183
184
185
186
187
188
189
# ===================================================
# General
# ---------------------------------------------------
resource "tfe_variable" "test_aws_instance_count" {
key = "candy_instance_count"
value = 4
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_use_elastic_ips" {
key = "candy_use_elastic_ips"
value = true
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_region" {
key = "candy_region"
value = "ca-central-1"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_application_name" {
key = "candy_application_name"
value = "candy"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_environment" {
key = "candy_environment"
value = "test"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_instance_name" {
key = "candy_instance_name"
value = "test-bc-aws"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_iam_role" {
key = "iam_role"
value = "AmazonSSMRoleForInstancesQuickSetup"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
# ===================================================
# ===================================================
# AMI
# ---------------------------------------------------
resource "tfe_variable" "test_aws_ami_owners" {
key = "candy_ami_owners"
value = "[\"099720109477\"]"
hcl = true
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_ami_filter_name" {
key = "candy_ami_filter_name"
value = "[\"ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*\"]"
hcl = true
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_ami_filter_root_device_type" {
key = "candy_ami_filter_root_device_type"
value = "[\"ebs\"]"
hcl = true
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_ami_filter_virtualization_type" {
key = "candy_ami_filter_virtualization_type"
value = "[\"hvm\"]"
hcl = true
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
# ===================================================
# ===================================================
# EC2
# - t3.large: 2CPU, 8GiB Memory
# ---------------------------------------------------
resource "tfe_variable" "test_aws_ec2_instance_type" {
key = "candy_ec2_instance_type"
value = "t3.large"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
# ===================================================
# ===================================================
# EBS
# ---------------------------------------------------
resource "tfe_variable" "test_aws_root_volume_size" {
key = "candy_root_volume_size"
value = "10"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_data_volume_size" {
key = "candy_data_volume_size"
value = "250"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_ebs_volume_type" {
key = "candy_ebs_volume_type"
value = "gp2"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_ebs_encrypted" {
key = "candy_ebs_encrypted"
value = true
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_ebs_kms_key_id" {
key = "candy_ebs_kms_key_id"
value = ""
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_ebs_delete_on_termination" {
key = "candy_ebs_delete_on_termination"
value = true
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
# ===================================================
# ===================================================
# Network
# ---------------------------------------------------
resource "tfe_variable" "test_aws_vpc_node_cidr_block" {
key = "candy_vpc_node_cidr_block"
value = "172.31.0.0/16"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_subnet_cidr_block_prefix" {
key = "candy_subnet_cidr_block_prefix"
value = "172.31."
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_subnet_cidr_starting_address" {
key = "candy_subnet_cidr_starting_address"
value = 100
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
# ===================================================
# ===================================================
# Networking
# ---------------------------------------------------
resource "tfe_variable" "test_aws_client_port" {
key = "candy_client_port"
value = "9702"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
resource "tfe_variable" "test_aws_node_port" {
key = "candy_node_port"
value = "9701"
category = "terraform"
workspace_id = data.tfe_workspace.test-aws.id
}
# ===================================================