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.
- Host: GitHub
- URL: https://github.com/benjaminpla/terraform
- Owner: benjaminPla
- Created: 2023-06-22T10:01:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T09:24:49.000Z (over 1 year ago)
- Last Synced: 2025-02-06T20:01:03.932Z (3 months ago)
- Topics: aws, iac, terraform
- Language: HCL
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```