-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
132 lines (110 loc) · 4.39 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
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#########################################
# Solution-Level Variables
#########################################
variable "create_ssh_key_ssm_parameter" {
description = "Boolean flag indicating whether an SSM parameter will be created for an SSH key. If created, it will be defaulted to a value of REPLACE_ME and will need to be updated outside of this module."
type = bool
default = false
}
variable "label_id_order" {
description = "ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique"
type = list(string)
default = ["name", "namespace", "stage"]
}
variable "ssh_key_ssm_parameter_path" {
description = "The SSM parameter path containing a private SSH key for cloning modules from private Git repositories."
type = string
default = "/sce/tf/ssh-key"
}
variable "stage" {
description = "Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release'."
type = string
default = null
}
variable "tags" {
description = "Map of tags to apply to resources deployed by this solution."
type = map(any)
default = null
}
#########################################
# Cloudwatch Variables
#########################################
variable "cloudwatch_log_group_retention" {
description = "Amount of days to keep CloudWatch Log Groups for Lambda functions. 0 = Never Expire"
type = string
default = "0"
validation {
condition = contains(["1", "3", "5", "7", "14", "30", "60", "90", "120", "150", "180", "365", "400", "545", "731", "1827", "3653", "0"], var.cloudwatch_log_group_retention)
error_message = "Valid values for var: cloudwatch_log_group_retention are (1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653, and 0)."
}
}
#########################################
# S3 Variables
#########################################
variable "s3_access_logging_expiration_days" {
description = "The amount of days to retain access logs in the S3 logs bucket"
type = string
default = "365"
}
variable "s3_logs_expiration_days" {
description = "The amount of days to retain solution-related logs in the S3 logs bucket"
type = string
default = "365"
}
variable "s3_force_destroy" {
description = "Set to true if you want to force delete S3 bucket created by this module (including contents of the bucket)"
type = bool
default = false
}
#########################################
# SFN Variables
#########################################
variable "sfn_log_level" {
description = "Defines which category of execution history events are logged. Valid values: ALL, ERROR, FATAL, OFF"
type = string
default = "ALL"
validation {
condition = contains(["ALL", "ERROR", "FATAL", "OFF"], var.sfn_log_level)
error_message = "Valid values for var: sfn_log_level are (true, false)."
}
}
#########################################
# SNS Variable
#########################################
variable "sns_topic_email_addresses" {
description = "The email address to notify about the AWS CodeBuild success or failure"
type = list(string)
default = []
}
#########################################
# VPC Variables
#########################################
variable "vpc_id" {
type = string
description = "VPC ID to use if leveraging an existing VPC for the solution. Otherwise, a VPC will be created as part of deployment."
default = null
}
variable "vpc_private_subnet_ids" {
type = list(string)
description = "Required if `vpc_id` is specified. List of private subnets to use in the provided vpc_id"
default = null
}
variable "vpc_security_group_ids" {
type = list(string)
description = "Required if `vpc_id` is specified. List of security groups to use in the provided vpc_id"
default = null
}
#########################################
# X-Ray Variables
#########################################
variable "x_ray_tracing_enabled" {
description = "When set to true, AWS X-Ray tracing is enabled."
type = bool
default = true
validation {
condition = contains([true, false], var.x_ray_tracing_enabled)
error_message = "Valid values for var: x_ray_tracing_enabled are (true, false)."
}
}