-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tf
56 lines (46 loc) · 1.17 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
provider "aws" {
region = "us-east-2"
}
terraform {
backend "s3" {
bucket = "660714711582.terraform"
key = "terraform.tfstate"
region = "us-east-2"
}
}
module "network" {
source = "./network"
vpc_cidr = "10.0.0.0/16"
internal_domain = "stf.internal"
dns_resolvers = ["10.0.0.2", "8.8.8.8"]
ssh_ip_addrs = ["99.31.76.144/32"]
reserved_subnet_cidr = "10.0.0.0/24"
sandbox_subnet_cidr = "10.0.1.0/24"
web_subnet_cidr = "10.0.2.0/24"
database_subnet_cidr = "10.0.3.0/24"
gameserver_subnet_cidr = "10.0.4.0/22"
}
resource "aws_dynamodb_table" "tf2_competitive_auth" {
name = "tf2_competitive_auth"
hash_key = "steam_id"
read_capacity = 1
write_capacity = 1
attribute {
name = "steam_id"
type = "S"
}
}
module "gameservers" {
source = "./servers/tf2-competitive"
vpc_id = module.network.vpc_id
security_group_ids = [
module.network.ssh_securitygroup_id
]
ssh_keyname = "backdoor"
subnet_id = module.network.gameserver_subnet_id
instance_size = "c5.large"
use_spot = true
}
module "clean_amis" {
source = "./lambdas/clean_amis"
}