@@ -372,6 +372,7 @@ module "db_proxy" {
372
372
373
373
module "proxy_dot_env" {
374
374
source = " ../modules/commons/dot_env"
375
+ count = var. aws_aurora_proxy ? 1 : var. aws_db_proxy_enable ? 1 : var. aws_rds_db_proxy ? 1 : 0
375
376
filename = " proxy.env"
376
377
content = join (" \n " ,[try (module. db_proxy_aurora [0 ]. proxy_dot_env ," " ),try (module. db_proxy_rds [0 ]. proxy_dot_env ," " ),try (module. db_proxy [0 ]. proxy_dot_env ," " )])
377
378
depends_on = [ module . db_proxy_aurora ,module . db_proxy_rds ,module . db_proxy_rds ]
@@ -529,37 +530,37 @@ module "aws_route53_ecs" {
529
530
}
530
531
}
531
532
532
- # module "aws_ecr" {
533
- # source = "../modules/aws/ecr"
534
- # count = var.aws_ecr_repo_create ? 1 : 0
535
- # # ECR
536
- # aws_ecr_repo_type = var.aws_ecr_repo_type
537
- # aws_ecr_repo_name = var.aws_ecr_repo_name
538
- # aws_ecr_repo_mutable = var.aws_ecr_repo_mutable
539
- # aws_ecr_repo_encryption_type = var.aws_ecr_repo_encryption_type
540
- # aws_ecr_repo_encryption_key_arn = var.aws_ecr_repo_encryption_key_arn
541
- # aws_ecr_repo_force_destroy = var.aws_ecr_repo_force_destroy
542
- # aws_ecr_repo_image_scan = var.aws_ecr_repo_image_scan
543
- # aws_ecr_registry_scan_rule = var.aws_ecr_registry_scan_rule
544
- # aws_ecr_registry_pull_through_cache_rules = var.aws_ecr_registry_pull_through_cache_rules
545
- # aws_ecr_registry_scan_config = var.aws_ecr_registry_scan_config
546
- # aws_ecr_registry_replication_rules_input = var.aws_ecr_registry_replication_rules_input
547
- # aws_ecr_repo_policy_attach = var.aws_ecr_repo_policy_attach
548
- # aws_ecr_repo_policy_create = var.aws_ecr_repo_policy_create
549
- # aws_ecr_repo_policy_input = var.aws_ecr_repo_policy_input
550
- # aws_ecr_repo_read_arn = var.aws_ecr_repo_read_arn
551
- # aws_ecr_repo_write_arn = var.aws_ecr_repo_write_arn
552
- # aws_ecr_repo_read_arn_lambda = var.aws_ecr_repo_read_arn_lambda
553
- # aws_ecr_lifecycle_policy_input = var.aws_ecr_lifecycle_policy_input
554
- # aws_ecr_public_repo_catalog = var.aws_ecr_public_repo_catalog
555
- # aws_ecr_registry_policy_input = var.aws_ecr_registry_policy_input
556
- # # Others
557
- # aws_resource_identifier = var.aws_resource_identifier
558
- #
559
- # providers = {
560
- # aws = aws.ecr
561
- # }
562
- # }
533
+ module "aws_ecr" {
534
+ source = " ../modules/aws/ecr"
535
+ count = var. aws_ecr_repo_create ? 1 : 0
536
+ # ECR
537
+ aws_ecr_repo_type = var. aws_ecr_repo_type
538
+ aws_ecr_repo_name = var. aws_ecr_repo_name
539
+ aws_ecr_repo_mutable = var. aws_ecr_repo_mutable
540
+ aws_ecr_repo_encryption_type = var. aws_ecr_repo_encryption_type
541
+ aws_ecr_repo_encryption_key_arn = var. aws_ecr_repo_encryption_key_arn
542
+ aws_ecr_repo_force_destroy = var. aws_ecr_repo_force_destroy
543
+ aws_ecr_repo_image_scan = var. aws_ecr_repo_image_scan
544
+ aws_ecr_registry_scan_rule = var. aws_ecr_registry_scan_rule
545
+ aws_ecr_registry_pull_through_cache_rules = var. aws_ecr_registry_pull_through_cache_rules
546
+ aws_ecr_registry_scan_config = var. aws_ecr_registry_scan_config
547
+ aws_ecr_registry_replication_rules_input = var. aws_ecr_registry_replication_rules_input
548
+ aws_ecr_repo_policy_attach = var. aws_ecr_repo_policy_attach
549
+ aws_ecr_repo_policy_create = var. aws_ecr_repo_policy_create
550
+ aws_ecr_repo_policy_input = var. aws_ecr_repo_policy_input
551
+ aws_ecr_repo_read_arn = var. aws_ecr_repo_read_arn
552
+ aws_ecr_repo_write_arn = var. aws_ecr_repo_write_arn
553
+ aws_ecr_repo_read_arn_lambda = var. aws_ecr_repo_read_arn_lambda
554
+ aws_ecr_lifecycle_policy_input = var. aws_ecr_lifecycle_policy_input
555
+ aws_ecr_public_repo_catalog = var. aws_ecr_public_repo_catalog
556
+ aws_ecr_registry_policy_input = var. aws_ecr_registry_policy_input
557
+ # Others
558
+ aws_resource_identifier = var. aws_resource_identifier
559
+
560
+ providers = {
561
+ aws = aws.ecr
562
+ }
563
+ }
563
564
564
565
module "eks" {
565
566
source = " ../modules/aws/eks"
@@ -824,6 +825,16 @@ output "redis_sg_id" {
824
825
value = try (module. redis [0 ]. redis_sg_id ,null )
825
826
}
826
827
828
+ # ECR
829
+
830
+ output "ecr_repository_arn" {
831
+ value = try (module. aws_ecr [0 ]. repository_arn ,null )
832
+ }
833
+
834
+ output "ecr_repository_url" {
835
+ value = try (module. aws_ecr [0 ]. repository_url ,null )
836
+ }
837
+
827
838
# EKS
828
839
output "eks_cluster_name" {
829
840
value = try (module. eks [0 ]. aws_eks_cluster_name ,null )
0 commit comments