title: Is it possible to to "variableize" the source path for a module in Terraform?
body: <p>Is it possible to use a variable for the module source in Terraform or Terragrunt. Using Terragrunt I know we can override the module source to a local directory but it does not seem to allow us to use a different repo.</p>
  
  <p>The use case is to support a development repository and a live repository. Developers will use a different repository for development of modules than will be used for the production/live deployments. </p>
  
  <p>I am familiar with using the Terragrunt approach to separate environments. We can go that route, e.g. the configurations in the live folders would point to one repo and the configurations in the dev/qa folders point to another repo. </p>
  
  <p><strong>Code Snippet:</strong></p>
  
  <pre><code>module "s3_module" {
    source = "${var.source_url}"
    bucket_name = "thereoncewasakingguardinghisgardenallalone"
  }
  </code></pre>
  
  <p><strong>Error:</strong> </p>
  
  <p>Error downloading modules: Error loading modules: error downloading 'file:///home/vagrant/code/Terraform/Examples/Lab-US-West-1/${var.source_url}': source path error: stat /home/vagrant/code/Terraform/Examples/Lab-US-West-1/${var.source_url}: no such file or directory</p>