Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Support optional keyword and other terraform 1.0 language enhancements #338

Closed
samart opened this issue Jun 11, 2021 · 4 comments
Closed
Milestone

Comments

@samart
Copy link

samart commented Jun 11, 2021

Support optional keyword for variables.
recognize tomap and tolist functions

@samart samart closed this as completed Jun 11, 2021
@samart samart reopened this Jun 11, 2021
@samart samart changed the title Support optional keyword and other terraform 1.0 language enha Support optional keyword and other terraform 1.0 language enhancements Jun 11, 2021
@VladRassokhin
Copy link
Owner

What is "optional keyword for variables"?
tomap and tolist supported in 0.7.11

@haidaraM
Copy link

haidaraM commented Sep 6, 2021

optional experimental keyword is defined here: https://www.terraform.io/docs/language/expressions/type-constraints.html#experimental-optional-object-type-attributes.

There is also a defaults experimental function: https://www.terraform.io/docs/language/functions/defaults.html. Not sure if it's supported or not

@VladRassokhin VladRassokhin added this to the 0.7.14 milestone Sep 6, 2021
@VladRassokhin
Copy link
Owner

Fixed optional in 0.7.14
defaults is somehow works.

@mrlexor
Copy link

mrlexor commented Oct 18, 2022

Hello,

I've found out this closed issue regarding optional modifier. It's actually work, but not as expected.

Optional modifier has two arguments and if I use it only with as shown one, so linter shows that okay:
Screenshot 2022-10-18 at 14 53 53

However, when I add the second one, default argument, linter, seems, doesn't know about it:
Screenshot 2022-10-18 at 14 58 04

Can you take a look, please?

Here you may find information about default argument for the optional modifier.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants