-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
main.tf
68 lines (61 loc) · 2.47 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#------------------------------------------------------------------------------
# Base Infrastructure
#------------------------------------------------------------------------------
module "networking" {
source = "cn-terraform/networking/aws"
version = "2.0.16"
#source = "../terraform-aws-networking"
name_prefix = var.name_prefix
vpc_cidr_block = var.vpc_cidr_block
availability_zones = var.availability_zones
public_subnets_cidrs_per_availability_zone = var.public_subnets_cidrs_per_availability_zone
private_subnets_cidrs_per_availability_zone = var.private_subnets_cidrs_per_availability_zone
}
#------------------------------------------------------------------------------
# Jenkins
#------------------------------------------------------------------------------
module "jenkins" {
source = "cn-terraform/jenkins/aws"
version = "2.0.36"
# source = "../terraform-aws-jenkins"
name_prefix = var.name_prefix
region = var.region
vpc_id = module.networking.vpc_id
public_subnets_ids = module.networking.public_subnets_ids
private_subnets_ids = module.networking.private_subnets_ids
}
#------------------------------------------------------------------------------
# SonarQube
#------------------------------------------------------------------------------
module "sonar" {
source = "cn-terraform/sonarqube/aws"
version = "2.0.55"
# source = "../terraform-aws-sonarqube"
name_prefix = var.name_prefix
region = var.region
vpc_id = module.networking.vpc_id
public_subnets_ids = module.networking.public_subnets_ids
private_subnets_ids = module.networking.private_subnets_ids
enable_ssl = false
lb_https_ports = {}
lb_http_ports = {
default = {
listener_port = 80
target_group_port = 9000
target_group_protocol = "HTTP"
}
}
}
#------------------------------------------------------------------------------
# Nexus
#------------------------------------------------------------------------------
module "nexus" {
source = "cn-terraform/nexus/aws"
version = "2.0.7"
# source = "../terraform-aws-nexus"
name_prefix = var.name_prefix
region = var.region
vpc_id = module.networking.vpc_id
public_subnets_ids = module.networking.public_subnets_ids
private_subnets_ids = module.networking.private_subnets_ids
}