chmod +x create_terraform_structure.sh ./create_terraform_structure.sh
terraform init
terraform import module.project.mongodbatlas_project.example <PROJECT.ID>
terraform import module.project.mongodbatlas_project.example 65f617a6cdafb5108b9c6ef2
terraform init terraform plan -var-file="terraform.tfvars" -target=module.cluster terraform apply -var-file="terraform.tfvars" -target=module.cluster terraform destroy -var-file="terraform.tfvars" -target=module.cluster
####### NOTES #######
terraform state list
Use Terraform Workspaces (for environment separation) Workspaces let you maintain multiple state files (e.g., dev, staging, prod) under the same configuration.
You can switch between workspaces using:
terraform workspace select dev terraform plan terraform apply This way, the root config is the same, but states are isolated per workspace.