Skip to content

v0.4.3

Compare
Choose a tag to compare
@dmattia dmattia released this 24 Oct 00:39
· 89 commits to master since this release
05c5fe1

This can prevent a type mismatch error

Error: Inconsistent conditional result types

  on .terraform/modules/sombra.container_definition/main.tf line 95, in module "definition":
  95:   log_configuration = var.use_cloudwatch_logs ? {
  96:     logDriver = "awslogs"
  97:     options = {
  98:       "awslogs-region"        = var.aws_region
  99:       "awslogs-group"         = aws_cloudwatch_log_group.log_group[0].name
 100:       "awslogs-stream-prefix" = "ecs--${var.name}"
 101:     }
 102:     secretOptions = []
 103:     } : merge(var.log_configuration, {
 104:       secretOptions = concat(var.extra_log_secret_options, [
 105:         for name, outputs in aws_ssm_parameter.secret_log_options :
 106:         {
 107:           name      = name
 108:           valueFrom = outputs.arn
 109:         }
 110:       ])
 111:   })
    |----------------
    | aws_cloudwatch_log_group.log_group[0].name is "prod-one-lb-container-log-group"
    | aws_ssm_parameter.secret_log_options is object with no attributes
    | var.aws_region is "eu-west-1"
    | var.extra_log_secret_options is empty list of object
    | var.log_configuration is null
    | var.name is "prod-one-lb-container"
    | var.use_cloudwatch_logs is true