Skip to content
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

PRMP-935 new lambda-generate-stitch-record #199

Merged
merged 15 commits into from
Oct 29, 2024
Merged

PRMP-935 new lambda-generate-stitch-record #199

merged 15 commits into from
Oct 29, 2024

Conversation

NogaNHS
Copy link
Contributor

@NogaNHS NogaNHS commented Oct 3, 2024

No description provided.


module "generate-stitch-record-lambda" {
source = "./modules/lambda"
name = "GenerateStitchRecord"
Copy link
Contributor

@abbas-khan10 abbas-khan10 Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call this GenerateLloydGeorgeStitch? So there is some consistency between this and the LloydGeorgeStitch lambda? Also it's a bit hard to tell which is responsible for creating the stitch job and Record is hard to differentiate between dynamo and patient records

@@ -134,6 +134,38 @@ module "zip_store_reference_dynamodb_table" {
owner = var.owner
}

module "stitch_store_reference_dynamodb_table" {
Copy link
Contributor

@abbas-khan10 abbas-khan10 Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this name also, as there's isn't a Stitch Store bucket. Maybe LloydGeorgeStitchJobMetadata?

@NogaNHS NogaNHS marked this pull request as ready for review October 14, 2024 09:10
@@ -72,19 +72,21 @@ module "delete-doc-ref-lambda" {
module.ndr-lloyd-george-store.s3_object_access_policy,
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
"arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy",
module.ndr-app-config.app_config_policy_arn
module.ndr-app-config.app_config_policy_arn,
module.stitch_metadata_reference_dynamodb_table.dynamodb_policy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we missing a depends on for these?

@@ -55,7 +55,7 @@ module "generate-document-manifest-lambda" {
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
"arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy",
module.ndr-app-config.app_config_policy_arn,
aws_iam_policy.dynamodb_stream_policy.arn
aws_iam_policy.dynamodb_stream_manifest_policy.arn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a depends_on

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it need to be in depends_on??

source = "./modules/dynamo_db"
table_name = var.stitch_metadata_dynamodb_table_name
hash_key = "ID"
deletion_protection_enabled = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should be true?

@@ -101,6 +103,7 @@ module "create-doc-ref-lambda" {
module.create-doc-ref-gateway,
module.ndr-app-config,
module.lloyd_george_reference_dynamodb_table,
module.document_reference_dynamodb_table
module.document_reference_dynamodb_table,
module.stitch_metadata_reference_dynamodb_table,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing comma

]
}

resource "aws_iam_policy" "dynamodb_stream_policy" {
resource "aws_iam_policy" "dynamodb_stream_manifest_policy" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're renaming this already, can it be called dynamodb_stream_manifest instead?

APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
LLOYD_GEORGE_BUCKET_NAME = "${terraform.workspace}-${var.lloyd_george_bucket_name}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyphen?

Copy link
Contributor

@chrisbloe chrisbloe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes :).

@NogaNHS NogaNHS merged commit f050c28 into main Oct 29, 2024
3 checks passed
@NogaNHS NogaNHS deleted the PRMP-935 branch October 31, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants