Complete the code to define an AWS S3 bucket using Terraform.
resource "aws_s3_bucket" "my_bucket" { bucket = "[1]" }
The bucket name should match the Terraform naming convention and example.
Complete the code to specify the AWS provider in Terraform.
provider "aws" { region = "[1]" }
The region us-east-1 is commonly used in examples and is a valid AWS region.
Fix the error in the Terraform resource block by completing the missing argument.
resource "aws_instance" "example" { ami = "ami-0c55b159cbfafe1f0" instance_type = "[1]" }
The instance_type 't2.micro' is a valid and commonly used instance type for examples.
Fill both blanks to create a Terraform output that shows the bucket name and its ARN.
output "bucket_info" { value = { name = aws_s3_bucket.my_bucket.[1] arn = aws_s3_bucket.my_bucket.[2] } }
The 'id' attribute gives the bucket name, and 'arn' gives the Amazon Resource Name.
Fill all three blanks to define a Terraform variable with a default value and description.
variable "region" { type = "[1]" default = "[2]" description = "[3]" }
The variable type is 'string', the default is a valid AWS region, and the description explains the variable's purpose.