generated from ExamProCo/terraform-beginner-bootcamp-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
44 lines (38 loc) · 933 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
40
41
42
43
44
terraform {
cloud {
organization = "ITCrowd"
workspaces {
name = "terra-house-1"
}
}
required_providers {
terratowns = {
source = "local.providers/local/terratowns"
version = "1.0.0"
}
aws = {
source = "hashicorp/aws"
version = "5.21.0"
}
}
}
provider "terratowns" {
endpoint = var.terratowns_endpoint
user_uuid = var.teacherseat_user_uuid
token=var.terratowns_access_token
}
module "terrahome_aws" {
source = "./modules/terrahome_aws"
for_each = local.homes_path_aws
public_path = each.value.public_path
user_uuid = var.teacherseat_user_uuid
content_version = each.value.content_version
}
resource "terratowns_home" "home" {
for_each = local.homes
name = each.value.name
description = each.value.description
domain_name = each.value.domain_name
town = each.value.town
content_version = each.value.content_version
}