-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
75 lines (63 loc) · 2.21 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
variable "region" {
type = string
default = "eu-de"
description = "Region in which to create the cloud resources."
}
variable "context_name" {
type = string
description = "Short descriptive, readable label of the project you are working on. Is utilized as a part of resource names."
}
variable "stage_name" {
default = "dev"
type = string
description = "Utilized to distinguish separate, but mostly equal environments within the same project. Usually dev, test, qa, prod."
}
variable "vpc_cidr" {
default = "192.168.0.0/16"
type = string
}
variable "vpc_subnet_gateway_ip" {
default = null
type = string
description = "Can be set to specify the exact IP address of the gateway. By default it will just use the first IP address in the subnet cidr"
}
variable "cce_node_spec" {
default = "s3.large.4"
type = string
description = "See https://open-telekom-cloud.com/en/prices/price-calculator for information about virtual machine flavors (ECS) and associated prices."
}
variable "cce_vpc_flavor_id" {
default = "cce.s1.small"
description = "See https://open-telekom-cloud.com/en/prices/price-calculator for information about vpc flavors and associated prices."
}
variable "tags" {
type = map(string)
description = "Key/Value pairs with the tags to associate with created resources."
default = {
managedWith = "Terraform"
moduleProvidedBy = "iits"
}
}
variable "cce_version" {
type = string
default = null
description = "Set this to a specific kubernetes version if you do not want the newest one."
}
variable "otc_project_name" {
type = string
default = "eu-de"
description = "Name of the Project in which the resources should be created. See IAM -> projects."
}
data "opentelekomcloud_identity_project_v3" "otc_project" {
name = var.otc_project_name
}
variable "cce_node_count" {
type = number
default = 2
description = "The number of worker nodes in the Kubernetes cluster."
}
locals {
node_specs = [for i in range(var.cce_node_count + 1) :
var.cce_node_spec]
vpc_subnet_gateway_ip = var.vpc_subnet_gateway_ip == null ? cidrhost(var.vpc_cidr, 1) : var.vpc_subnet_gateway_ip
}