-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
28 lines (20 loc) · 794 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
locals {
create_ecr_repository_policy = "${var.ecr_repository_policy == "" ? false : true}"
create_ecr_lifecycle_policy = "${var.ecr_lifecycle_policy == "" ? false : true}"
}
module "ecr_repository" {
source = "./modules/ecr_repository"
name = "${var.identifier}"
}
module "ecr_repository_policy" {
source = "./modules/ecr_repository_policy"
create = "${local.create_ecr_repository_policy}"
repository = "${module.ecr_repository.this_ecr_repository_name}"
policy = "${var.ecr_repository_policy}"
}
module "ecr_lifecycle_policy" {
source = "./modules/ecr_lifecycle_policy"
create = "${local.create_ecr_lifecycle_policy}"
repository = "${module.ecr_repository.this_ecr_repository_name}"
policy = "${var.ecr_lifecycle_policy}"
}