-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature: Persist forecasted grant opportunities to DynamoDB #926
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
enhancement
New feature or request
go
Pull requests that update Go code
terraform
Pull requests that update Terraform code
labels
Oct 7, 2024
Terraform Summary
OutputValidation Output
Plan OutputTerraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
- destroy
-/+ destroy and then create replacement
Terraform will perform the following actions:
# aws_s3_bucket_notification.grant_prepared_data will be updated in-place
~ resource "aws_s3_bucket_notification" "grant_prepared_data" {
id = "grantsingest-grantsprepareddata-357150818708-us-west-2"
# (2 unchanged attributes hidden)
~ lambda_function {
~ filter_suffix = "/ffis.org/v1.json" -> "/grants.gov/v2.OpportunityForecastDetail_1_0.xml"
id = "tf-s3-lambda-20240710180849875400000001"
~ lambda_function_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistFFISData" -> "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistGrantsGovXMLDB"
# (1 unchanged attribute hidden)
}
+ lambda_function {
+ events = [
+ "s3:ObjectCreated:*",
]
+ filter_suffix = "/ffis.org/v1.json"
+ lambda_function_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistFFISData"
}
# (2 unchanged blocks hidden)
}
# datadog_dashboard.service_dashboard[0] will be updated in-place
~ resource "datadog_dashboard" "service_dashboard" {
id = "4jj-dh7-k8z"
tags = []
# (9 unchanged attributes hidden)
~ widget {
id = 6267115815800911
~ group_definition {
# (3 unchanged attributes hidden)
~ widget {
id = 7818734294460690
~ timeseries_definition {
~ title = "Opportunity Records Saved vs Failed" -> "Grant Records Saved vs Failed"
# (3 unchanged attributes hidden)
~ request {
# (2 unchanged attributes hidden)
~ formula {
~ formula_expression = "records_saved" -> "opportunities_saved + records_saved"
# (1 unchanged attribute hidden)
# (1 unchanged block hidden)
}
~ formula {
~ formula_expression = "records_failed" -> "opportunities_failed + records_failed"
# (1 unchanged attribute hidden)
# (1 unchanged block hidden)
}
~ query {
~ metric_query {
~ name = "records_saved" -> "opportunities_saved"
# (2 unchanged attributes hidden)
}
}
~ query {
~ metric_query {
~ name = "records_failed" -> "records_saved"
~ query = "sum:grants_ingest.PersistGrantsGovXMLDB.opportunity.failed{$env,$service,$version}.as_count()" -> "sum:grants_ingest.PersistGrantsGovXMLDB.record.saved{$env,$service,$version}.as_count()"
# (1 unchanged attribute hidden)
}
}
+ query {
+ metric_query {
+ data_source = "metrics"
+ name = "opportunities_failed"
+ query = "sum:grants_ingest.PersistGrantsGovXMLDB.opportunity.failed{$env,$service,$version}.as_count()"
}
}
+ query {
+ metric_query {
+ data_source = "metrics"
+ name = "records_failed"
+ query = "sum:grants_ingest.PersistGrantsGovXMLDB.record.failed{$env,$service,$version}.as_count()"
}
}
}
# (1 unchanged block hidden)
}
# (1 unchanged block hidden)
}
# (2 unchanged blocks hidden)
}
# (1 unchanged block hidden)
}
# (14 unchanged blocks hidden)
}
# datadog_metric_metadata.custom["grants_ingest.PersistGrantsGovXMLDB.opportunity.failed"] will be destroyed
# (because key ["grants_ingest.PersistGrantsGovXMLDB.opportunity.failed"] is not in for_each map)
- resource "datadog_metric_metadata" "custom" {
- description = "Count of opportunity records that failed to be persisted to DynamoDB with Grants.gov data." -> null
- id = "grants_ingest.PersistGrantsGovXMLDB.opportunity.failed" -> null
- metric = "grants_ingest.PersistGrantsGovXMLDB.opportunity.failed" -> null
- short_name = "Failed opportunities" -> null
- statsd_interval = 0 -> null
- type = "gauge" -> null
- unit = "record" -> null
}
# datadog_metric_metadata.custom["grants_ingest.PersistGrantsGovXMLDB.opportunity.saved"] will be destroyed
# (because key ["grants_ingest.PersistGrantsGovXMLDB.opportunity.saved"] is not in for_each map)
- resource "datadog_metric_metadata" "custom" {
- description = "Count of opportunity records persisted to DynamoDB with Grants.gov data." -> null
- id = "grants_ingest.PersistGrantsGovXMLDB.opportunity.saved" -> null
- metric = "grants_ingest.PersistGrantsGovXMLDB.opportunity.saved" -> null
- short_name = "Saved opportunities" -> null
- statsd_interval = 0 -> null
- type = "gauge" -> null
- unit = "record" -> null
}
# module.DownloadFFISSpreadsheet.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-DownloadFFISSpreadsheet"
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-DownloadFFISSpreadsheet:65" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-DownloadFFISSpreadsheet:65/invocations" -> (known after apply)
tags = {}
~ version = "65" -> (known after apply)
# (21 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:downloadffisspreadsheet" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:downloadffisspreadsheet"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (11 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.DownloadFFISSpreadsheet.module.lambda_function.aws_lambda_permission.current_version_triggers["SQSQueueNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "SQSQueueNotification" -> (known after apply)
~ qualifier = "65" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (4 unchanged attributes hidden)
}
# module.DownloadGrantsGovDB.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-DownloadGrantsGovDB"
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-DownloadGrantsGovDB:65" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-DownloadGrantsGovDB:65/invocations" -> (known after apply)
tags = {}
~ version = "65" -> (known after apply)
# (21 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:downloadgrantsgovdb" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:downloadgrantsgovdb"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (13 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.DownloadGrantsGovDB.module.lambda_function.aws_lambda_permission.current_version_triggers["Schedule"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "Schedule" -> (known after apply)
~ qualifier = "65" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
# module.EnqueueFFISDownload.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-EnqueueFFISDownload"
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-EnqueueFFISDownload:65" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-EnqueueFFISDownload:65/invocations" -> (known after apply)
tags = {}
~ version = "65" -> (known after apply)
# (21 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:enqueueffisdownload" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:enqueueffisdownload"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (11 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.EnqueueFFISDownload.module.lambda_function.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "S3BucketNotification" -> (known after apply)
~ qualifier = "65" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
# module.ExtractGrantsGovDBToXML.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-ExtractGrantsGovDBToXML"
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-ExtractGrantsGovDBToXML:65" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-ExtractGrantsGovDBToXML:65/invocations" -> (known after apply)
tags = {}
~ version = "65" -> (known after apply)
# (21 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:extractgrantsgovdbtoxml" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:extractgrantsgovdbtoxml"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (11 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.ExtractGrantsGovDBToXML.module.lambda_function.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "S3BucketNotification" -> (known after apply)
~ qualifier = "65" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
# module.PersistFFISData.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-PersistFFISData"
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistFFISData:65" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistFFISData:65/invocations" -> (known after apply)
tags = {}
~ version = "65" -> (known after apply)
# (21 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:persistffisdata" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:persistffisdata"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (11 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.PersistFFISData.module.lambda_function.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "S3BucketNotification" -> (known after apply)
~ qualifier = "65" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
# module.PersistGrantsGovXMLDB.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
+ acl = (known after apply)
~ arn = "arn:aws:s3:::grantsingest-lambdaartifacts-357150818708-us-west-2/a30cca2909d3ff0253fabfe01f767ebe.zip" -> (known after apply)
~ bucket_key_enabled = false -> (known after apply)
+ checksum_crc32 = (known after apply)
+ checksum_crc32c = (known after apply)
+ checksum_sha1 = (known after apply)
+ checksum_sha256 = (known after apply)
~ content_type = "binary/octet-stream" -> (known after apply)
~ etag = "4ee06784221fce78424a87da9bd9f52a-3" -> (known after apply)
~ id = "a30cca2909d3ff0253fabfe01f767ebe.zip" -> (known after apply)
~ key = "a30cca2909d3ff0253fabfe01f767ebe.zip" -> "d9f2e88adbe4b96e9d03fba38336b72a.zip" # forces replacement
+ kms_key_id = (known after apply)
- metadata = {} -> null
~ storage_class = "STANDARD" -> (known after apply)
- tags = {} -> null
~ version_id = "NwTHy.CjQzQpko8fmjCS0AaihcuNqip8" -> (known after apply)
# (5 unchanged attributes hidden)
}
# module.PersistGrantsGovXMLDB.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-PersistGrantsGovXMLDB"
~ last_modified = "2024-10-08T18:05:14.000+0000" -> (known after apply)
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistGrantsGovXMLDB:65" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistGrantsGovXMLDB:65/invocations" -> (known after apply)
~ s3_key = "a30cca2909d3ff0253fabfe01f767ebe.zip" -> "d9f2e88adbe4b96e9d03fba38336b72a.zip"
tags = {}
~ version = "65" -> (known after apply)
# (19 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:persistgrantsgovxmldb" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:persistgrantsgovxmldb"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (11 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.PersistGrantsGovXMLDB.module.lambda_function.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "S3BucketNotification" -> (known after apply)
~ qualifier = "65" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
# module.PublishGrantEvents.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-PublishGrantEvents"
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PublishGrantEvents:66" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PublishGrantEvents:66/invocations" -> (known after apply)
tags = {}
~ version = "66" -> (known after apply)
# (21 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:publishgrantevents" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:publishgrantevents"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (11 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.PublishGrantEvents.module.lambda_function.aws_lambda_permission.current_version_triggers["dynamodb"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "dynamodb" -> (known after apply)
~ qualifier = "66" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
# module.ReceiveFFISEmail.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-ReceiveFFISEmail"
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-ReceiveFFISEmail:64" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-ReceiveFFISEmail:64/invocations" -> (known after apply)
tags = {}
~ version = "64" -> (known after apply)
# (21 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:receiveffisemail" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:receiveffisemail"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (12 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.ReceiveFFISEmail.module.lambda_function.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "S3BucketNotification" -> (known after apply)
~ qualifier = "64" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
# module.SplitFFISSpreadsheet.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-SplitFFISSpreadsheet"
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-SplitFFISSpreadsheet:65" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-SplitFFISSpreadsheet:65/invocations" -> (known after apply)
tags = {}
~ version = "65" -> (known after apply)
# (21 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:splitffisspreadsheet" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:splitffisspreadsheet"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
# (14 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.SplitFFISSpreadsheet.module.lambda_function.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "S3BucketNotification" -> (known after apply)
~ qualifier = "65" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
# module.SplitGrantsGovXMLDB.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
+ acl = (known after apply)
~ arn = "arn:aws:s3:::grantsingest-lambdaartifacts-357150818708-us-west-2/49619436296c4287a68f6bd8fc28c125.zip" -> (known after apply)
~ bucket_key_enabled = false -> (known after apply)
+ checksum_crc32 = (known after apply)
+ checksum_crc32c = (known after apply)
+ checksum_sha1 = (known after apply)
+ checksum_sha256 = (known after apply)
~ content_type = "binary/octet-stream" -> (known after apply)
~ etag = "ec011397e317df42edce7ed2137cd498-3" -> (known after apply)
~ id = "49619436296c4287a68f6bd8fc28c125.zip" -> (known after apply)
~ key = "49619436296c4287a68f6bd8fc28c125.zip" -> "9393e888662690c9418e85eb134ae42d.zip" # forces replacement
+ kms_key_id = (known after apply)
- metadata = {} -> null
~ storage_class = "STANDARD" -> (known after apply)
- tags = {} -> null
~ version_id = "JnIIh_CzcmrwvJk1i0wnPR_K6gS7YGtZ" -> (known after apply)
# (5 unchanged attributes hidden)
}
# module.SplitGrantsGovXMLDB.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "grants_ingest-SplitGrantsGovXMLDB"
~ last_modified = "2024-10-08T18:05:14.000+0000" -> (known after apply)
~ qualified_arn = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-SplitGrantsGovXMLDB:65" -> (known after apply)
~ qualified_invoke_arn = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-SplitGrantsGovXMLDB:65/invocations" -> (known after apply)
~ s3_key = "49619436296c4287a68f6bd8fc28c125.zip" -> "9393e888662690c9418e85eb134ae42d.zip"
tags = {}
~ version = "65" -> (known after apply)
# (19 unchanged attributes hidden)
~ environment {
~ variables = {
~ "DD_TAGS" = "git.commit.sha:c31998d5a08abeb22c4d77db01e4939a1a581dbe,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:splitgrantsgovxmldb" -> "git.commit.sha:7215e75f60b97ea94caaec7abcb0652875020c60,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:splitgrantsgovxmldb"
~ "DD_VERSION" = "c31998d5a08abeb22c4d77db01e4939a1a581dbe" -> "7215e75f60b97ea94caaec7abcb0652875020c60"
+ "MAX_SPLIT_FORECAST_RECORDS" = "-1"
+ "MAX_SPLIT_OPPORTUNITY_RECORDS" = "-1"
# (17 unchanged elements hidden)
}
}
# (3 unchanged blocks hidden)
}
# module.SplitGrantsGovXMLDB.module.lambda_function.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
~ id = "S3BucketNotification" -> (known after apply)
~ qualifier = "65" # forces replacement -> (known after apply) # forces replacement
+ statement_id_prefix = (known after apply)
# (5 unchanged attributes hidden)
}
Plan: 12 to add, 12 to change, 14 to destroy. Pusher: @TylerHendrickson, Action: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
go
Pull requests that update Go code
terraform
Pull requests that update Terraform code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket #861
Description
This PR modifies the
PersistGrantsGovXMLDB
pipeline step so that it supports persisting forecasted grant opportunities to DynamoDB. The process of taking XML data from an S3 object and persisting it to a DynamoDB item remains basically the same, except that all new records are persisted with anis_forecast
boolean field, which can be used to discriminate betweenOpportunitySynopsisDetail_1_0
(is_forecast=false
) andOpportunityForecastDetail_1_0
(is_forecast=true
) source XML record types.Summary of changes:
grantRecord
interface type is defined, which is implemented by bothopportunity
andforecast
struct types.xml.Decoder
instead of callingxml.Unmarshal()
, in order to explicitly mapOpportunitySynopsisDetail_1_0
andOpportunityForecastDetail_1_0
elements to their respective Go types.dynamodb.go
helper functions have been tweaked to only deal with types provided by the DynamoDB SDK rather than custom types defined locally, which makes it easier and cleaner to write unit tests for this file.is_forecast
attribute value."record"
terminology instead of"opportunity"
PersistGrantsGovXMLDB
is invoked when forecasted grant XML records are uploaded to S3. Note that this has no effect unless forecasted grants are being uploaded bySplitGrantsGovXMLDB
.Testing
docker-compose.yml
filetask local:from-scratch
)task local:invoke-DownloadGrantsGovDB
)is_forecast
attribute with the correct valueAutomated and Unit Tests
Manual tests for Reviewer
Checklist