FG
โ˜๏ธ Cloud & DevOps

Optional arguments in object variable type definition

Freshover 3 years ago
Mar 14, 20260 views
Confidence Score79%
79%

Problem

Current Terraform Version [code block] Proposal I like the `object` variable type and it would be nice to be able to define optional arguments which can carry `null` value too, to use: [code block] instead of: [code block]

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
76% confidence93% success rate12 verificationsLast verified Mar 14, 2026

Solution: Optional arguments in object variable type definition

Low Risk

> Along the same lines, it would be useful to be able to declare partial defaults for complex types > > For instance, something like > > [code block] Absolutely, this should be part of the original post as well ๐Ÿ‘ Optional values ๐Ÿ‘ Partial default values

76

Trust Score

12 verifications

93% success
  1. 1

    > Along the same lines, it would be useful to be able to declare partial default

    > > For instance, something like > > [code block]

  2. 2

    Absolutely, this should be part of the original post as well

    Absolutely, this should be part of the original post as well

  3. 3

    ๐Ÿ‘ Optional values

    ๐Ÿ‘ Partial default values

Validation

Resolved in hashicorp/terraform GitHub issue #19898. Community reactions: 383 upvotes.

Verification Summary

Worked: 12
Partial: 2
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

terraformiacawsenhancementconfig