-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
51 lines (42 loc) · 821 Bytes
/
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
# random integer
resource "random_integer" "rand" {
min = 10000
max = 99999
}
# variables
variable "aws_access_key" {
}
variable "aws_secret_key" {
}
variable "private_key_path" {
}
variable "key_name" {
}
variable "region" {
default = "ap-southeast-1"
}
variable "network_address_space" {
type = map(string)
}
variable "subnet_count" {
type = map(number)
}
variable "instance_size" {
type = map(string)
}
variable "instance_count" {
type = map(number)
}
variable "bucket_name_prefix" {
}
variable "billing_code_tag" {
}
# locals
locals {
env_name = lower(terraform.workspace) //get current workspace
common_tags = {
BillingCode = var.billing_code_tag
Environment = local.env_name
}
s3_bucket_name = "${var.bucket_name_prefix}-${local.env_name}-${random_integer.rand.result}"
}