Editing Terraform apply

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lowercase}}
+
  [[terraform]] apply
* https://www.terraform.io/docs/cli/commands/apply.html
 
  {{terraform flow}}
 
== Options ==
 
* <code>[[terraform]] apply</code>
 
* <code>[[terraform apply --help]]</code>
 
* <code>[[terraform apply -auto-approve]]</code>
 
* <code>[[terraform apply -refresh-only]]</code>
 
* <code>terraform apply [[-var]]="[[image_id]]=ami-abc123"</code>
 
* <code>terraform apply [[-var]]="[[image_id]]=ami-abc123 [[-var]]="your_second_var=yourvalue"</code>
 
* <code>terraform apply [[-var-file]]="your_file[[.tfvars]]"</code>
 
* <code>[[terraform apply -destroy]]</code>
 
* <code>[[terraform apply -replace]]="aws_instance.example[0]"</code>
 
  
Only apply to specific resources:
 
* <code>[[terraform apply -target]]</code>
 
[[excluded]] related term
 
  
== Execution examples ==
+
* <code>terraform apply</code> https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/tree/master/examples/basic
* <code>[[terraform apply: ec2 instance example (aws instance)]]</code>
 
* <code>[[terraform apply: modifying ec2 instance size]]</code>
 
  
* [[Terraform apply examples with errors]]
+
== With errors ==
 +
terraform apply
 +
 +
│ Error: No configuration files
 +
 +
│ Apply requires configuration to be present. Applying without a configuration would mark
 +
│ everything for destruction, which is normally not what is desired. If you would like to
 +
│ destroy everything, run '[[terraform destroy]]' instead.
 +
  
== Related terms ==
+
terraform apply
* <code>[[terraform show]]</code>
+
* <code>[[main.tf]], [[variables.tf]]</code>
+
│ Error: Missing required argument
 +
 +
│ The argument "region" is required, but was not set.
 +
 +
 
 +
 
 +
<pre>
 +
An execution plan has been generated and is shown below.
 +
Resource actions are indicated with the following symbols:
 +
 
 +
Terraform will perform the following actions:
 +
 
 +
Plan: 0 to add, 0 to change, 0 to destroy.
 +
 
 +
Do you want to perform these actions?
 +
  Terraform will perform the actions described above.
 +
  Only 'yes' will be accepted to approve.
 +
 
 +
  Enter a value: yes
 +
 
 +
 
 +
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
 +
 
 +
Outputs:
 +
 
 +
text = hello world
 +
</pre>
 +
 
 +
== Related commands ==
 +
* <code>[[terraform apply]] [[-var]] ‘myvar=football’</code>
 +
* <code>[[variables.tf]]</code>
 
* <code>[[terraform init]]</code>
 
* <code>[[terraform init]]</code>
* <code>[[terraform destroy]]</code>
 
* [[Terraform: Hello world.tf]]
 
* <code>[[Error: failed to render]]</code>
 
* <code>[[aws cloudformation deploy]]</code>
 
* [[Deploy EKS cluster using Terraform]]
 
* <code>[[terragrunt run-all apply]]</code>
 
* [[aws instance.your instance name will be updated in-place]]
 
  
 
== See also ==
 
== See also ==
* {{main.tf}}
+
* {{terraform cmd}}
* {{terraform apply}}
+
* {{terraform}}
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: