I'm using s3 bucket as remote state. I'm just confused what the value of version ("version": 4) in tfstate file means.
{
"version": 4,
"terraform_version": "1.2.1",
"serial": 402,
"lineage": "0e5a03fc-1b6f-e56b-8c9b-a0e0a1756f12",
"outputs": {},
"resources": [
{
"module": "module.aws_cloudwatch",
"mode": "managed",
It's the version of the terraform state file. The version is managed by terraform itself.
In a Terraform state file, there are three "types of versions":
The versions of a state file may change due to the following: