-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
93 lines (79 loc) · 4.31 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
variable "cloud_project_id" {
description = "The Google Cloud Project ID where resources will be created"
type = string
}
variable "automq_byoc_env_id" {
description = "The unique identifier of the AutoMQ environment. This parameter is used to create resources within the environment. Additionally, all cloud resource names will incorporate this parameter as part of their names. This parameter supports only numbers, uppercase and lowercase English letters, and hyphens. It must start with a letter and is limited to a length of 32 characters."
type = string
validation {
condition = can(regex("^[a-zA-Z][a-zA-Z0-9-]{0,31}$", var.automq_byoc_env_id)) && !can(regex("_", var.automq_byoc_env_id))
error_message = "The environment_id must start with a letter, can only contain alphanumeric characters and hyphens, cannot contain underscores, and must be 32 characters or fewer."
}
}
variable "cloud_provider_region" {
description = "Set the Google Cloud region. AutoMQ will deploy to this region."
type = string
}
variable "cloud_provider_zone" {
description = "Set the Google Cloud zone. AutoMQ will deploy to this zone."
type = string
}
variable "create_new_vpc" {
description = "This setting determines whether to create a new VPC. If set to true, a new VPC will be automatically created, which is recommended only for POC scenarios. For production scenarios using AutoMQ, you should provide the VPC where the current Kafka application resides."
type = bool
default = true
}
variable "existing_vpc_name" {
description = "When the create_new_vpc parameter is set to false, specify an existing VPC name where AutoMQ will be deployed."
type = string
default = ""
}
variable "existing_subnet_name" {
description = "When the create_new_vpc parameter is set to false, specify an existing subnet name for deploying the AutoMQ BYOC environment console."
type = string
default = ""
}
variable "automq_byoc_env_console_cidr" {
description = "Set CIDR block to restrict the source IP address range for accessing the AutoMQ environment console. If not set, the default is 0.0.0.0/0."
type = string
default = "0.0.0.0/0"
}
variable "automq_byoc_data_bucket_name" {
description = "Set the existed GCS bucket used to store message data generated by applications. If this parameter is not set, a new GCS bucket will be automatically created. The message data Bucket must be separate from the Ops Bucket."
type = string
default = ""
}
variable "automq_byoc_ops_bucket_name" {
description = "Set the existed GCS bucket used to store AutoMQ system logs and metrics data for system monitoring and alerts. If this parameter is not set, a new GCS bucket will be automatically created. This Bucket does not contain any application business data."
type = string
default = ""
}
variable "automq_byoc_machine_type" {
description = "Set the Compute Engine machine type; this parameter is used only for deploying the AutoMQ environment console. You need to provide a machine type with at least 2 cores and 8 GB of memory."
type = string
default = "e2-standard-2" # GCP equivalent of t3.large
}
variable "automq_byoc_env_version" {
description = "Set the version for the AutoMQ BYOC environment console. It is recommended to keep the default value, which is the latest version."
type = string
default = "1.4.0"
}
variable "use_custom_image" {
description = "The parameter defaults to false, which means a specific custom image is not specified. If you wish to use a custom image, set this parameter to true and specify the automq_byoc_env_console_image parameter."
type = bool
default = false
}
variable "automq_byoc_env_console_image" {
description = "When the use_custom_image parameter is set to true, this parameter must be set with a custom image name to deploy the AutoMQ console."
type = string
default = ""
}
variable "automq_byoc_default_deploy_type" {
description = "Set the default deployment type for the AutoMQ BYOC environment. Currently, only 'k8s' is supported."
validation {
condition = var.automq_byoc_default_deploy_type == "k8s"
error_message = "Currently, only 'k8s' is supported for automq_byoc_default_deploy_type."
}
type = string
default = "k8s"
}