-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
55 lines (44 loc) · 1.59 KB
/
main.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
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
resource "google_redis_instance" "default" {
depends_on = [module.enable_apis]
project = var.project
name = var.name
tier = var.tier
memory_size_gb = var.memory_size_gb
connect_mode = var.connect_mode
region = var.region
location_id = var.location_id
alternative_location_id = var.alternative_location_id
authorized_network = var.authorized_network
redis_version = var.redis_version
redis_configs = var.redis_configs
display_name = var.display_name
reserved_ip_range = var.reserved_ip_range
labels = var.labels
auth_enabled = var.auth_enabled
transit_encryption_mode = var.transit_encryption_mode
}
module "enable_apis" {
source = "terraform-google-modules/project-factory/google//modules/project_services"
version = "~> 11.0"
project_id = var.project
enable_apis = var.enable_apis
disable_services_on_destroy = false
activate_apis = [
"redis.googleapis.com",
]
}