-
Notifications
You must be signed in to change notification settings - Fork 15
/
main.tf
64 lines (62 loc) · 2.93 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
## Copyright © 2021, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
############################################
# Jenkins Controller Instance
############################################
module "jenkins-controller" {
source = "./modules/jenkins-controller"
availability_domain = var.controller_ad
compartment_ocid = var.compartment_ocid
controller_display_name = var.controller_display_name
image_id = var.controller_image_id
shape = var.controller_shape
flex_shape_ocpus = var.controller_flex_shape_ocpus
flex_shape_memory = var.controller_flex_shape_memory
label_prefix = var.label_prefix
subnet_id = var.controller_subnet_id
assign_public_ip = var.controller_assign_public_ip
jenkins_version = var.jenkins_version
jenkins_password = var.jenkins_password
http_port = var.http_port
jnlp_port = var.jnlp_port
ssh_authorized_keys = var.ssh_authorized_keys
ssh_private_key = var.ssh_private_key
user_data = var.controller_user_data
plugins = var.plugins
use_bastion_service = var.use_bastion_service
bastion_service_id = var.bastion_service_id
bastion_service_region = var.bastion_service_region
bastion_host = var.bastion_host
bastion_user = var.bastion_user
bastion_private_key = var.bastion_private_key
bastion_authorized_keys = var.bastion_authorized_keys
}
############################################
# Jenkins agent Instance(s)
############################################
module "jenkins-agent" {
depends_on = [module.jenkins-controller]
source = "./modules/jenkins-agent"
number_of_agents = var.agent_count
availability_domains = var.agent_ads
compartment_ocid = var.compartment_ocid
agent_display_name = var.agent_display_name
image_id = var.agent_image_id
shape = var.agent_shape
flex_shape_ocpus = var.agent_flex_shape_ocpus
flex_shape_memory = var.agent_flex_shape_memory
label_prefix = var.label_prefix
subnet_ids = var.agent_subnet_ids
jenkins_controller_ip = module.jenkins-controller.private_ip
jenkins_controller_port = var.http_port
jenkins_password = var.jenkins_password
ssh_authorized_keys = var.ssh_authorized_keys
ssh_private_key = var.ssh_private_key
use_bastion_service = var.use_bastion_service
bastion_service_id = var.bastion_service_id
bastion_service_region = var.bastion_service_region
bastion_host = var.bastion_host
bastion_user = var.bastion_user
bastion_private_key = var.bastion_private_key
bastion_authorized_keys = var.bastion_authorized_keys
}