Complete the code to define a resource block in Terraform.
resource "aws_instance" "example" [1] ami = "ami-12345678" instance_type = "t2.micro"
The resource block in Terraform starts with a curly brace { to open the block.
Complete the code to close the resource block correctly.
resource "aws_instance" "example" { ami = "ami-12345678" instance_type = "t2.micro" [1]
The resource block must be closed with a curly brace } to end the block.
Fix the error in the block syntax by completing the code.
variable "region" [1] default = "us-west-2" }
The variable block must start with a curly brace { to open the block.
Fill both blanks to complete the nested block structure.
resource "aws_security_group" "example" [1] ingress [2] from_port = 80 to_port = 80 protocol = "tcp" } }
Both the resource and the nested ingress block use curly braces { to open their blocks.
Fill all three blanks to complete the provider block with nested configuration.
provider "aws" [1] region = "us-east-1" assume_role [2] role_arn = "arn:aws:iam::123456789012:role/example" [3] }
The provider block and the nested assume_role block both open with { and close with }.
