Complete the code to define a resource block in Terraform.
resource "aws_instance" "example" { ami = "ami-12345678" instance_type = "[1]" }
The instance_type must be a valid AWS instance type. "t3.micro" is a common, low-cost option.
Complete the code to specify the provider in Terraform configuration.
provider "aws" { region = "[1]" }
The region "us-east-1" is a common default AWS region used in examples and deployments.
Fix the error in the Terraform variable declaration.
variable "instance_count" { type = [1] default = 1 }
In Terraform, the type is specified without quotes using the keyword number.
Fill both blanks to create a map variable with default values.
variable "tags" { type = [1] default = [2] }
The type must be a map of strings, and the default value must be a map with key-value pairs.
Fill all three blanks to output the instance ID from a resource.
output "instance_id" { value = [1].[2].[3] }
The output value references the resource type, resource name, and the attribute 'id' to get the instance ID.