I am trying to provision dynamodb table but getting below error
Error: Required attribute is not set
on dynamo.tf line 16, in resource “aws_dynamodb_table” “UsersTable”:
16: resource “aws_dynamodb_table” “UsersTable” {
code:
provider.tf:
provider “aws” {
region = “us-west-2”
version = “3.10.0”
}
dynamo.tf
resource “aws_dynamodb_table” “UsersTable” {
name = “${var.dynamo_environment}-users-table”
billing_mode = “PAY_PER_REQUEST”
attribute {
name = "instance_id"
type = "S"
}
attribute {
name = "user_id"
type = "S"
}
hash_key = “instance_id”
range_key = “user_id”
point_in_time_recovery {
enabled = true
}
stream_enabled = “${var.dynamo_environment == “prod” || var.dynamo_environment == “int5” ? true : false}”
stream_view_type = “${var.dynamo_environment == “prod” || var.dynamo_environment == “int5” ? “NEW_AND_OLD_IMAGES” : null}”
replica {
region_name = "${var.dynamo_environment == "prod" || var.dynamo_environment == "int5" ? "us-east-1" : null}"
}
}
Surprisingly it was working till couple of days ago and started failing today
Can anyone help here?