Optional object type attributes are experimental: instance_template/variables.tf line 169
progSides opened this issue · 2 comments
TL;DR
EIther optional argument needs to be reworked into a default/local or the README.md needs to have the compatible Terraform versions updated. Instance_template variables.tf additional_disks source_snapshot property has optional(string)
which is only supported on Terraform version 1.3+.
Expected behavior
Expected to not have optional() arguments based on README.md, but found one:
modules/instance_template/variables.tf line 173
added with commit'
affected terraform-google-modules versions 10.1.0 and 10.1.1
Observed behavior
(with Terraform version 1.1.4)
Error: Optional object type attributes are experimental
on .terraform/modules/instance_template.instance_template/modules/instance_template/variables.tf line 169:
169: variable "additional_disks" {
Terraform Configuration
N/A
Terraform Version
1.1.4
Additional information
I'm on Terraform version 1.1.4, but it is within the version ranges listed in the README.md under Compatibility:
This module is meant for use with Terraform 0.13+ and tested using Terraform 1.0+. If you find incompatibilities using Terraform >=0.13, please open an issue. If you haven't [upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform 0.12.x-compatible version of this module, the last released version intended for Terraform 0.12.x is [v5.1.0](https://registry.terraform.io/modules/terraform-google-modules/-vm/google/v5.1.0).
Terraform 1.3 introduced the optional argument, so I'm getting this error message and will have to roll back to 10.0.0. If this wasn't a mistake, perhaps the README.md needs to be updated-- but it should be easy to make this compatible with older versions.
Wow thank you, was really struggling to figure out what was going on here with this error.