Difference between revisions of "Error: Invalid function argument (no file exists)"

From wikieduonline
Jump to navigation Jump to search
Line 9: Line 9:
 
  │ configuration source code, so if this file will be created by a resource in this configuration you must instead obtain this result from an
 
  │ configuration source code, so if this file will be created by a resource in this configuration you must instead obtain this result from an
 
  │ attribute of that resource.
 
  │ attribute of that resource.
 +
 +
 +
 +
│ Error: Invalid function argument
 +
 +
│  on .terraform/modules/path_to_tffile.tf line 24, in resource "[[aws_s3_bucket]]" "s3_bucket":
 +
│  24:      for_each = var.s3_static_website_vars == null ? []:[[tolist]](var.s3_static_website_vars)
 +
│    ├────────────────
 +
│    │ var.s3_static_website_vars is object with 4 attributes
 +
 +
│ Invalid value for "v" parameter: [[cannot convert object to list of any single type]].
 
  ╵
 
  ╵
  

Revision as of 16:03, 29 September 2021

╷
│ Error: Invalid function argument
│
│   on main.tf line 626, in data "template_file" "buildspec":
│  626:   template = "${file("buildspec.yaml")}"
│
│ Invalid value for "path" parameter: no file exists at buildspec.yaml; this function works only with files that are distributed as part of the
│ configuration source code, so if this file will be created by a resource in this configuration you must instead obtain this result from an
│ attribute of that resource.
╵
╷
│ Error: Invalid function argument
│
│   on .terraform/modules/path_to_tffile.tf line 24, in resource "aws_s3_bucket" "s3_bucket":
│   24:      for_each = var.s3_static_website_vars == null ? []:tolist(var.s3_static_website_vars)
│     ├────────────────
│     │ var.s3_static_website_vars is object with 4 attributes
│
│ Invalid value for "v" parameter: cannot convert object to list of any single type.
╵


See also

Advertising: