# Terraform Commands

* This command will initialize the working directory containing Terraform configuration files and install any required plugins.

```bash
terraform init
```

* This command lets you preview the actions Terraform would take to modify your infrastructure or save a speculative plan which you can apply later.

```bash
terraform plan
```

* This command executes the actions proposed in a terraform plan. It is used to deploy your infrastructure. Typically apply should be run after terraform init and terraform plan. Enter yes when prompted "Enter a value:".

```bash
terraform apply
```

* This command will show whether the syntax used is correct or not

```bash
terraform validate
```

* This command scans the configuration files in the current working directory and formats the code. It is used to improve the readability of files.

```bash
terraform fmt
```

* This command will list all the providers used in the configuration file

```bash
terraform providers
```

* This command will mirror the provider configuration in a new path.

```bash
terraform providers mirror /<file_path>
```

* This command will print all the output variables in the configuration files

```bash
terraform output
```

* This command is used to sync the terraform with real-world resources

```bash
terraform refresh
```

* This command will show the resources we have created.

```bash
terraform show
```

* To destroy the infrastructure

```bash
terraform destroy 
```
