Complete the code to add a single-line comment in HCL.
#[1] This is a comment
In HCL, a single-line comment starts with the # symbol followed by the comment text.
Complete the code to add a multi-line comment in HCL.
/*[1]*/Multi-line comments in HCL are enclosed between /* and */. You can write multiple lines inside.
Fix the error in the comment syntax below by completing the blank.
resource "aws_instance" "example" { [1] This resource creates an EC2 instance ami = "ami-123456" instance_type = "t2.micro" }
In HCL, single-line comments inside blocks use #. Using // or others causes errors.
Fill both blanks to correctly comment out the variable declaration in HCL.
[1] variable "region" { type = string default = "us-west-2" } [2]
To comment out multiple lines in HCL, use /* to start and */ to end the comment block.
Fill all three blanks to add a comment inside a resource block and a multi-line comment outside.
/*[1]*/ resource "aws_s3_bucket" "bucket" { [2] Bucket for storing logs bucket = "my-log-bucket" acl = "private" } [3]
The multi-line comment outside the resource uses /* and */. Inside the resource, use # for single-line comments.