title: Why cant I use use an attribute as a resource name in a chef recipe?
body: <p>I have this attribute defined in my default attributes file:</p>
  
  <pre><code>default['remote_machine']['user']['file_name'] = '/folder/path/file_name.html'
  </code></pre>
  
  <p>And I am trying to reference this attribute name in a recipe as follows:</p>
  
  <pre><code>list_of_nodes = search(:node,"name:production_* AND name:*app*")
  
  template default['remote_machine']['user']['home']['file_name'] do #ERROR HERE
    source "file_name.html.erb"
    mode "755"
    variables(
      :list_of_ips=&gt;list_of_nodes
    )
  </code></pre>
  
  <p>Trying to upload this cookbook, I get an error as: </p>
  
  <pre><code>FATAL: ArgumentError: You must supply a name when declaring a default resource
  </code></pre>
  
  <p>If I provide a string containing the path as the argument to the resource, it works. </p>
  
  <p>Can anyone help me understand what I am missing?</p>
  
  <p>Thanks.</p>