mihai-satmarean / sciitdevops

1 stars 0 forks source link

Terraform module not working #8

Closed ionmariana531 closed 1 week ago

ionmariana531 commented 1 week ago

Terraform module not working by pressing the terraform plan:

╷
│ Error: Invalid function argument
│
│   on main.tf line 18, in resource "virtualbox_vm" "node":
│   18:   user_data = file("${path.module}/user_data")
│     ├────────────────
│     │ while calling file(path)
│     │ path.module is "."
│
│ Invalid value for "path" parameter: no file exists at "./user_data"; 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.