Skip to content

Commit

Permalink
passing app_name to inner modules
Browse files Browse the repository at this point in the history
  • Loading branch information
raanan245 committed Oct 28, 2021
1 parent ed44736 commit 63ba48b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module "code-pipeline" {
code_deploy_applications = [module.code-deploy.attributes.name]
trigger_branch = var.trigger_branch
trigger_events = ["push", "merge"]
app_name = var.app_name
depends_on = [
aws_s3_bucket.codepipeline_bucket,
]
Expand All @@ -27,14 +28,14 @@ module "code-build" {
privileged_mode = true
environment_variables_parameter_store = var.environment_variables_parameter_store
environment_variables = merge(var.environment_variables, { APPSPEC = templatefile("${path.module}/templates/appspec.json.tpl", { yoyo = "yo" }) }) //TODO: try to replace with file
buildspec_file = templatefile("buildspec.yml.tpl",
{ IMAGE_URI = local.image_uri,
DOCKERFILE_PATH = var.dockerfile_path,
ECR_REPO_URL = var.ecr_repo_url,
ECR_REPO_NAME = var.ecr_repo_name,
TASK_DEF_NAME = var.task_def_name,
ADO_USER = data.aws_ssm_parameter.ado_user.value,
ADO_PASSWORD = data.aws_ssm_parameter.ado_password.value })
buildspec_file = templatefile("buildspec.yml.tpl",
{ IMAGE_URI = local.image_uri,
DOCKERFILE_PATH = var.dockerfile_path,
ECR_REPO_URL = var.ecr_repo_url,
ECR_REPO_NAME = var.ecr_repo_name,
TASK_DEF_NAME = var.task_def_name,
ADO_USER = data.aws_ssm_parameter.ado_user.value,
ADO_PASSWORD = data.aws_ssm_parameter.ado_password.value })

depends_on = [
aws_s3_bucket.codepipeline_bucket,
Expand All @@ -52,6 +53,7 @@ module "code-deploy" {
alb_tg_blue_name = var.alb_tg_blue_name
alb_tg_green_name = var.alb_tg_green_name
ecs_iam_roles_arns = var.ecs_iam_roles_arns
app_name = var.app_name

depends_on = [
aws_s3_bucket.codepipeline_bucket
Expand Down

0 comments on commit 63ba48b

Please sign in to comment.