-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
172 lines (143 loc) · 5.4 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
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
# Shared variables
variable "name" {
description = "(Optional) Name to be used on all resources as prefix. Defaults to 'default'"
type = string
default = "default"
}
variable "environment" {
description = "(Optional) Determines environment flag to be used. Default to dev"
type = string
default = "dev"
validation {
condition = var.environment == "dev" || var.environment == "prod" || var.environment == "staging"
error_message = "Environment name must be either dev, prod or staging"
}
}
# VPC variables
variable "cidr_block" {
description = "(Required) The CIDR block for the VPC. Default 10.0.0.0/16"
type = string
default = "10.0.0.0/16"
validation {
condition = can(cidrhost(var.cidr_block, 32))
error_message = "Must be valid IPv4 CIDR."
}
}
variable "enable_dns_hostnames" {
description = "(Optional) A boolean flag to enable/disable DNS hostnames in the VPC. Defaults true."
type = bool
default = true
}
variable "enable_dns_support" {
description = "(Optional) A boolean flag to enable/disable DNS support in the VPC. Defaults to true."
type = bool
default = true
}
variable "max_subnet_length" {
description = "Maximum number of Subnets. Defaults to 3"
type = number
default = 3
}
# S3
variable "bucket" {
description = "(Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name."
type = string
default = null
}
variable "force_destroy" {
description = "(Optional) A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Default to False"
type = bool
default = false
}
variable "versioning" {
description = "(Optional) Map containing versioning configuration. Defaults to true with MFA disabled."
type = map(string)
default = {
enabled = true
}
}
variable "replication_configuration" {
description = "Map containing cross-region replication configuration."
type = any
default = {}
}
variable "cors_rule" {
description = "List of maps containing rules for Cross-Origin Resource Sharing."
type = any
default = []
}
variable "engine" {
description = "The name of the database engine to be used for this DB cluster. Defaults to `aurora`. Valid Values: `aurora`, `aurora-mysql`, `aurora-postgresql`"
type = string
default = null
}
variable "engine_mode" {
description = "The database engine mode. Valid values: `global`, `multimaster`, `parallelquery`, `provisioned`, `serverless`. Defaults to: `provisioned`"
type = string
default = "provisioned"
}
variable "storage_encrypted" {
description = "Specifies whether the DB cluster is encrypted. The default is `true`"
type = bool
default = true
}
variable "subnets" {
description = "List of subnet IDs used by database subnet group created"
type = list(string)
default = []
}
variable "allocated_storage" {
description = "The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster. (This setting is required to create a Multi-AZ DB cluster)"
type = number
default = null
}
variable "database_name" {
description = "Name for an automatically created database on cluster creation"
type = string
default = null
}
variable "db_cluster_instance_class" {
description = "The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example db.m6g.xlarge. Not all DB instance classes are available in all AWS Regions, or for all database engines"
type = string
default = null
}
variable "enable_global_write_forwarding" {
description = "Whether cluster should forward writes to an associated global cluster. Applied to secondary clusters to enable them to forward writes to an `aws_rds_global_cluster`'s primary cluster"
type = bool
default = null
}
variable "engine_version" {
description = "The database engine version. Updating this argument results in an outage"
type = string
default = null
}
variable "manage_master_user_password" {
description = "Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if `master_password` is provided"
type = bool
default = true
}
variable "master_user_secret_kms_key_id" {
description = "The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key"
type = string
default = null
}
variable "port" {
description = "The port on which the DB accepts connections"
type = string
default = null
}
variable "serverlessv2_scaling_configuration" {
description = "Map of nested attributes with serverless v2 scaling properties. Only valid when `engine_mode` is set to `provisioned`"
type = map(string)
default = {}
}
variable "vpc_security_group_ids" {
description = "List of VPC security groups to associate to the cluster in addition to the security group created"
type = list(string)
default = []
}
variable "db_parameter_group_name" {
description = "The name of the DB parameter group"
type = string
default = null
}