Datasources contd
Replace
- Taint is deprecated and is replaced with
terraform apply --replace <resource-id> - Taint during apply will delete and create the resource
Terraform Steps to create infra
- terraform creates a plan (calculating drift)
- terraform performs refresh to get current state of what we have on the provider
- now terraform looks at difference between what is written in tf files vs latest refresh
- difference becomes a plan
- Summary
Apply = refresh + plan + apply
Activity 3 contd
- Use datasource to fetch the ami id
- Refer Here for the changes done
