forked from DovnarAlexander/mutlicloud-terraform-demo-vpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
64 lines (57 loc) · 1.47 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
#######################
# Multi-Cloud Variables
#######################
variable "cloud" {
description = "Multi-Cloud: Cloud to deploy in (Azure, AWS or GCP)"
type = string
validation {
condition = contains(["azure", "aws", "gcp"], lower(var.cloud))
error_message = "MultiCloud: Cloud should be on of: AWS, Azure or GCP."
}
}
variable "cloud_location" {
description = "Multi-Cloud: Mapping of cloud regions for multi-cloud."
type = map
}
variable "location" {
description = "Multi-Cloud: Abstract location name"
type = string
}
##################
# Common variables
##################
variable "name" {
description = "Common: Resources name"
type = string
}
variable "environment" {
description = "Common: Environment name"
type = string
}
variable "vpc_cidr" {
description = "Common: VPC CIDR"
type = string
validation {
condition = can(cidrhost(var.vpc_cidr, 1))
error_message = "CIDR should be valid."
}
}
variable "subnet_cidr" {
description = "Common: Subnet CIDR"
type = string
validation {
condition = can(cidrhost(var.subnet_cidr, 1))
error_message = "CIDR should be valid."
}
}
variable "tags" {
description = "Common: Mapping of tags being associated with the resources"
type = map(string)
}
###############
# GCP variables
###############
variable "gcp_project" {
description = "GCP: Google Cloud Platform project name"
type = string
}