-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
52 lines (42 loc) · 1.27 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
provider "aws" {
shared_config_files = ["~/.aws/config"]
shared_credentials_files = ["~/.aws/credentials"]
}
module "vpc" {
source = "./modules/vpc"
}
module "subnet" {
source = "./modules/subnet"
vpc_id = module.vpc.fis_vpc_id
}
module "security_group" {
source = "./modules/security_group"
fis_vpc_id = module.vpc.fis_vpc_id
}
module "network_interface" {
source = "./modules/network_interface"
subnet_id = module.subnet.subnet_id
web_server_sg_id = module.security_group.web_server_sg_id
}
module "ec2_instances" {
source = "./modules/ec2_instances"
aeis_network_interface_id = module.network_interface.aeis_network_interface_id
aeis_network_interface_private_ips = module.network_interface.aeis_network_interface_private_ips
depends_on = [ module.network_interface ]
}
module "ecr" {
source = "./modules/ecr"
}
output "public_ip" {
value = module.ec2_instances.public_aeis_ip
description = "Public IP of the EC2 instance"
}
output "private_ip" {
value = module.ec2_instances.private_aeis_ip
description = "Private IP of the EC2 instance"
}
output "url_ecr_repository_aeis" {
value = module.ecr.url_ecr_repository_aeis
description = "URL of the ECR repository"
}
# Deber: que todo tenga un nombre