Skip to content

Commit

Permalink
add s3:DeleteObject for *.tflock to enable lockign in 1.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Aug 27, 2025
1 parent 9f808fc commit d6f1a1b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,3 +420,4 @@
* 2.12.3 -- 2025-08-27
- terraform-state
- remove role creation for application_mode
- add s3:DeleteObject for *.tflock to enable lockign in 1.9.x
13 changes: 13 additions & 0 deletions terraform-state/policy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ data "aws_iam_policy_document" "tfstate" {
]
}

# https://developer.hashicorp.com/terraform/language/backend/s3

statement {
sid = "TFRemoteStateLocking"
effect = "Allow"
resources = ["${aws_s3_bucket.tfstate.arn}/*.tflock"]
actions = [
# "s3:GetObject",
# "s3:PutObject"
"s3:DeleteObject"
]
}

statement {
sid = "TFRemoteStateDDB"
effect = "Allow"
Expand Down

0 comments on commit d6f1a1b

Please sign in to comment.