如何将数组参数传递给terraform中的天蓝色臂模板部署?

时间:2019-02-21 13:04:45

标签: terraform arm-template azure-template terraform-template-file

I want to send array values to arm template for terraform template deployment

手臂模板:-

"databases": {
        "type" : "array"
    }

我尝试在terraform中使用map和list,但是没有这样做。 Terraform模板:-

variable "sql_database_name" {
    type="map"
    default={
        "name"="terraformtestdb"
        "collation" = "SQL_Latin1_General_CP1_CI_AS"
           "edition" = "Basic"
                  "tier" = "Basic"
                   "maxSize" = "1073741824"
                  "userName" = "admin"
                   "userPassword" = "MRK836Cu8"
                   "userRoles" = "db_datareader"
    }
}

尝试以下语法

"databases" = "${var.sql_database_name["name"]}"--map 
"databases" = "${var.sql_database_name[0]}"--list

请帮助我。

0 个答案:

没有答案