Problem upgrading directly from v0.11 to v1.0

Hi @hemub441 ,

How you are able to upgrade directly from terraform lower version (< v0.11) to terraform v1.0 ?
could you please provide direction on it.

And for the same issue which you are facing i am getting error while passing list of string to ip_set_descriptor with terraform versio 0.12.26.

Error: Invalid value for input variable
on account.tfvars line 54:
54: ip_descriptors = [ #TBD
55: {
56: type = “IPV4”
58: value = “x.x.x.x/32”
59: },
60: {
61: type = “IPV4”
63: value = “x.x.x.x/32”
64: },
65: {
66: type = “IPV4”
68: value = “x.x.x.x/32”
69: },
70: {
71: type = “IPV4”
73: value = “x.x.x.x/32”
74: }
75: ]
The given value is not valid for variable “ip_descriptors”: element 0: string

Hello @shubhamkj,

I would not recommend trying to upgrade directly from Terraform v0.12 to Terraform v1.0. The smallest practical upgrade sequence would be 0.11 to v0.12 to v0.13 to v1.1, since both the v0.12 and v0.13 upgrades include extra commands to help with the upgrade, as described in their upgrade guides.

In the situation you described though, it seems like you have a list of objects but this variable is declared as expecting a list of strings.

You could perhaps make this work by changing the type constraint of the variable to match the given value. For example:

  type = list(object({
    type  = string
    value = string