Terraform contd
Terraform functions to identify ip ranges
- using cidr subnet Refer Here

- Refer Here for the changes done to accomodate in aws ntier
- Lets try to apply what we have learnt so far for ntier in azure.
- Refer Here for the changes
Terraform plan
- Terraform whenever applied will check for the difference in desired state and actual state.
- This becomes a plan for terraform which gets execute
- First time execution: (No resources are exist in provider)

- Next Time Execution

- Terraform apply = Terraform plan out + apply the plan
Terraform state
- When we execute apply in terraform
- checks for a state file (by default in same folder)
- if exists
- tries to get the latest state from provider (refresh the state)
- if latest state is exactly equal to previous generated then terraform has nothing to do
- if there is a difference
- creates a backup for state
- executes a new plan
- else:
- creates a plan and executes the plan
- result of what was created will be stored in tfstate file
- if exists
- checks for a state file (by default in same folder)
