-
Notifications
You must be signed in to change notification settings - Fork 7
Add database options to aws/azure/universal scalardl modules #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add database options to aws/azure/universal scalardl modules #237
Conversation
Add `database` and `database_contact_port` variables to the universal/scalardl module
8a37236
to
57dc7cc
Compare
The DynamoDB resion should be specified in `database_contact_points` instead since scalardb uses contact_points as a region.
57dc7cc
to
fcf2512
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@tei-k Please take a look! |
"%s %s", | ||
"docker run --rm ${var.schema_loader_image} -h ${var.database_contact_points} -u ${var.database_username} -p ${var.database_password}", | ||
var.database == "cassandra" ? "--cassandra -P ${var.database_contact_port} -n NetworkTopologyStrategy -R ${var.cassandra_replication_factor}" : | ||
var.database == "dynamo" ? "--dynamo --region ${var.database_contact_points}" : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how it works with --region ${var.database_contact_points}
. 💦
var.database_contact_points
is dynamodb.${region}.amazonaws.com
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. When DynamoDB is used, the region name should be specified in the contact_points
variable.
https://github.com/scalar-labs/scalardb/blob/master/docs/getting-started-with-dynamodb.md#configure-scalar-db
This is also added in the database_contact_points
variable's description. https://github.com/scalar-labs/scalar-terraform/pull/237/files#diff-c29567323bde55c7871f3e1b1fd9242c4f268d7d82129d0eb5fce499a78319d4R18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looking good. Left one qustion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
https://scalar-labs.atlassian.net/browse/DLT-7415
Add
database
,database_contact_points
anddatabase_contact_port
variables to Terraform modules.To-Dos
The latest
scalar-ledger
image andscalardl-schema-loader
image don't support DynamoDB yet. Their versions should be updated to work with DynamoDB.