forked from oscar-marroquin/google-cloud-armor-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.tf
24 lines (19 loc) · 702 Bytes
/
vars.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
##################################################################################
# LOCALS
##################################################################################
# Grabbing the Public IP of our Cloud Architect ;)
data "http" "my_public_ip" {
url = "https://ifconfig.co/json"
request_headers = {
Accept = "application/json"
}
}
locals {
ifconfig_co_json = jsondecode(data.http.my_public_ip.body)
}
locals {
env_name = lower(terraform.workspace)
co_name = lower(var.company_name)
biz_name = lower(var.business_unit)
policy_name = "${local.co_name}-${local.biz_name}-${local.env_name}-policy-${random_integer.rand.result}"
}