nerdexam
Fortinet

FCSS_CDS_AR-7.6 · Question #41

While working with Terraform files, an administrator notices that some of the variables do not have their type explicitly declared. What type of variable is vpccidr in the exhibit?

The correct answer is A. String. When a Terraform variable is declared without an explicit type argument, it defaults to string - making vpccidr (which likely holds a value like "10.0.0.0/16") a string by default. B (Set) is wrong because sets are complex collection types that must be explicitly declared with…

Multi-Cloud Security Orchestration

Question

While working with Terraform files, an administrator notices that some of the variables do not have their type explicitly declared. What type of variable is vpccidr in the exhibit?

Exhibit

FCSS_CDS_AR-7.6 question #41 exhibit

Options

  • AString
  • BSet
  • CMap
  • DNumber

How the community answered

(44 responses)
  • A
    93% (41)
  • C
    5% (2)
  • D
    2% (1)

Explanation

When a Terraform variable is declared without an explicit type argument, it defaults to string - making vpccidr (which likely holds a value like "10.0.0.0/16") a string by default. B (Set) is wrong because sets are complex collection types that must be explicitly declared with type = set(...). C (Map) is wrong for the same reason - maps require type = map(...) and would need key-value pair syntax in the value. D (Number) is incorrect because a CIDR notation value contains dots and slashes, which are not valid numeric characters, and number types also require explicit declaration or a purely numeric value.

Memory tip: Think "string is the safe default" - just like untyped variables in many scripting languages become strings, Terraform follows the same convention. If you see no type = line in a variable block, it's always a string.

Topics

#Terraform#variable types#infrastructure as code#HCL

Community Discussion

No community discussion yet for this question.

Full FCSS_CDS_AR-7.6 Practice