Question 1easymultiple choice
Read the full Use the core Terraform workflow explanation →TF-003 Use the core Terraform workflow • Complete Question Bank
Complete TF-003 Use the core Terraform workflow question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit. ``` Error: Error applying plan! on main.tf line 12, in resource "aws_instance" "web": 12: ami = "ami-0c55b159cbfafe1f0" The resource "aws_instance" "web" was successfully created but failed to initialize after creation. The following errors may help: Error: timeout - last error: SSH connection failed (unreachable) ```
Refer to the exhibit.
```hcl
resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
}
```
An engineer runs `terraform apply` with this configuration and receives the following error:
```
Error: Error launching source instance: UnauthorizedOperation: You are not authorized to perform this operation.
```Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Author infrastructure as code configuration
Preview changes before applying
Execute the planned changes
Tear down managed infrastructure
Restructure configuration without changing external resources
Refer to the exhibit.
```hcl
# main.tf
terraform {
backend "s3" {
bucket = "my-org-terraform-state"
key = "prod/terraform.tfstate"
region = "us-east-1"
}
}
provider "aws" {
region = "us-west-2"
}
resource "aws_instance" "example" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
}
```Refer to the exhibit. ``` $ terraform plan -out=tfplan $ terraform apply "tfplan" ``` The developer runs the commands above. During the apply, the network connection is lost and the command fails halfway through. The developer re-establishes connectivity and runs `terraform apply` again without specifying a plan file. What will happen?
Refer to the exhibit. ``` $ terraform init Initializing the backend... Successfully configured the backend "local"! Terraform will automatically use this backend unless the backend configuration changes. Initializing provider plugins... - Using previously-installed hashicorp/random v3.5.1 Terraform has been successfully initialized! $ terraform plan No changes. Your infrastructure matches the configuration. $ terraform apply -auto-approve No changes. Your infrastructure matches the configuration. ```