Difference between revisions of "Terraform variables"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
 
* [[Terraform Cloud]]: https://www.terraform.io/cloud-docs/workspaces/variables
 
* [[Terraform Cloud]]: https://www.terraform.io/cloud-docs/workspaces/variables
  
 
+
Using command line parameters:
 
* <code>[[terraform apply]] [[-var]]="[[image_id]]=ami-abc123"</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]]="[[image_id]]=ami-abc123 [[-var]]="your_second_var=yourvalue"</code>
 +
 +
Using a file:
 
* <code>terraform apply [[-var-file]]="your_file[[.tfvars]]"</code>
 
* <code>terraform apply [[-var-file]]="your_file[[.tfvars]]"</code>
  

Revision as of 09:51, 17 February 2022

Advertising: