-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
executable file
·149 lines (122 loc) · 3.95 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
# ================================================================== runners ===
variable "github_app_secrets" {
type = object({
id = string
key = string
})
description = "Object containing `id` and `key` for the GitHub app."
}
variable "github_app_webhook_password" {
type = string
description = "Password for the GitHub app webhook. An empty string implies a randomly generated password."
default = ""
}
variable "github_organization" {
type = string
description = "Name of the GitHub organization."
}
variable "github_organization_runner_enabled" {
type = bool
description = "Toggle to activate runners for all projects in the organization."
default = true
}
variable "runner_ephemeral_mode_enabled" {
type = bool
description = "Toggle to activate ephemeral runners."
default = false
}
variable "runner_binaries_path" {
type = string
description = "Path to the GitHub Action runner binaries saved locally before pushed to S3."
default = ""
}
variable "runner_os" {
type = string
description = "Operating system for the GitHub Action runner."
default = "linux"
}
variable "runner_pool_config" {
type = list(object({
cron = string
tz = optional(string, "America/New_York")
count = number
}))
description = "List of time periods (cron expressions) to maintain a pool of warm runners."
default = []
}
variable "runner_min_running_time" {
type = number
description = "Minimum runtime (in minutes) for an EC2 action runner before termination if idle."
default = 15
}
variable "runner_maximum_count" {
type = number
description = "Maximum number of EC2 action runners."
default = 10
}
variable "runner_labels" {
type = list(string)
description = "Additional labels for the GitHub Action runners."
default = []
}
# ----------------------------------------------------------------- instance ---
variable "docker_logins" {
type = list(object({
user = string
pass = string
server = optional(string, "https://index.docker.io/v1/")
}))
description = "List of Docker auth credentials for Secrets Manager."
default = []
}
# ----------------------------------------------------------------- instance ---
variable "instance_ami_name" {
type = string
description = "Name of the Amazon Machine Image (AMI) for the GitHub Action runner."
default = "al2023-ami-2023.*-kernel-*-x86_64"
}
variable "instance_types" {
type = set(string)
description = "Set of instance types for the action runner."
default = ["m5ad.large", "m5d.large"]
}
variable "instance_lifecycle_type" {
type = string
description = "Lifecycle type for action runner instances. Options: `spot` or `on-demand`."
default = "spot"
validation {
condition = contains(["spot", "on-demand"], lower(var.instance_lifecycle_type))
error_message = "Instance lifecycle type must be either `spot` or `on-demand`."
}
}
# ------------------------------------------------------------------ logging ---
variable "log_retention" {
type = number
description = "Retention period (in days) for logs in CloudWatch."
default = 90
}
# ------------------------------------------------------------------ network ---
variable "vpc_id" {
type = string
description = "VPC ID to deploy example resources into."
}
variable "vpc_subnet_ids" {
type = list(string)
description = "VPC subnet ID to deploy example resources into."
}
# ================================================================== context ===
variable "aws_region_name" {
type = string
description = "AWS region."
default = ""
}
variable "aws_account_id" {
type = string
description = "AWS account ID."
default = ""
}
variable "aws_kv_namespace" {
type = string
description = "Namespace or prefix for AWS SSM parameters and similar resources."
default = ""
}