-
-
Notifications
You must be signed in to change notification settings - Fork 133
/
Copy pathvariables.tf
145 lines (126 loc) · 5.83 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
variable "allowed_cidr_blocks" {
type = list(string)
default = []
description = "The CIDR blocks from which to allow `ingress` traffic to the EFS"
}
variable "access_points" {
type = map(map(map(any)))
default = {}
description = <<-EOT
A map of the access points you would like in your EFS volume
See [examples/complete] for an example on how to set this up.
All keys are strings. The primary keys are the names of access points.
The secondary keys are `posix_user` and `creation_info`.
The secondary_gids key should be a comma separated value.
More information can be found in the terraform resource [efs_access_point](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_access_point).
EOT
}
variable "vpc_id" {
type = string
description = "VPC ID"
}
variable "region" {
type = string
description = "AWS Region"
}
variable "subnets" {
type = list(string)
description = "Subnet IDs"
}
variable "zone_id" {
type = list(string)
default = []
description = <<-EOT
Route53 DNS Zone ID as list of string (0 or 1 items). If empty, no custom DNS name will be published.
If the list contains a single Zone ID, a custom DNS name will be pulished in that zone.
Can also be a plain string, but that use is DEPRECATED because of Terraform issues.
EOT
}
variable "encrypted" {
type = bool
description = "If true, the file system will be encrypted"
default = true
}
variable "kms_key_id" {
type = string
description = "If set, use a specific KMS key"
default = null
}
variable "performance_mode" {
type = string
description = "The file system performance mode. Can be either `generalPurpose` or `maxIO`"
default = "generalPurpose"
}
variable "provisioned_throughput_in_mibps" {
type = number
default = 0
description = "The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with `throughput_mode` set to provisioned"
}
variable "throughput_mode" {
type = string
description = "Throughput mode for the file system. Defaults to bursting. Valid values: `bursting`, `provisioned`. When using `provisioned`, also set `provisioned_throughput_in_mibps`"
default = "bursting"
}
variable "mount_target_ip_address" {
type = string
description = "The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target"
default = null
}
variable "dns_name" {
type = string
description = "Name of the CNAME record to create"
default = ""
}
variable "transition_to_archive" {
type = list(string)
description = "Indicates how long it takes to transition files to the Glacier storage class. Valid values: AFTER_1_DAY, AFTER_7_DAYS, AFTER_14_DAYS, AFTER_30_DAYS, AFTER_60_DAYS, AFTER_90_DAYS, AFTER_180_DAYS, AFTER_270_DAYS and AFTER_365_DAYS. Default (no value) means \"never\"."
default = []
validation {
condition = (
length(var.transition_to_archive) == 1 ? contains(["AFTER_1_DAY", "AFTER_7_DAYS", "AFTER_14_DAYS", "AFTER_30_DAYS", "AFTER_60_DAYS", "AFTER_90_DAYS", "AFTER_180_DAYS", "AFTER_270_DAYS", "AFTER_365_DAYS"], var.transition_to_archive[0]) : length(var.transition_to_archive) == 0
)
error_message = "Var `transition_to_archive` must either be empty list or one of \"AFTER_1_DAY\", \"AFTER_7_DAYS\", \"AFTER_14_DAYS\", \"AFTER_30_DAYS\", \"AFTER_60_DAYS\", \"AFTER_90_DAYS\", \"AFTER_180_DAYS\", \"AFTER_270_DAYS\", \"AFTER_365_DAYS\"."
}
}
variable "transition_to_ia" {
type = list(string)
description = "Indicates how long it takes to transition files to the Infrequent Access (IA) storage class. Valid values: AFTER_1_DAY, AFTER_7_DAYS, AFTER_14_DAYS, AFTER_30_DAYS, AFTER_60_DAYS, AFTER_90_DAYS, AFTER_180_DAYS, AFTER_270_DAYS and AFTER_365_DAYS. Default (no value) means \"never\"."
default = []
validation {
condition = (
length(var.transition_to_ia) == 1 ? contains(["AFTER_1_DAY", "AFTER_7_DAYS", "AFTER_14_DAYS", "AFTER_30_DAYS", "AFTER_60_DAYS", "AFTER_90_DAYS", "AFTER_180_DAYS", "AFTER_270_DAYS", "AFTER_365_DAYS"], var.transition_to_ia[0]) : length(var.transition_to_ia) == 0
)
error_message = "Var `transition_to_ia` must either be empty list or one of \"AFTER_1_DAY\", \"AFTER_7_DAYS\", \"AFTER_14_DAYS\", \"AFTER_30_DAYS\", \"AFTER_60_DAYS\", \"AFTER_90_DAYS\", \"AFTER_180_DAYS\", \"AFTER_270_DAYS\", \"AFTER_365_DAYS\"."
}
}
variable "transition_to_primary_storage_class" {
type = list(string)
description = "Describes the policy used to transition a file from Infrequent Access (IA) storage to primary storage. Valid values: AFTER_1_ACCESS."
default = []
validation {
condition = (
length(var.transition_to_primary_storage_class) == 1 ? contains(["AFTER_1_ACCESS"], var.transition_to_primary_storage_class[0]) : length(var.transition_to_primary_storage_class) == 0
)
error_message = "Var `transition_to_primary_storage_class` must either be empty list or \"AFTER_1_ACCESS\"."
}
}
variable "efs_backup_policy_enabled" {
type = bool
description = "If `true`, it will turn on automatic backups."
default = false
}
variable "efs_file_system_policy" {
type = string
description = "EFS policy to attach."
default = ""
}
variable "bypass_policy_lockout_safety_check" {
type = bool
description = "A flag to indicate whether to bypass the `aws_efs_file_system_policy` lockout safety check."
default = false
}
variable "availability_zone_name" {
type = string
description = "AWS Availability Zone in which to create the file system. Used to create a file system that uses One Zone storage classes. If set, a single subnet in the same availability zone should be provided to `subnets`"
default = null
}