Bird
0
0

Given this Terraform snippet:

medium📝 Predict Output Q13 of 15
AWS - CloudFormation
Given this Terraform snippet:
resource "aws_s3_bucket" "bucket" {
  bucket = "my-unique-bucket"
  acl    = "private"
}

What will happen when you run terraform apply?
ACreates a public S3 bucket named 'my-unique-bucket' in AWS.
BFails because bucket names cannot be unique.
CThrows a syntax error due to missing region.
DCreates a private S3 bucket named 'my-unique-bucket' in AWS.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze Terraform resource block

    The resource defines an AWS S3 bucket with name 'my-unique-bucket' and ACL set to 'private'.
  2. Step 2: Understand Terraform apply behavior

    Terraform will create the bucket with the specified name and private access control.
  3. Final Answer:

    Creates a private S3 bucket named 'my-unique-bucket' in AWS. -> Option D
  4. Quick Check:

    ACL 'private' means private bucket [OK]
Quick Trick: ACL 'private' means bucket is private [OK]
Common Mistakes:
  • Assuming default ACL is public
  • Expecting syntax error without region (region is set elsewhere)
  • Thinking bucket names cannot be unique (they must be unique)

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes