nerdexam
HashiCorpHashiCorp

TA-002-P · Question #275

TA-002-P Question #275: Real Exam Question with Answer & Explanation

Sign in or unlock TA-002-P to reveal the answer and full explanation for question #275. The question stem and answer options stay visible for context.

Understand Terraform basics

Question

resource "aws_s3_bucket" "example" { bucket = "my-test-s3-terraform-bucket" ...} resource "aws_iam_role" "test_role" { name = "test_role" ...} Due to the way that the application code is written , the s3 bucket must be created before the test role is created , otherwise there will be a problem. How can you ensure that?

Options

  • AThis will already be taken care of by terraform native implicit dependency. Nothing else
  • BAdd explicit dependency using depends_on . This will ensure the correct order of
  • CCreate 2 separate terraform config scripts , and run them one by one , 1 for s3 bucket ,
  • DThis is not possible to control in terraform . Terraform will take care of it in a native way ,

Unlock TA-002-P to see the answer

You've previewed enough free TA-002-P questions. Unlock TA-002-P for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Terraform dependencies#Explicit dependencies#depends_on#Resource ordering
Full TA-002-P PracticeBrowse All TA-002-P Questions