-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path0.configuration.tf
48 lines (42 loc) · 909 Bytes
/
0.configuration.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
terraform {
required_version = ">= 1.5.2"
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.7.0"
}
}
}
provider "aws" {
profile = local.vars.profile
region = local.vars.region
default_tags {
tags = {
Project = local.vars.project
Environment = local.environment
}
}
}
# Only used to create ACM for cloudfront (because ACM and CloundFront use us-east-1 region)
provider "aws" {
profile = local.vars.profile
alias = "us-east-1"
region = "us-east-1"
default_tags {
tags = {
Project = local.vars.project
Environment = local.environment
}
}
}
locals {
environment = lower(terraform.workspace)
vars = module.envs.env
secrets = merge(
yamldecode(file("secrets/secrets.${local.environment}.yaml"))
)
}
module "envs" {
source = "./envs"
environment = local.environment
}