generated from ExamProCo/terraform-beginner-bootcamp-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
66 lines (58 loc) · 1.54 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
57
58
59
60
61
62
63
64
65
66
terraform{
required_providers {
terratowns = {
source = "local.providers/local/terratowns"
version = "1.0.0"
}
}
# backend "remote" {
# hostname = "app.terraform.io"
# organization = "Vidyaa"
# workspaces {
# name = "Terra-Clicks"
# }
# }
cloud {
organization = "Vidyaa"
workspaces {
name = "Terra-Clicks"
}
}
}
provider "terratowns" {
endpoint = var.terratowns_endpoint
user_uuid = var.teacherseat_user_uuid
token = var.terratowns_access_token
}
module "home_snakes_hosting" {
source = "./modules/terrahouse_aws"
user_uuid = var.teacherseat_user_uuid
public_path = var.snakes.public_path
content_version = var.snakes.content_version
}
resource "terratowns_home" "home" {
name = "How to play Snakes & Ladder!"
description = <<DESCRIPTION
One hundred squares full of traps and tricks… Roll the dice and try your luck!
Ladders will take you up but Snakes will take you down!
DESCRIPTION
domain_name = module.home_snakes_hosting.domain_name
town = "missingo"
content_version = var.snakes.content_version
}
# Secound house resource
module "home_cakes_hosting" {
source = "./modules/terrahouse_aws"
user_uuid = var.teacherseat_user_uuid
public_path = var.cakes.public_path
content_version = var.cakes.content_version
}
resource "terratowns_home" "home_cakes" {
name = "A.R. Rahman Live in Concert"
description = <<DESCRIPTION
Music Madness!!
DESCRIPTION
domain_name = module.home_cakes_hosting.domain_name
town = "melomaniac-mansion"
content_version = var.cakes.content_version
}