Closed Gurpartap closed 3 years ago
Getting the error with plugin v1.14.3 too. Downgraded back to v1.13.4 and it reports no changes in the plan successfully.
Hello! Thanks for the report! 😃
It looks like this is result of these two breaking changes:
transfer
changed from TypeMap to TypeList
node_status
changed from TypeMap to TypeList
Currently the provider doesn't implement the StateUpgraders required to automate these tfstate
upgrades, but this can be worked around manually removing or updating the transfer
and node_status
fields in your tfstate
.
Hello @LBGarber!
I have these in my tfstate
. They appear to be in the expected structure as per the docs (linked). Should they be structured any differently?
"transfer": {
"in": "5069.951974868774",
"out": "4863.174536705017",
"total": "9933.126511573792"
},
linode_nodebalancer_config#node_status
"node_status": {
"down": "0",
"up": "5"
},
Full view of the two resources:
…
{
"mode": "managed",
"type": "linode_nodebalancer",
"name": "loadbalancer1",
"provider": "provider[\"registry.terraform.io/linode/linode\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"client_conn_throttle": 0,
"created": "2019-06-21T12:08:35Z",
"hostname": "nb-1.2.3.4.dallas.nodebalancer.linode.com",
"id": "1234",
"ipv4": "1.2.3.4",
"ipv6": "a:b:c::d:e",
"label": "loadbalancer1",
"region": "us-central",
"tags": [],
"transfer": {
"in": "5069.951974868774",
"out": "4863.174536705017",
"total": "9933.126511573792"
},
"updated": "2019-06-22T14:03:38Z"
},
"sensitive_attributes": []
}
]
},
{
"mode": "managed",
"type": "linode_nodebalancer_config",
"name": "loadbalancer1_internal",
"provider": "provider[\"registry.terraform.io/linode/linode\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"algorithm": "roundrobin",
"check": "http",
"check_attempts": 2,
"check_body": "",
"check_interval": 10,
"check_passive": true,
"check_path": "/haproxy/monitor",
"check_timeout": 3,
"cipher_suite": "recommended",
"id": "4321",
"node_status": {
"down": "0",
"up": "5"
},
"nodebalancer_id": 1234,
"port": 3000,
"protocol": "http",
"proxy_protocol": "none",
"ssl_cert": null,
"ssl_commonname": "",
"ssl_fingerprint": "",
"ssl_key": "",
"stickiness": "none"
},
"sensitive_attributes": [],
"dependencies": [
"linode_nodebalancer.loadbalancer1"
]
}
]
},
…
The current tfstate (v1.13.4) and the backup tfstate (before ever trying the upgraded plugins) are identical.
@Gurpartap Good catch on the docs, I'll make sure to get those updated!
For the newer versions of the provider:
"transfer": {
"in": "5069.951974868774",
"out": "4863.174536705017",
"total": "9933.126511573792"
},
should become
"transfer": [
{
"in": 5069.951974868774,
"out": 4863.174536705017,
"total": 9933.126511573792
}
],
and
"node_status": {
"down": "0",
"up": "5"
},
should become
"node_status": [
{
"down": 0,
"up": 5
}
],
Let me know if you run into any more issues! 😄
Terraform Version
Effected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
I did a
terraform -chdir=./deploy/terraform apply
withterraform-provider-linode_v1.13.4
. No issue with nodebalancer. It should have stayed the same withterraform-provider-linode_v1.18.0
.Actual Behavior
Then I upgraded from
terraform-provider-linode_v1.13.4
toterraform-provider-linode_v1.18.0
.Now,
terraform -chdir=./deploy/terraform apply
gives the reported error.