outscale / terraform-provider-outscale

Mozilla Public License 2.0
28 stars 31 forks source link

Terraform >= 1.6 : Unsupported state file format #445

Closed tybobab closed 2 months ago

tybobab commented 2 months ago

Hello, When I want to use terraform >=1.6 with an OOS backend, the TFSTATE is in a bad file format.

Terraform Version

terraform 1.6.6 terraform 1.7.4 terraform 1.8.1 terraform 1.8.2

Terraform Configuration Files

terraform init -backend-config=bucket=[bucket_name] -backend-config=key=[tfstate_object_name] -backend-config=endpoint=https://oos.cloudgouv-eu-west-1.outscale.com/ -backend-config=skip_requesting_account_id=true terraform apply --auto-approve

Debug Output

N/A

Crash Output

Error: Failed to load state: 2 problems:

Expected Behavior

The TFSTATE is in a good json file format and I can get the output.

Actual Behavior

The TFSTATE is malformed:

5985 { "version": 4, "terraform_version": "1.8.1", "serial": 1, "lineage": "38b19159-d77c-7ac5-6408-b7fff86e863d", "outputs": { .... }, "resources": [ .... ], "check_results": n

The TFSTATE begin with numbers instead of { The TFSTATE end with no } and the value of check_results must be "null" instead of "n"

Steps to Reproduce

Use terraform >=1.6 and backend OOS

outscale-mgo commented 2 months ago

Hello, It seems this problem is affecting all s3 providers that are not AWS: https://github.com/hashicorp/terraform/issues/34054 an easy solution is to add skip_s3_checksum = true.

tybobab commented 2 months ago

Thank you, it's work