-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
44 lines (37 loc) · 904 Bytes
/
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
provider "azurerm" {
features {}
}
variable "env_name" {
type = string
}
variable "redis_capacity" {
type = number
}
locals {
default_tags = {
owner = "[email protected]"
createdBy = "[email protected]"
squad = "infra"
}
}
resource "azurerm_resource_group" "this" {
name = "${var.env_name}-rg"
location = "West US 2"
tags = local.default_tags
}
resource "azurerm_redis_cache" "this" {
name = "${var.env_name}-cache"
location = azurerm_resource_group.this.location
resource_group_name = azurerm_resource_group.this.name
capacity = var.redis_capacity
family = "C"
sku_name = "Standard"
enable_non_ssl_port = false
minimum_tls_version = "1.2"
redis_configuration {
}
tags = local.default_tags
}
output "redis_name" {
value = azurerm_redis_cache.this.name
}