title: The module root could not be found. There is nothing to output
body: <p>Running a <code>terraform output</code> in my root Terraform directory I get:</p>
  
  <pre><code>The module root could not be found. There is nothing to output.
  </code></pre>
  
  <p>I have the following files:</p>
  
  <p><code>iam.tf</code>:</p>
  
  <pre><code>resource "aws_iam_user" "a_user" {
    name = "a_user"
  }
  </code></pre>
  
  <p><code>output.tf</code>:</p>
  
  <pre><code>data "aws_caller_identity" "current" {}
  
  output "account_id" {
    value = "${data.aws_caller_identity.current.account_id}"
  }
  </code></pre>
  
  <p>This <a href="https://www.terraform.io/docs/modules/index.html" rel="noreferrer">https://www.terraform.io/docs/modules/index.html</a> says:</p>
  
  <pre><code>Root module That is the current working directory when you run terraform apply or get, holding the Terraform configuration files. It is itself a valid module.
  </code></pre>
  
  <p>Any idea why the error message and how to fix?</p>