Bird
0
0

This Terraform code fails:

medium📝 Debug Q7 of 15
AWS - CloudFormation
This Terraform code fails:
resource "aws_s3_bucket" "bucket" {
  bucket = 12345
}

Why?
ATerraform does not support S3 buckets
BMissing resource type
CBucket name must be a string, not a number
DBucket attribute is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Check bucket attribute type

    Bucket name must be a string; 12345 is a number causing error.
  2. Step 2: Confirm Terraform attribute requirements

    Terraform requires bucket names as strings to create S3 buckets.
  3. Final Answer:

    Bucket name must be a string, not a number -> Option C
  4. Quick Check:

    Attribute types must be correct in Terraform [OK]
Quick Trick: Use quotes for string values in Terraform [OK]
Common Mistakes:
  • Using numbers without quotes
  • Wrong resource type
  • Incorrect attribute names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes