forked from bhegazy/terraform-aws-apprunner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
179 lines (153 loc) · 6.57 KB
/
variables.tf
File metadata and controls
179 lines (153 loc) · 6.57 KB
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
173
174
175
176
177
178
179
variable "create" {
description = "Controls if App Runner resources should be created"
type = bool
default = true
}
variable "service_name" {
description = "App Runner service name"
type = string
default = ""
}
variable "auto_deployments_enabled" {
description = "Whether continuous integration from the source repository is enabled for the App Runner service. Defaults to true."
type = bool
default = true
}
variable "service_source_type" {
description = "The service source type, valid values are 'code' or 'image'"
type = string
default = "image"
validation {
condition = contains(["image", "code"], var.service_source_type)
error_message = "Valid values for var: service_source_type are image, code."
}
}
variable "vpc_connector_arn" {
description = "The ARN of the VPC connector to use for the App Runner service"
type = string
default = ""
}
variable "health_check_configuration" {
description = "The health check configuration for the App Runner service"
type = map(string)
default = {}
}
variable "instance_configuration" {
description = "The instance configuration for the App Runner service"
type = map(string)
default = {}
}
variable "auto_scaling_configuration_arn" {
description = "The ARN of auto scaling configuration for the App Runner service"
type = string
default = ""
}
variable "kms_key_arn" {
description = "The ARN of the custom KMS key to be used to encrypt the copy of source repository and service logs. By default, App Runner uses an AWS managed CMK"
type = string
default = ""
}
#variable "custom_domain_name" {
# description = "The custom domain endpoint to association. Specify a base domain e.g., example.com or a subdomain e.g., subdomain.example.com."
# type = string
# default = ""
#}
#
#variable "enable_www_subdomain" {
# description = "Whether to associate the subdomain with the App Runner service in addition to the base domain. Defaults to true"
# type = bool
# default = true
#}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
################################################################################
# service_source_type == "image"
################################################################################
variable "image_repository_type" {
type = string
description = "The type of the image repository. This reflects the repository provider and whether the repository is private or public. Defaults to ECR"
default = "ECR"
validation {
condition = contains(["ECR", "ECR_PUBLIC"], var.image_repository_type)
error_message = "Valid values for var: image_repository_type are ECR, ECR_PUBLIC."
}
}
variable "image_identifier" {
description = "The identifier of an image. For an image in Amazon Elastic Container Registry (Amazon ECR), this is an image name."
type = string
default = ""
}
variable "image_configuration" {
description = "Configuration for running the identified image. Supports runtime_environment_secrets for secret environment variables."
type = any
default = {}
}
variable "image_access_role_arn" {
type = string
description = "The access role ARN to use for the App Runner service if the service_source_type is 'image' and image_repository_type is not 'ECR_PUBLIC'"
default = ""
}
################################################################################
# service_source_type == "code"
################################################################################
variable "code_repository_url" {
description = "The location of the repository that contains the source code. This is required for service_source_type 'code'"
type = string
default = ""
}
variable "code_version_type" {
description = "The type of version identifier. For a git-based repository, branches represent versions. Valid values: BRANCH"
type = string
default = "BRANCH"
validation {
condition = contains(["BRANCH"], var.code_version_type)
error_message = "Valid values for var: code_version_type are BRANCH."
}
}
variable "code_version_value" {
description = "A source code version. For a git-based repository, a branch name maps to a specific version. App Runner uses the most recent commit to the branch."
type = string
default = "main"
}
variable "code_configuration_source" {
description = "The source of the App Runner configuration. Valid values: REPOSITORY, API"
type = string
default = "REPOSITORY"
validation {
condition = contains(["API", "REPOSITORY"], var.code_configuration_source)
error_message = "Valid values for var: code_configuration_source are API, REPOSITORY."
}
}
variable "code_configuration_values" {
description = "Basic configuration for building and running the App Runner service. Supports runtime_environment_secrets for secret environment variables. Use this parameter to quickly launch an App Runner service without providing an apprunner.yaml file in the source code repository (or ignoring the file if it exists). "
type = any
default = {}
}
variable "code_connection_arn" {
type = string
description = "The connection ARN to use for the App Runner service if the service_source_type is 'code'"
default = ""
}
variable "is_publicly_accessible" {
description = "Specifies whether your App Runner service is publicly accessible. To make the service publicly accessible set it to true. To make the service privately accessible, from only within an Amazon VPC set it to false."
type = bool
default = true
}
variable "ip_address_type" {
description = "App Runner provides you with the option to choose between Internet Protocol version 4 (IPv4) and dual stack (IPv4 and IPv6) for your incoming public network configuration. Valid values: IPV4, DUAL_STACK. Default: IPV4."
type = string
default = "IPV4"
}
variable "observability_enabled" {
description = "When true, an observability configuration resource is associated with the service."
type = bool
default = false
}
variable "observability_configuration_arn" {
description = "ARN of the observability configuration that is associated with the service. Specified only when observability_enabled is true."
type = string
default = ""
}