Skip to content

Commit

Permalink
Use versioned terraform modules for batch, elasticache, postgres and …
Browse files Browse the repository at this point in the history
…ecr.
  • Loading branch information
dk-singh committed Sep 11, 2024
1 parent 12602f0 commit dfdadc9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
8 changes: 6 additions & 2 deletions infrastructure/batch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ locals {
}

module "batch_compute" {
source = "../../i-ai-core-infrastructure/modules/batch/batch_compute_environment"
# checkov:skip=CKV_TF_1: We're using semantic versions instead of commit hash
# source = "../../i-ai-core-infrastructure/modules/batch/batch_compute_environment"
source = "git::https://github.com/i-dot-ai/i-dot-ai-core-terraform-modules.git//modules/infrastructure/batch-compute-environment?ref=v1.0.0-batch-compute-environment"
account_id = var.account_id
name = local.name
region = var.region
Expand All @@ -18,7 +20,9 @@ module "batch_compute" {
}

module "batch_job_definition" {
source = "../../i-ai-core-infrastructure/modules/batch/batch_job_definitons"
# checkov:skip=CKV_TF_1: We're using semantic versions instead of commit hash
# source = "../../i-ai-core-infrastructure/modules/batch/batch_job_definitons"
source = "git::https://github.com/i-dot-ai/i-dot-ai-core-terraform-modules.git//modules/infrastructure/batch-job-definitions?ref=v1.0.0-batch-job-definitions"
name = local.name
compute_environment_arn = [module.batch_compute.ec2_compute_environment_arn]
state_bucket = var.state_bucket
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/elasticache.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module "elasticache" {
source = "../../i-ai-core-infrastructure//modules/elasticache"
# checkov:skip=CKV_TF_1: We're using semantic versions instead of commit hash
# source = "../../i-ai-core-infrastructure//modules/elasticache"
source = "git::https://github.com/i-dot-ai/i-dot-ai-core-terraform-modules.git//modules/infrastructure/elasticache?ref=v1.0.0-elasticache"
name = local.name
vpc_id = data.terraform_remote_state.vpc.outputs.vpc_id
private_subnets = data.terraform_remote_state.vpc.outputs.private_subnets
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/postgres/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ locals {
name = "${var.team_name}-${terraform.workspace}-${var.project_name}"
}
module "postgres" {
source = "../../../i-ai-core-infrastructure//modules/postgres"
# checkov:skip=CKV_TF_1: We're using semantic versions instead of commit hash
# source = "../../../i-ai-core-infrastructure//modules/postgres"
source = "git::https://github.com/i-dot-ai/i-dot-ai-core-terraform-modules.git//modules/infrastructure/postgres?ref=v1.0.0-postgres"
kms_secrets_arn = data.terraform_remote_state.platform.outputs.kms_key_arn
name = local.name
db_name = "postgres"
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/universal/ecr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ locals {
}

module "ecr" {
source = "../../../i-ai-core-infrastructure//modules/ecr"
# checkov:skip=CKV_TF_1: We're using semantic versions instead of commit hash
# source = "../../../i-ai-core-infrastructure//modules/ecr"
source = "git::https://github.com/i-dot-ai/i-dot-ai-core-terraform-modules.git//modules/infrastructure/ecr?ref=v1.0.0-ecr"
name = var.project_name
}

0 comments on commit dfdadc9

Please sign in to comment.