Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion beginners/init-plan-apply/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# Terraform Init-Plan-Apply
# Terraform init-plan-apply
Terraform Workflow: Initialization, Planning, and Application

## 1. Terraform Init
- The `terraform init` command initializes a working directory containing Terraform configuration files.
- It's the **first step** after writing a new configuration or cloning an existing one.
- Key points:
- Prepares the working directory for Terraform use.
- Can be run multiple times without issues.
- Performs steps like backend initialization, module installation, and plugin installation.
- Safe to run even after initialization.

## 2. Terraform Plan
- Use `terraform plan` to create an execution plan.
- It previews changes before applying them.
- Customize planning modes and options.
- Plan shows additions, modifications, and deletions of resources.
- Useful for verifying configuration and understanding impact of changes.

## 3. Terraform Apply
- After reviewing the plan, apply it with `terraform apply`.
- Prompts for approval before taking actions.
- Creates, updates, or destroys resources based on the plan.
- Flags like `-input=false` and `-auto-approve` allow automation.

Remember, these three commands—`init`, `plan`, and `apply`—form the core workflow for managing infrastructure with Terraform. Understanding their logic is essential for successful infrastructure management.