我正在尝试组合两个列表并将其设置为资源的属性,但出现错误。这是最小的复制:
network_configuration {
security_groups = "${concat([module.service_base.allow_lb_access_sg], [module.service_base.intraservice_communication_sg])}"
}
我收到一个超级无用的错误
错误:加载模块时出错:模块 load_balanced_service:加载 .terraform/modules/188cf031fdce92d75131be4747cedad9/XXX.tf 时出错:读取 aws_ecs_service[ecs_service] 的配置时出错:在 1:10 解析错误:预期表达式但找到“[”
它声称第 1 行,但如果您删除该 security_groups 行,一切正常。