- open in devcontainer
- create configuration
- terraform files are called configurations
- initialize dir (where configuration file lives)
- command:
terraform init
- installs plugins in
.terraform/
(likenode_modules/
) - creates configuration lock file (like
package-lock.json
)
- format configurations for readability
- command:
terraform fmt
- should be handled by VSC extension
- ?like a linter/prettifier?
- validate configuration syntax
- command:
terraform validate
- like
docker-compose config
- apply the configuration
- command:
terraform apply
- generates a configuration plan for applying infrastructure changes
- like a version control merging strategy
- the plan consists of
add
,change
anddestroy
tasks- after confirmation the "merge" will be applied to update the infrastructure