nerdexam
HashiCorpHashiCorp

TA-002-P · Question #183

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

The correct answer is A: 1.1.1. {"question_number": 2, "question": "Pessimistic constraint operator ~> 1.1.0 - which versions satisfy the constraint?", "correct_answer": "A, C", "explanation": "The pessimistic constraint operator (~>) with a three-part version like ~> 1.1.0 means 'allow only patch-level changes

Read, generate, and modify configuration

Question

Refer below code where pessimistic constraint operator has been used to specify a version of a provider. terraform { required_providers { aws = "~> 1.1.0" }} Which of the following options are valid provider versions that satisfy the above constraint. (select two)

Options

  • A1.1.1
  • B1.2.9
  • C1.1.8
  • D1.2.0

Explanation

{"question_number": 2, "question": "Pessimistic constraint operator > 1.1.0 - which versions satisfy the constraint?", "correct_answer": "A, C", "explanation": "The pessimistic constraint operator (>) with a three-part version like ~> 1.1.0 means 'allow only patch-level changes within the 1.1.x series.' Formally, it is equivalent to >= 1.1.0 and < 1.2.0. Therefore: 1.1.1 (A) - valid, it is within the 1.1.x range; 1.1.8 (C) - valid, also within 1.1.x. 1.2.9 (B) and 1.2.0 (D) both exceed the 1.2.0 upper boundary and are therefore rejected. If the constraint had been ~> 1.1 (only two parts), it would allow up to < 2.0.0.", "generated_by": "claude-sonnet", "llm_judge_score": 5}

Topics

#provider versions#version constraints#pessimistic constraint operator#required_providers

Community Discussion

No community discussion yet for this question.

Full TA-002-P PracticeBrowse All TA-002-P Questions