BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam TA-002-P Topic 9 Question 28 Discussion

Actual exam question for HashiCorp's TA-002-P exam
Question #: 28
Topic #: 9
[All TA-002-P Questions]

Which of the following value will be accepted for my_var?

1. variable "my_var"

2. {

3. type = string

4. }

Show Suggested Answer Hide Answer
Suggested Answer: C

The Terraform language will automatically convert number and bool values to string values when needed, and vice-versa as long as the string contains a valid representation of a number or boolean value.

Example

* true converts to 'true', and vice-versa

* false converts to 'false', and vice-versa

* 15 converts to '15', and vice-versa

Where possible, Terraform automatically converts values from one type to another in order to produce the expected type. If this isn't possible, Terraform will produce a type mismatch error and you must update the

configuration with a more suitable expression.

https://www.terraform.io/docs/configuration/expressions.html#type-conversion


Contribute your Thoughts:

Currently there are no comments in this discussion, be the first to comment!


Save Cancel