-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
39 lines (34 loc) · 990 Bytes
/
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
# -----------./main.tf-----------
provider "aws" {
region = "${var.aws_region}"
}
terraform {
backend "s3" {
bucket = "terraform-state-musa"
key = "terraform-aws-practice/terraform.tfstate"
region = "us-east-1"
}
}
# Deploy Storage Resources
module "storage" {
source = "./storage"
project_name = "${var.project_name}"
}
# Deploy Networking Resources
module "networking" {
source = "./networking"
vpc_cidr = "${var.vpc_cidr}"
public_cidrs = "${var.public_cidrs}"
accessip = "${var.accessip}"
}
# Deploy Compute Resources
module "compute" {
source = "./compute"
instance_count = "${var.instance_count}"
private_key_name = "${var.private_key_name}"
public_key_path = "${var.public_key_path}"
instance_type = "${var.server_instance_type}"
subnets = "${module.networking.public_subnets}"
security_group = "${module.networking.public_sg}"
subnet_ips = "${module.networking.subnet_ips}"
}