nerdexam
HashiCorp

TA-002-P · Question #295

What is the result of the following terraform function call?

The correct answer is B. False. The Terraform function call evaluates to False based on the specific inputs and logic of the function being tested.

Read, generate, and modify configuration

Question

What is the result of the following terraform function call?

Options

  • ATrue
  • BFalse

How the community answered

(55 responses)
  • A
    5% (3)
  • B
    95% (52)

Why each option

The Terraform function call evaluates to False based on the specific inputs and logic of the function being tested.

ATrue

The function call does not return true because the inputs provided to the function do not satisfy the condition or comparison logic required to produce a positive result.

BFalseCorrect

The function call returns false because the evaluated expression or comparison does not satisfy the condition required to produce a true result. Terraform built-in functions apply strict type and value rules, and the specific arguments provided to the function do not meet the criteria that would yield a truthy output.

Concept tested: Terraform built-in function evaluation and boolean return values

Source: https://developer.hashicorp.com/terraform/language/functions

Topics

#Terraform Functions#HCL#Expressions#Boolean Logic

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice