alexs77
alexs77

Reputation: 985

Access previous versions of Terraform state on Artifactory (remote backend type)?

Using a backend "remote", it's easily possible store and use Artifactory for the Terraform state. It also does a nice job of versioning.

In case of issues, how would I actually use the previous versions? terraform state pull and the like don't allow to specify the name of a specific state file.

So, suppose there are those files:

Screenshot of Artifactory showing various Terraform state file versions

How would I use state.1708332113711.json?

The contents of a state file are encrypted online. I don't know how to decrypt. Content:

{
    "data": {
        "type": "state-versions",
        "attributes": {
            "serial": 7,
            "force": false,
            "md5": "d95c64fc66f9d572a0d5f1256778b56b",
            "lineage": "fd53f4b8-6e4b-1765-2c31-f838c2904a3b",
            "state": "0w1QtQFa45HJ6ocUMKuXvjjyNQ9…uOabYjiHnkRiyDTwSE=",
            "json-state-outputs": "e30="
        },
        "relationships": null
    }
}

Upvotes: 0

Views: 109

Answers (0)

Related Questions