You’ve just finished refactoring part of your Terraform workspace’s configuration to use a module to manage some of your resources. When you plan your changes, you notice that Terraform will destroy and recreate the affected resources. Doing so could cause unintended downtime in the application your workspace manages. What supported approach should you take to complete the refactor without destroying and recreating your resources?
You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time.
Which Terraform command should you runfirst?
You previously applied your Terraform configuration to create infrastructure in your cloud provider. Your configuration uses the local backend, and you accidentally deleted your terraform.tfstate file.
What does Terraform do the next time you run terraform apply?
Which of these workflows is only enabled by the use of Infrastructure as Code?
You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?
You have just upgraded the version constraint of a provider in an existing Terraform configuration. What command will install the new provider version?
You use a cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that listens on port 80. After application changes, you updated the Terraform code to change the port to 443.
You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended and step away to grab some coffee.
In the meantime, another team member manually changes the load balancer port to 443 through the cloud provider console before you get back to your desk.
What will happen when you run terraform apply upon returning to your desk?
A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?