terraform-codedeploy icon indicating copy to clipboard operation
terraform-codedeploy copied to clipboard

Call to function "list" failed: the "list" function was deprecated in Terraform v0.12

Open kenotsolutions opened this issue 4 years ago • 0 comments

terraform plan gives below error. required_version = ">= 0.15.4"

Error: Error in function call │ │ on .terraform/modules/codedeploy/app/codedeploy.tf line 59, in resource "aws_iam_policy" "deployer_policy": │ 59: ${element(formatlist(", { "Effect" : "Allow", "Action" : [ "s3:PutObject*", "s3:ListBucket" ], "Resource" : [ "%s/", "%s" ] }, { "Effect" : "Allow", "Action" : [ "s3:ListAllMyBuckets" ], "Resource" : [ "" ] }", compact(list(var.s3_bucket_arn)), compact(list(var.s3_bucket_arn))), 0)} │ ├──────────────── │ │ var.s3_bucket_arn will be known only after apply │ │ Call to function "list" failed: the "list" function was deprecated in Terraform v0.12 and is no longer │ available; use tolist([ ... ]) syntax to write a literal list. ╵ ╷ │ Error: Error in function call │ │ on .terraform/modules/codedeploy/app/codedeploy.tf line 59, in resource "aws_iam_policy" "deployer_policy": │ 59: ${element(formatlist(", { "Effect" : "Allow", "Action" : [ "s3:PutObject*", "s3:ListBucket" ], "Resource" : [ "%s/", "%s" ] }, { "Effect" : "Allow", "Action" : [ "s3:ListAllMyBuckets" ], "Resource" : [ "" ] }", compact(list(var.s3_bucket_arn)), compact(list(var.s3_bucket_arn))), 0)} │ ├──────────────── │ │ var.s3_bucket_arn will be known only after apply │ │ Call to function "list" failed: the "list" function was deprecated in Terraform v0.12 and is no longer │ available; use tolist([ ... ]) syntax to write a literal list.

kenotsolutions avatar Jul 30 '21 12:07 kenotsolutions