-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
52 lines (43 loc) · 1.08 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
locals {
common_tags = {
Application = var.application_name
Environment = var.environment
}
}
terraform {
required_version = ">= 1.0"
backend "remote" {
hostname = "app.terraform.io"
organization = "hechaorganization"
workspaces {
name = "personal-website-infra"
}
}
required_providers {
aws = {
source = "hashicorp/aws"
version = "4.49.0"
}
}
}
provider "aws" {
region = var.region
default_tags {
tags = local.common_tags
}
}
module "infrastructure" {
source = "./modules/infra"
acm_certificate_arn = var.acm_certificate_arn
domain_name = var.domain_name
route53_zone_id = var.route53_zone_id
region = var.region
tags = local.common_tags
bucket_suffix = var.bucket_suffix
}
module "iam" {
source = "./modules/security"
bucket_arn = module.infrastructure.bucket_arn
cloudfront_distribution_arn = module.infrastructure.cloudfront_distribution_arn
tags = local.common_tags
}