-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
54 lines (48 loc) · 1.49 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
# System variables that have to be set for this example environment:
# - OS_ACCESS_KEY
# - OS_SECRET_KEY
# - OS_DOMAIN_NAME
# - OS_TENANT_NAME or OS_PROJECT_NAME
module "cloud_tracing_service" {
source = "./modules/cloud_tracing_service"
}
module "tls_keypair" {
source = "./modules/ssh_keypair"
stage_name = var.stage_name
context_name = var.context_name
region = var.region
}
module "vpc" {
source = "./modules/vpc"
vpc_cidr = var.vpc_cidr
vpc_name = "vpc-${var.context_name}-${var.stage_name}"
stage_name = var.stage_name
vpc_subnet_cidr = var.vpc_cidr
vpc_subnet_gateway_ip = local.vpc_subnet_gateway_ip
tags = var.tags
region = var.region
}
module "cce_autocreation" {
source = "./modules/cce_auto_creation"
project = data.opentelekomcloud_identity_project_v3.otc_project.name
}
module "cce" {
depends_on = [
module.cce_autocreation]
source = "./modules/cce"
key_pair_id = module.tls_keypair.keypair_name
stage_name = var.stage_name
subnet_id = module.vpc.subnet_network_id
vpc_flavor_id = var.cce_vpc_flavor_id
vpc_id = module.vpc.vpc_id
vpc_cidr = var.vpc_cidr
nodes = local.node_specs
tags = var.tags
context_name = var.context_name
}
module "loadbalancer" {
source = "./modules/loadbalancer"
stage_name = var.stage_name
subnet_id = module.vpc.subnet_id
context_name = var.context_name
}