Hi, I first created an S3 bucket and DB table through terraform. And the created backend.tf file. Getting an error :
Error: Error acquiring the state lock
│
│ Error message: 2 errors occurred:
│ * ValidationException: One or more parameter values were invalid: Missing the key finance in the item
│ status code: 400, request id: 7ADVV1OESRELON6JJU7HE4VQEJVV4KQNSO5AEMVJF66Q9ASUAAJG
│ * ValidationException: The provided key element does not match the schema
│ status code: 400, request id: 10BO40SVBIMUI325LKE98V221BVV4KQNSO5AEMVJF66Q9ASUAAJG
│
│
│
│ Terraform acquires a state lock to protect the state from being written
│ by multiple users at the same time. Please resolve the issue above and try
│ again. For most commands, you can disable locking with the “-lock=false”
│ flag, but this is not recommended.
backend.tf file
terraform {
backend “s3” {
bucket = “terrastatebucket9090909”
key = “finance”
region = “us-east-1”
dynamodb_table = “state_backend_table”
encrypt = true
profile = “vscode”
}
}
My main.tf file, which was created before the backend.tf file