-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathmain.tf
More file actions
33 lines (29 loc) · 993 Bytes
/
main.tf
File metadata and controls
33 lines (29 loc) · 993 Bytes
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
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
provider "aws" {
region = var.aws_region # Change to your desired region
}
module "nexus_instance" {
source = "./ec2_instance"
ami = var.aws_ami # Example AMI ID, replace with your desired AMI
instance_type = var.aws_type # Example instance type, replace with your desired type
instance_name = "nexus"
}
module "sonar_instance" {
source = "./ec2_instance"
ami = var.aws_ami # Example AMI ID, replace with your desired AMI
instance_type = var.aws_type # Example instance type, replace with your desired type
instance_name = "sonar"
}
module "test_instance" {
source = "./ec2_instance"
ami = var.aws_ami # Example AMI ID, replace with your desired AMI
instance_type = var.aws_type # Example instance type, replace with your desired type
instance_name = "test"
}