Complete the code to define a Terraform provider block using HCL.
provider "aws" { region = [1] }
The region value must be a string in quotes in HCL, so "us-west-2" is correct.
Complete the code to declare a Terraform variable with a default value in HCL.
variable "instance_type" { type = string default = [1] }
Default values for variables in HCL must be strings enclosed in quotes, so "t2.micro" is correct.
Fix the error in the Terraform resource block by completing the missing attribute value.
resource "aws_instance" "example" { ami = [1] instance_type = "t2.micro" }
The AMI ID must be a string in quotes in HCL, so "ami-123456" is correct.
Fill both blanks to create a Terraform output that shows the instance's public IP.
output "instance_ip" { value = [1].[2] }
The output value must reference the resource name and the attribute public_ip to show the instance's public IP.
Fill all three blanks to define a Terraform resource with tags using HCL.
resource "aws_s3_bucket" "bucket" { bucket = [1] acl = [2] tags = { Name = [3] } }
The bucket name, ACL, and tag values must be strings in quotes. The bucket is named "my-bucket", ACL is "private", and tag Name is "MyBucket".