Terraform: Difference between revisions

From Piszczynski
(Created page with "== Basic Commands == Initialise configuration: (use folder as a location to store terraform configuration files )<syntaxhighlight lang="terraform"> terraform init </syntaxhighlight>")
 
Line 2: Line 2:
Initialise configuration: (use folder as a location to store terraform configuration files )<syntaxhighlight lang="terraform">
Initialise configuration: (use folder as a location to store terraform configuration files )<syntaxhighlight lang="terraform">
terraform init
terraform init
</syntaxhighlight>
Format configuration files<syntaxhighlight lang="terraform">
terraform fmt
</syntaxhighlight>
Validate configuration<syntaxhighlight lang="terraform">
terraform validate
</syntaxhighlight>
Show possible changes before applying:<syntaxhighlight lang="terraform">
terraform plan
</syntaxhighlight>
Apply changes:<syntaxhighlight lang="terraform">
terraform apply
</syntaxhighlight>
Inspect state of configuration<syntaxhighlight lang="terraform">
terraform show
</syntaxhighlight>
</syntaxhighlight>

Revision as of 13:55, 25 November 2023

Basic Commands

Initialise configuration: (use folder as a location to store terraform configuration files )

terraform init

Format configuration files

terraform fmt

Validate configuration

terraform validate

Show possible changes before applying:

terraform plan

Apply changes:

terraform apply

Inspect state of configuration

terraform show