You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on .terraform/modules/vpn/main.tf line 8, in resource "aws_acm_certificate" "client":
8: private_key = file("${path.root}/${var.cert_dir}/${module.this.stage}.${var.cert_domain}.key")
|----------------
| module.this.stage is ""
| path.root is "."
| var.cert_dir is "certs"
| var.cert_domain is "clientvpn.com"
Invalid value for "path" parameter: no file exists at
certs/.clientvpn.com.key; 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/vpn/main.tf line 9, in resource "aws_acm_certificate" "client":
9: certificate_body = file("${path.root}/${var.cert_dir}/${module.this.stage}.${var.cert_domain}.crt")
|----------------
| module.this.stage is ""
| path.root is "."
| var.cert_dir is "certs"
| var.cert_domain is "clientvpn.com"
I got the errors below. Please help.
Error: Invalid function argument
on .terraform/modules/vpn/main.tf line 8, in resource "aws_acm_certificate" "client":
8: private_key = file("${path.root}/${var.cert_dir}/${module.this.stage}.${var.cert_domain}.key")
|----------------
| module.this.stage is ""
| path.root is "."
| var.cert_dir is "certs"
| var.cert_domain is "clientvpn.com"
Invalid value for "path" parameter: no file exists at
certs/.clientvpn.com.key; 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/vpn/main.tf line 9, in resource "aws_acm_certificate" "client":
9: certificate_body = file("${path.root}/${var.cert_dir}/${module.this.stage}.${var.cert_domain}.crt")
|----------------
| module.this.stage is ""
| path.root is "."
| var.cert_dir is "certs"
| var.cert_domain is "clientvpn.com"
Here is my source code:
main.tf:
terraform.tfvars
I ran, gen-certs.sh and place crt and key at the folder certs.
$ ls certs/
ca.crt server.crt server.key
The text was updated successfully, but these errors were encountered: