-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid error with module_variable_optional_attrs #27272
Comments
Hi @Derek-Ashmore !
You need to either update the definition of
I've confirmed both options apply successfully in your example repository - thank you so much for providing that! - so I am going to close this issue. |
My bad -- thanks for finding the error in my ways. Sorry for the hassle. |
You're welcome, and no worries! It was very sneaky, not at all obvious, and we know those error messages are rarely clear enough |
For what it's worth, I believe the particularly-odd behavior of randomly complaining about different attributes will be fixed by the upstream change zclconf/go-cty#78, once it's included in an upstream release and then upgraded in Terraform. #27010 is the issue tracking the Terraform manifestation of it. This situation would still be an error for the reason @mildwonkey noted, but it should soon be a correct error, rather than a misleading one! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I get invalid error reports when using the "optional" experimental feature with complex map inputs. The value supplied should be valid. I realize this feature is experimental, but thought you would like to know. A minimal repo that reproduces this error can be found here. The variable declaration with the "optional" feature usage that errs out whenever the
ipsec_policy
attribute is used is the following:I've noticed the following:
ipsec_policy
attribute.Version and local run commands below. Please feel free to contact me if you have questions. Thanks for looking at this.
Error Description
This configuration doesn't have an input error, but one is reported anyway. Furthermore, the error is inconsistent.
Running the apply several times, I received the three different error messages below although the input should be viewed as valid.
Versions
Terriform version == 0.14.2
The experimental feature
module_variable_optional_attrs
is turned on.Local run commands
The text was updated successfully, but these errors were encountered: