如何修复Terraform中标签的属性值类型错误?

问题描述

尝试将terraform代码从0.11升级到0.12.29时,我遇到了以下属性错误

任何人都可以帮助我解决以下错误

错误

Error: Incorrect attribute value type

  on ../../asg.tf line 68,in resource "aws_autoscaling_group" "asg":
  68:   tags = concat( 

Inappropriate value for attribute "tags": element 18: map of string required.

0.11代码

tags = ["${concat( 
    list(
      map("key","Name","value","${lookup(var.common,"Name")}","propagate_at_launch",true),map("key","Project","project")}",true)
      ),var.asgcustomtags)
}"]

0.12代码

tags = concat( 
    [
      {"key" = "Name","value" = "${lookup(var.common,"propagate_at_launch" = true},{"key" = "Project",],var.asgcustomtags,)

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)