You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updating Amazon DynamoDB Table: updating replicas, while creating: updating replica point in time recovery: updating PITR: ValidationException: 1 validation error detected: Invalid AWS region
#85
Open
1 task done
giogujabidze opened this issue
May 30, 2024
· 0 comments
Hi, I really hope that you can help me with this issue, as I already spent 3 days troubleshooting and trying different things.
Thanks in advance.
Description
We have several DynamoDB tables in our main region (us-east-1) and want to create replica (global) tables in another region (us-east-2). We have PITR enabled in main region but we do not want to enable it for tables in replica region. So, I have terraform script which in theory should work fine and it actually creates all the replica tables, but the process completes with very weird error:
Error: updating Amazon DynamoDB Table (arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>): updating replicas, while creating: updating replica (us-east-2) point in time recovery: updating PITR: ValidationException: 1 validation error detected: Invalid AWS region in 'arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>'
This very same error shows for each table created in replica region, though as i mentioned the global tables have been created successfully. I think it somehow tries to configure PITR for replica region as well, but I don't understand why.
I first tried to not pass point_in_time_recovery parameter in replica_regions block at all, as I see that your module will set it to null here and the default value for aws_dynamodb_table resource is false in aws provider according to the documentation.
Then I tried to update configuration and pass point_in_time_recovery parameter as false explicitly in replica_regions block, but I've got the same error. I cannot find anything related in the Internet. I understand that it is ValidationException returned from aws api, but I don't understand what am I missing?
✋ I have searched the open/closed issues and my issue is not listed.
-Are you using workspaces?
-No, we are not using workspace.
-Have you cleared the local cache (see Notice section above)?
-Yes, I have cleared the local cache
List steps in order that led up to the issue you encountered:
-Just run terraform apply that's it. Plan shows everything good, but plan generates error mentioned above.
Expected behavior
This should create replica (global) tables in replica region without PITR.
Actual behavior
It actually creates replica tables, but process completes with error (for each table described in terraform configuration) already mentioned above:
Error: updating Amazon DynamoDB Table (arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>): updating replicas, while creating: updating replica (us-east-2) point in time recovery: updating PITR: ValidationException: 1 validation error detected: Invalid AWS region in 'arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>'
Terminal Output Screenshot(s)
Additional context
After the global tables were created despite the fact that terraform apply failed, now if I run it one more time, even terraform plan completes with this error:
Error: reading Amazon DynamoDB Table (arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>): describing Continuous Backups: ValidationException: 1 validation error detected: Invalid AWS region in 'arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>' status code: 400, request id: AND2DAN15FOAP7KSA3LK5VCDDRVV4KQNSO5AEMVJF66Q9ASUAAJG
That's why I think that it tries to configure PITR for replica tables as well, even that I set it to false explicitly.
The text was updated successfully, but these errors were encountered:
Hi, I really hope that you can help me with this issue, as I already spent 3 days troubleshooting and trying different things.
Thanks in advance.
Description
We have several DynamoDB tables in our main region (us-east-1) and want to create replica (global) tables in another region (us-east-2). We have PITR enabled in main region but we do not want to enable it for tables in replica region. So, I have terraform script which in theory should work fine and it actually creates all the replica tables, but the process completes with very weird error:
Error: updating Amazon DynamoDB Table (arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>): updating replicas, while creating: updating replica (us-east-2) point in time recovery: updating PITR: ValidationException: 1 validation error detected: Invalid AWS region in 'arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>'
This very same error shows for each table created in replica region, though as i mentioned the global tables have been created successfully. I think it somehow tries to configure PITR for replica region as well, but I don't understand why.
I first tried to not pass
point_in_time_recovery
parameter inreplica_regions
block at all, as I see that your module will set it to null here and the default value foraws_dynamodb_table
resource isfalse
in aws provider according to the documentation.Then I tried to update configuration and pass
point_in_time_recovery
parameter asfalse
explicitly inreplica_regions
block, but I've got the same error. I cannot find anything related in the Internet. I understand that it isValidationException
returned from aws api, but I don't understand what am I missing?Versions
Module version [Required]: 4.0.1
Terraform version: 1.7.4
Provider version(s): 5.46.0
Reproduction Code [Required]
main.tf
local.tf
data.tf
provider.tf
Steps to reproduce the behavior:
-Are you using workspaces?
-No, we are not using workspace.
-Have you cleared the local cache (see Notice section above)?
-Yes, I have cleared the local cache
List steps in order that led up to the issue you encountered:
-Just run
terraform apply
that's it. Plan shows everything good, but plan generates error mentioned above.Expected behavior
This should create replica (global) tables in replica region without PITR.
Actual behavior
It actually creates replica tables, but process completes with error (for each table described in terraform configuration) already mentioned above:
Error: updating Amazon DynamoDB Table (arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>): updating replicas, while creating: updating replica (us-east-2) point in time recovery: updating PITR: ValidationException: 1 validation error detected: Invalid AWS region in 'arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>'
Terminal Output Screenshot(s)
Additional context
After the global tables were created despite the fact that
terraform apply
failed, now if I run it one more time, eventerraform plan
completes with this error:Error: reading Amazon DynamoDB Table (arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>): describing Continuous Backups: ValidationException: 1 validation error detected: Invalid AWS region in 'arn:aws:dynamodb:us-east-1:<aws_account_id>:table/<table_name>' status code: 400, request id: AND2DAN15FOAP7KSA3LK5VCDDRVV4KQNSO5AEMVJF66Q9ASUAAJG
That's why I think that it tries to configure PITR for replica tables as well, even that I set it to false explicitly.
The text was updated successfully, but these errors were encountered: