An open API service indexing awesome lists of open source software.

https://github.com/benjaminpla/terraform

Terraform usefulll template.
https://github.com/benjaminpla/terraform

aws iac terraform

Last synced: about 2 months ago
JSON representation

Terraform usefulll template.

Awesome Lists containing this project

README

        

## Terraform

1. Initialize the Terraform working directory:

```bash
terraform init
```

This command initializes the working directory and downloads the necessary provider plugins specified in your configuration.

2. Validate the Terraform configuration:

```bash
terraform validate
```

This command validates the syntax and configuration of your Terraform files, ensuring they are correctly formatted and without errors.

3. Preview the Terraform execution plan:

```bash
terraform plan
```

This command generates an execution plan, showing you the changes that Terraform will make to your infrastructure. It provides an overview of the resources that will be created, modified, or destroyed.

4. Apply the Terraform changes:

```bash
terraform apply
```

This command applies the changes defined in your Terraform configuration, creating or modifying the specified resources. You may be prompted to confirm the changes before proceeding.

5. (Optional) Automate the Terraform execution:
If you want to automate the Terraform execution without manual intervention, you can use the `-auto-approve` flag:

```bash
terraform apply -auto-approve
```

This will automatically apply the changes without requiring manual confirmation.

6. To destroy the resources provisioned by Terraform and remove them from your infrastructure, you can use the terraform destroy command. This command will destroy all the resources defined in your Terraform configuration.
```bash
terraform destroy
```