-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
140 lines (115 loc) · 3.56 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
#
# Common
#
variable "project" {
description = "GCP project in which to create the resources."
type = string
}
variable "region" {
description = "GCP region in which to create the resources."
type = string
}
#
# Network
#
variable "create_network" {
description = "Flag indicating whether to create the VPC network (true by default). Set to false if you want to use an existing one."
type = bool
default = true
}
variable "network_name" {
description = "Name of the VPC network in which to create the Grafana CloudSQL database instance."
type = string
default = "grafana-network"
}
variable "create_subnetwork" {
description = "Flag indicating whether to create the subnetwork (true by default). Set to false if you want to use an existing one."
type = bool
default = true
}
variable "subnetwork_name" {
description = "Name of the subnetwork in which to create the Grafana CloudSQL database instance."
type = string
default = "grafana-subnet"
}
variable "subnetwork_ip_cidr_range" {
description = "IP range of the subnetwork."
type = string
default = "10.132.0.0/29"
}
#
# Serverless VPC Access connector
#
variable "create_serverless_vpc_access_connector" {
description = "Flag indicating whether to create the Serverless VPC Access connector (true by default). Set to false if you want to use an existing one. In that case, note that the connector must be in the same region as the Cloud SQL database instance."
type = bool
default = true
}
variable "serverless_vpc_access_connector_name" {
description = "Name of the Serverless VPC Access connector."
type = string
default = "grafana-vpc-access"
}
variable "serverless_vpc_access_connector_ip_cidr_range" {
description = "IP range to use for the Serverless VPC Access connector (must be a /28)."
type = string
default = "10.8.0.0/28"
}
#
# Database
#
variable "database_instance_name" {
description = "Name of the CloudSQL database instance (a random suffix will be added)."
type = string
default = "grafana-db"
}
variable "database_machine_type" {
description = "The machine type to use for the CloudSQL database."
type = string
default = "db-f1-micro"
}
variable "database_disk_type" {
description = "The disk type to use for the CloudSQL database."
type = string
default = "PD_HDD"
}
#
# Service account
#
variable "service_account_name" {
description = "Name of the service account used by the Grafana Cloud Run service."
type = string
default = "grafana-sa"
}
#
# Cloud Run service
#
variable "cloud_run_service_name" {
description = "Name of the Cloud Run service."
type = string
default = "grafana"
}
variable "cloud_run_service_docker_image" {
description = "Docker image to use in the Cloud Run service."
type = string
default = "marketplace.gcr.io/google/grafana6"
}
variable "cloud_run_max_instances" {
description = "Maximum number of instances for the Cloud Run service."
type = number
default = 1
}
variable "cloud_run_service_cpu_limit" {
description = "Number of vCPUs allocated to each container instance of the Cloud Run service."
type = string
default = "1000m"
}
variable "cloud_run_service_memory_limit" {
description = "Memory to allocate to each container instance of the Cloud Run service."
type = string
default = "256Mi"
}
variable "grafana_admin_password" {
description = "Grafana admin password."
type = string
}