title: How to force users to specify `-target=module.<environment>` when running `terraform apply`?
body: <p>I have a terraform script that provisions a web service on AWS.</p>
  
  <p>Now I want to reuse this script in different environments (production, stage, dev, ...).</p>
  
  <p>Here's my folder structure:</p>
  
  <pre><code>.
  ├── main.tf
  └── core_module
      ├── outputs.tf
      ├── my_service.tf
      └── variables.tf
  </code></pre>
  
  <p><code>main.tf</code> contains something like the following:</p>
  
  <pre><code>module "prod-service" {
    source = "./core_module"
    env_specific_variable = "this is a production environment"
    ...
  }
  
  module "stage-service" {
    source = "./core_module"
    env_specific_variable = "this is a stage environment"
    ...
  }
  
  module "dev-service" {
    source = "./core_module"
    env_specific_variable = "this is a dev environment"
    ...
  }
  </code></pre>
  
  <p>When I want to create the service on the production environment, I run </p>
  
  <pre><code>terraform apply -target=module.prod-service \
    -var 'access_key=&lt;prod_access_key&gt;' \
    -var 'secret_key=&lt;prod_secret_key&gt;' \
    -var 'region=&lt;prod_region&gt;
  </code></pre>
  
  <p>And when I want to create the service on the stage environment, I run</p>
  
  <pre><code>terraform apply -target=module.stage-service \
    -var 'access_key=&lt;stage_access_key&gt;' \
    -var 'secret_key=&lt;stage_secret_key&gt;' \
    -var 'region=&lt;stage_region&gt;
  </code></pre>
  
  <p>How can I force the users of this script to add the <code>-target</code> option so that he/she doesn't create all the environments in one single command?</p>
  
  <p>Because different environments require different <code>aws_access_key_id</code> and <code>aws_secret_access_key</code>, running <code>terraform apply</code> to create all environments will create errors.</p>