Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
You have a saved execution plan containing desired changes for infrastructure managed by Terraform. After running the command terraform apply my.tfplan, you receive the error shown in the exhibit below.
Exhibit:
Error: Saved plan is stale
The given plan file can no longer be applied because the state was changed by another operation after the plan was created.
How can you apply the desired changes? (Choose TWO correct answers)
Which parameters does terraform import require? Choose two correct answers.
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 modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state without destroying the existing resource?
Original configuration:
resource " aws_s3_bucket " " photoes " {
bucket_prefix = " images "
}
Updated configuration:
resource " aws_s3_bucket " " photos " {
bucket_prefix = " images "
}
What does terraform import do?
You can execute terraform fmt to standardize all Terraform configurations within the current working directory to Terraform’s canonical format and style.
Which statements are true? Choose two correct answers.
A module block used in your configuration is shown in the exhibit. You have been asked to update the version of this module from 4.2.1 to 5.0.0.
Exhibit:
module " compute " {
source = " Azure/compute/azurerm "
version = " 4.2.1 "
}
Which two steps must you take to accomplish this?
You provisioned virtual machines (VMs) on Google Cloud Platform using the gcloud command-line tool.
What must be done to manage these VMs using Terraform instead? Pick the two correct responses.