Skip to content

Commit

Permalink
- terraform-state
Browse files Browse the repository at this point in the history
  - add data resource for ddb kms key to get it created before using to prevent a race condition on the creation of the DDB table
  • Loading branch information
badra001 committed Aug 24, 2023
1 parent dbf7c01 commit 8e15e68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,5 +270,9 @@
- update cloudforms_ami to empty in EW (as we have no keys defined)

* 2.4.3 -- 2023-06-23
- terraform-tate
- terraform-state
- add bucket_key_enabled (false) to enable bucket keys

* 2.4.4 -- 2023-08-24
- terraform-state
- add data resource for ddb kms key to get it created before using to prevent a race condition on the creation of the DDB table
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "2.4.3"
_module_version = "2.4.4"
}
1 change: 1 addition & 0 deletions terraform-state/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ No modules.
| [aws_iam_policy_document.tfstate_kms](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.tfstate_read](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.tfstate_write](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_kms_key.kms_dynamodb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
| [aws_regions.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/regions) | data source |

Expand Down
4 changes: 4 additions & 0 deletions terraform-state/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ locals {
}
}

# this pre-loads the key so that it is ready when the DDB table create happens
data "aws_kms_key" "kms_dynamodb" {
name = "alias/aws/dynamodb"
}

#---
# dynamodb table
Expand Down

0 comments on commit 8e15e68

Please sign in to comment.