Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kenotsolutions opened this issue Jul 30, 2021 · 0 comments

Comments

@kenotsolutions
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant