Tips básicos Terraform

Hola compañeros de la shell,

Antes de nada, para revisar en detalle cualquier tema relacionado con Terraform tendremos que acudir a la documentación oficial de hashicorp:

https://www.terraform.io/docs/index.html

A continuación, a modo de recordatorio,  set de comandos básicos para trabajar con Terraform:

# The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style. 
# Formatea el código de los ficheros tf (recursivo aplicando parametro -recursive)
 
terraform fmt -recursive

# The terraform init command is used to initialize a working directory containing Terraform configuration files.

terraform init

# The terraform validate command validates the configuration files in a directory, referring only to the configuration

terraform validate

# The terraform plan command is used to create an execution plan
# The optional -out argument can be used to save the generated plan to a file for later execution with terraform apply

terraform plan -out FICHERO	

# The terraform apply command is used to apply the changes required to reach the desired state of the configuration, or the pre-determined set of actions generated by a terraform plan execution plan

terraform apply FICHERO

# Inspects the current status of your infrastructure

terraform show

# Terraform prints output values to the screen when you apply your configuration. Query the outputs with:

terraform output

# The terraform destroy command is used to destroy the Terraform-managed infrastructure 

terraform destroy

# Command to enter in terraform console to debug configuration

terraform console

Espero que os sirva.

Nos vemos al otro lado de la pantalla negra.

Esta entrada fue publicada en Sin categoría. Guarda el enlace permanente.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *