I have been using JFrog’s Artifactory cloud for quite some time for storing my Terraform state. Starting from today, saving the new state has failed on all of my systems, I even installed a brand new Ubuntu 22.04 on WSL.
Whatever I try to do, the plan works fine, and on apply all changes are applied. Then it crashes on state update, and leaves the plan in locked state. All my plans with Azure Blob storage backend are working just fine.
Has anybody else seen this? It might be related to Artifactory cloud update which was done yesterday, according to JFrog’s release notes.
$ terraform -version Terraform v1.6.1 on linux_amd64 + provider registry.terraform.io/hashicorp/azurerm v3.75.0 $ terraform plan -out plan.tfplan <...reading the resources...> No changes. Your infrastructure matches the configuration. Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed. $ terraform apply plan.tfplan panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x11e9936] goroutine 122 [running]: github.com/hashicorp/go-tfe.(*stateVersions).Upload.func1() /email@example.com/state_version.go:294 +0xb6 golang.org/x/sync/errgroup.(*Group).Go.func1() /firstname.lastname@example.org/errgroup/errgroup.go:75 +0x56 created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 26 /email@example.com/errgroup/errgroup.go:72 +0x96
This is what I can see in the JFrog cloud Artifactory system log at the same time:
2023-10-13T12:21:30.203Z [jfrt ] [ERROR] [9bb687b9db630188] [aformLocalStateRepoHandler:276] [ttp-nio-8443-exec-34] - Failed to create new state version at terraform-state/workspaces/acr-cicd/state.latest.json: Cannot invoke "String.getBytes(java.nio.charset.Charset)" because "content" is null