2020-06-22 terraformでfileを相対パス記載する terraform terraform version 0.12以上 記載方法 fileを相対パスで指定したい moduleのcertディレクトリにあるファイルを指定したい /path/to/module/cert/sample.pemを指定する resource "aws_iot_certificate" "cert" { csr = file("${path.module}/cert/sample.pem") active = true } memo ${path.module}がモジュールのディレクトリを指す