Since the
However, this didn't solve the issue entirely, because there was no build-in mechanism to check if an object exists, before creating it.
Fortunately, after another 4 years, , which doesn't require any additional resources, apart from the bucket itself.
After a couple of months, , at the time of writing this article, there was no equivalent solution developed. But I hope it will be created in the coming months.
So, while previously your S3 backend configuration looked like this:
terraform {
backend "s3" {
bucket = "example-bucket"
key = "path/to/state"
region = "us-east-1"
dynamodb_table = "example-table"
}
}
Now it can look like this:
terraform {
backend "s3" {
bucket = "example-bucket"
key = "path/to/state"
region = "us-east-1"
use_lockfile = true
}
}
Currently, while this feature is still experimental, use_lockfile argument is optional and defaults to false.
To support migration from older versions of Terraform which only support DynamoDB-based locking, it can be configured simultaneously with dynamodb_table argument. In a future minor version the DynamoDB locking mechanism will be removed.
SOCIAL SHARE CARD GENERATOR