forked from tenable/KaiMonkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
48 lines (43 loc) · 1.04 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
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.11"
}
}
}
provider "aws" {
region = var.region
}
module "network" {
source = "./modules/network"
environment = var.environment
default_tags = var.default_tags
}
module "storage" {
source = "./modules/storage"
private_subnet = module.network.private_subnet
vpc_id = module.network.vpc_id
environment = var.environment
default_tags = var.default_tags
db_username = var.db_username
db_password = var.db_password
}
module "compute" {
source = "./modules/compute"
environment = var.environment
region = var.region
elb_target_group_arn = module.network.target_lb_group_arn
private_subnet = module.network.private_subnet
public_subnet = module.network.public_subnet
elb_sg = module.network.target_lb_security_group
elb_url = module.network.elb_url
}
resource "local_file" "web-access" {
content = <<JSON
{
"fqdn": "${module.network.elb_url}"
}
JSON
filename = "./web-access.json"
}