- main.tf - main file defining resources
- variables.tf - constants that are unchaning like project ids or keys
- backend.tf - sets up project to sync state with terraform cloud
- locals.tf - locals can be used to define resources that are then passed into main.tf's modules
- variables.tf - is used to represent values that are likely to change
- data.tf - is ued to tell terraform it needs to look something up
Note using doppler to manage secrets and inject them into command execution
doppler run -- terraform plan -out "terraform.tfplan"
terraform validate
terraform init
doppler run -- terraform apply "terraform.tfplan"
in some instances you will need to "move a resource". This happens in particular when you get a warning something is to be destroyed you don't want post a change.
ex.) moved { from =module.project to =module.project["fem-eci-project"]}