BFD-4155: Refactor EFT service into Greenfield Terraform - #2780
Conversation
Enables easy redrive. This commit does not include the changes to support SQS event invocation in the Lambda itself
malessi
left a comment
There was a problem hiding this comment.
I have left comments on all relevant files that are entirely additions to help guide reviews towards code that actually should be looked at.
If a file—that is marked as totally new—was left uncommented, that file can be safely ignored as it was copied directly from the legacy eft code or is just altogether unimportant. Anything marked as having changes should be reviewed like normal.
For some files I explicitly mark the lines that were changed with respect to the legacy Terraservice/code. Others have more substantial changes where enumerating each block and what it corresponds to in the legacy code would be too onerous, so I just commented that there were relevant changes and where to find the original code.
JIRA Ticket:
BFD-4155
What Does This PR Do?
This PR refactors the legacy
eftTerraservice into the newops/servicesGreenfield OpenTofu hierarchy using the new patterns and style. It has been split into02-eftand03-eft-o11y(this Terraservice being the child module of the legacyeftTerraservice—now independent). Largely, the BFD EFT service itself is the same.In more detail, this PR:
02-eftto the Greenfield Terraform adapted from the legacyeftTerraservicesftp-outbound-transferLambda is now invoked by an SQS Queue associated with the existing Dead Letter Queue such that it is possible to easily redrive failing eventslogging-sns-topicOpenTofu Module (see below)outputs.tf03-eft-o11yto the Greenfield Terraform adapted from thebfd_eft_outbound_o11ychild module of the legacyeftTerraserviceoutbound-slack-notifiernow usesuveft(seeinputs.tf) for values that were originally provided via variableslogging-sns-topicaws_sns_topicvia outputsplatformTerraservices and moreThis PR seems quite large, and that is unfortunately due to copying the existing legacy Terraservice instead of moving it as we need to keep it around for the Greenfield transition of BFD EFT. Most additions are actually lines unchanged from the original Terraservice.
What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
What Security Implications Does This PR Have?
Please indicate if this PR does any of the following:
Adds any new software dependenciesModifies any security controlsAdds new transmission or storage of dataAny other changes that could possibly affect security?I have considered the above security implications as it relates to this PR. (If one or more of the above apply, it cannot be merged without the ISSO or team security engineer's (
@sb-benohe) approval.)I have created tests to sufficiently ensure the reliability of my code, if applicable. If this is a modification to an existing piece of code, I have audited the associated tests to ensure everything works as expected.
Validation
Have you fully verified and tested these changes? Is the acceptance criteria met? Please provide reproducible testing instructions, code snippets, or screenshots as applicable.
tofu applyingeftandeft-o11ytotestGreenfield, verifying that:applys are successful with no unexpected changessftping into the Transfer Family SFTP Server via the NLB created byeft, verifying that:puta file to thebfd-test-eft...Bucketsftp-outbound-transferLambda after uploading a file todpc/out, verifying that:outbound-slack-notifiersends a Slack message indicating failure, as expected