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

Set Datadog metric type #380

Merged
merged 4 commits into from
Sep 29, 2023
Merged

Conversation

TylerHendrickson
Copy link
Member

Description

This PR includes a slight tweak to our Terraform's datadog_metrics_metadata input variable structure to allow setting a type value for custom metrics, which conforms to the resource that gets populated by this input variable. When no metric type is defined, it now defaults to gauge, which is the default behavior in Datadog.

This change is trivial, but the net impact will be much cleaner terraform plan outputs from CI jobs. Currently, Terraform detects that the local value for a metric is null, but that the Datadog API reports the metric as having a defined type (generally gauge), so Terraform plans a change to the resource (e.g. type = "gauge" -> null), even though it has no effect on the target Datadog resource.

With these changes in-place, Terraform should no longer detect a discrepancy unless the actual metric type differs from what is configured in Terraform, which is something that should be addressed upon detection. Therefore, by removing a "perma-diff", this change makes terraform plan PR feedback more relevant and less likely to be ignored.

Testing

Once the CI workflow publishes a comment to this PR containing a Terraform plan, review it to ensure metric type discrepancies are no longer reported. For an example of what we don't want, refer to a historical PR's plan comment, such as this one.

Automated and Unit Tests

  • Added Unit tests

Manual tests for Reviewer

  • Added steps to test feature/functionality manually

Checklist

  • Provided ticket and description
  • Provided testing information
  • Provided adequate test coverage for all new code
  • Added PR reviewers

@TylerHendrickson TylerHendrickson requested a review from a team September 27, 2023 18:18
@TylerHendrickson TylerHendrickson self-assigned this Sep 27, 2023
@TylerHendrickson TylerHendrickson requested review from santina and jakekreider and removed request for a team and santina September 27, 2023 18:18
@github-actions github-actions bot added the terraform Pull requests that update Terraform code label Sep 27, 2023
@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Terraform Summary

Step Result
🖌 Terraform Format & Style
⚙️ Terraform Initialization
🤖 Terraform Validation
📖 Terraform Plan

Output

Validation Output
Success! The configuration is valid.


Plan Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.DownloadFFISSpreadsheet.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "855a67cd988751c34975d85fa7d752e6-3" -> (known after apply)
      ~ id                     = "3a1177181ecb464ebed4d5db3246ee38.zip" -> (known after apply)
      ~ key                    = "3a1177181ecb464ebed4d5db3246ee38.zip" -> "a68288a400b89601fd9240032ac9f588.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "OyH6P3QpqRG4LdhClqcvUsOSKr1EE3If" -> (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.DownloadFFISSpreadsheet.module.lambda_function.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "grants_ingest-DownloadFFISSpreadsheet"
      ~ last_modified                  = "2023-09-27T19:01:44.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-DownloadFFISSpreadsheet:21" -> (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:21/invocations" -> (known after apply)
      ~ s3_key                         = "3a1177181ecb464ebed4d5db3246ee38.zip" -> "a68288a400b89601fd9240032ac9f588.zip"
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                      = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:downloadffisspreadsheet" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:downloadffisspreadsheet"
              ~ "DD_VERSION"                   = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (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           = "21" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (4 unchanged attributes hidden)
    }

  # module.DownloadGrantsGovDB.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "eecc43d1d412bf655af248c5d87c90a2-3" -> (known after apply)
      ~ id                     = "edb764d279c0123d8e8538c425ee1e1c.zip" -> (known after apply)
      ~ key                    = "edb764d279c0123d8e8538c425ee1e1c.zip" -> "e95979c86b17c63e370eca79acffe338.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "7u6_FCCNIzbqPu2sE23y9XZwLqvK2WCE" -> (known after apply)
        # (5 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"
      ~ last_modified                  = "2023-09-27T19:01:43.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-DownloadGrantsGovDB:21" -> (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:21/invocations" -> (known after apply)
      ~ s3_key                         = "edb764d279c0123d8e8538c425ee1e1c.zip" -> "e95979c86b17c63e370eca79acffe338.zip"
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                        = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:downloadgrantsgovdb" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:downloadgrantsgovdb"
              ~ "DD_VERSION"                     = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (12 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           = "21" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.EnqueueFFISDownload.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "649eea23df6545b4a89b540b1e9306e9-3" -> (known after apply)
      ~ id                     = "d428deef7f712d87f2496c423935917a.zip" -> (known after apply)
      ~ key                    = "d428deef7f712d87f2496c423935917a.zip" -> "af6e9484453a23f6e7004a60e3f30f93.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "Zj23gdzH_cVAf.Cd5Lw2H2Ng38KC2LR8" -> (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"
      ~ last_modified                  = "2023-09-27T19:01:44.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-EnqueueFFISDownload:21" -> (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:21/invocations" -> (known after apply)
      ~ s3_key                         = "d428deef7f712d87f2496c423935917a.zip" -> "af6e9484453a23f6e7004a60e3f30f93.zip"
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                      = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:enqueueffisdownload" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:enqueueffisdownload"
              ~ "DD_VERSION"                   = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (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           = "21" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.ExtractGrantsGovDBToXML.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "f333496764c58215ea00b82961cdb9ae-3" -> (known after apply)
      ~ id                     = "4691a81b2c15045cf0758fa762e627a8.zip" -> (known after apply)
      ~ key                    = "4691a81b2c15045cf0758fa762e627a8.zip" -> "2b37f61d9a8146f9940fda43bc4dc235.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "Zs6HTg.T5UW2M.7D0shh5sm9OwjH6fP6" -> (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"
      ~ last_modified                  = "2023-09-27T19:01:44.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-ExtractGrantsGovDBToXML:21" -> (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:21/invocations" -> (known after apply)
      ~ s3_key                         = "4691a81b2c15045cf0758fa762e627a8.zip" -> "2b37f61d9a8146f9940fda43bc4dc235.zip"
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                      = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:extractgrantsgovdbtoxml" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:extractgrantsgovdbtoxml"
              ~ "DD_VERSION"                   = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (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           = "21" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.PersistFFISData.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "a0009fd48135269642d4a430ec0e9989-3" -> (known after apply)
      ~ id                     = "0b3b558ffa9fe7ef4eeb739946679ef7.zip" -> (known after apply)
      ~ key                    = "0b3b558ffa9fe7ef4eeb739946679ef7.zip" -> "f3f190fc7a19d73cb139bf34dd2feddd.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "aKNs1RpnbdvBZkBCjWzBE_Z1QbLN2WD9" -> (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"
      ~ last_modified                  = "2023-09-27T19:01:44.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistFFISData:21" -> (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:21/invocations" -> (known after apply)
      ~ s3_key                         = "0b3b558ffa9fe7ef4eeb739946679ef7.zip" -> "f3f190fc7a19d73cb139bf34dd2feddd.zip"
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                       = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:persistffisdata" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:persistffisdata"
              ~ "DD_VERSION"                    = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (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           = "21" # 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" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "a6248f5683061ecb434409ddcc22fe3b-3" -> (known after apply)
      ~ id                     = "bb4123251f0ddc6c89dd250e8231301d.zip" -> (known after apply)
      ~ key                    = "bb4123251f0ddc6c89dd250e8231301d.zip" -> "f3466d732ef128366f65fe86e4c4d199.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "Me6LTipmSF0X6_MEK74s6LJAK7rqLjGt" -> (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                  = "2023-09-27T19:01:43.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PersistGrantsGovXMLDB:21" -> (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:21/invocations" -> (known after apply)
      ~ s3_key                         = "bb4123251f0ddc6c89dd250e8231301d.zip" -> "f3466d732ef128366f65fe86e4c4d199.zip"
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                       = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:persistgrantsgovxmldb" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:persistgrantsgovxmldb"
              ~ "DD_VERSION"                    = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (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           = "21" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.PublishGrantEvents.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "5bc87cc3d2e007469bf83279f002ade9-3" -> (known after apply)
      ~ id                     = "ce41b37da25ba73c2cb38d572e9acb37.zip" -> (known after apply)
      ~ key                    = "ce41b37da25ba73c2cb38d572e9acb37.zip" -> "b89c18811b5d08fd93fa7da86271e0a2.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "e1RjjPuuvV1bC2QV1LRj8v8TI1kw6IrO" -> (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"
      ~ last_modified                  = "2023-09-27T19:01:43.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-PublishGrantEvents:22" -> (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:22/invocations" -> (known after apply)
      ~ s3_key                         = "ce41b37da25ba73c2cb38d572e9acb37.zip" -> "b89c18811b5d08fd93fa7da86271e0a2.zip"
        tags                           = {}
      ~ version                        = "22" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                      = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:publishgrantevents" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:publishgrantevents"
              ~ "DD_VERSION"                   = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (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           = "22" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.ReceiveFFISEmail.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "4aa4e4203db130825212ebf727d3a828-3" -> (known after apply)
      ~ id                     = "86b19102e9c5d1ad069edc474ce4d0d4.zip" -> (known after apply)
      ~ key                    = "86b19102e9c5d1ad069edc474ce4d0d4.zip" -> "2a25808ce1dba8852f90a127e8b9ac8f.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "Ic31Tug4onplunAMJsc5NlO_lRlSSBCv" -> (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"
      ~ last_modified                  = "2023-09-27T19:01:44.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-ReceiveFFISEmail:20" -> (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:20/invocations" -> (known after apply)
      ~ s3_key                         = "86b19102e9c5d1ad069edc474ce4d0d4.zip" -> "2a25808ce1dba8852f90a127e8b9ac8f.zip"
        tags                           = {}
      ~ version                        = "20" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                        = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:receiveffisemail" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:receiveffisemail"
              ~ "DD_VERSION"                     = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (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           = "20" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.SplitFFISSpreadsheet.module.lambda_artifact.aws_s3_object.lambda_function must be replaced
-/+ resource "aws_s3_object" "lambda_function" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "7db5018c8c9b68c67fb1d6793d774887-3" -> (known after apply)
      ~ id                     = "b9bf6f7e51c82a2c444d3c8e3c85a978.zip" -> (known after apply)
      ~ key                    = "b9bf6f7e51c82a2c444d3c8e3c85a978.zip" -> "d23041aef138dbe2c78bc2ffa5788f7c.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "D6HTuStTzxCwm2trLkPzO1KbLhw_Alma" -> (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"
      ~ last_modified                  = "2023-09-27T19:01:44.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-SplitFFISSpreadsheet:21" -> (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:21/invocations" -> (known after apply)
      ~ s3_key                         = "b9bf6f7e51c82a2c444d3c8e3c85a978.zip" -> "d23041aef138dbe2c78bc2ffa5788f7c.zip"
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                          = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:splitffisspreadsheet" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:splitffisspreadsheet"
              ~ "DD_VERSION"                       = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (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           = "21" # 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" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "f1755ba1b1c8149d4cbf7a6ed617229f-3" -> (known after apply)
      ~ id                     = "f56d7e949ba37af8e0a8b6764d1e3fcd.zip" -> (known after apply)
      ~ key                    = "f56d7e949ba37af8e0a8b6764d1e3fcd.zip" -> "85558ae7c9968741885300412cfb25b0.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "ySsKqrwVWIyrFfD0U72oIiNdO5NNU3mp" -> (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                  = "2023-09-27T19:01:43.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:grants_ingest-SplitGrantsGovXMLDB:21" -> (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:21/invocations" -> (known after apply)
      ~ s3_key                         = "f56d7e949ba37af8e0a8b6764d1e3fcd.zip" -> "85558ae7c9968741885300412cfb25b0.zip"
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_TAGS"                          = "git.commit.sha:bd8b0c635085f557a9d8ddae53edb80909d14926,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:splitgrantsgovxmldb" -> "git.commit.sha:b45bcc189acfd2223c13e933ff9dda112f00c619,git.repository_url:github.com/usdigitalresponse/grants-ingest,handlername:splitgrantsgovxmldb"
              ~ "DD_VERSION"                       = "bd8b0c635085f557a9d8ddae53edb80909d14926" -> "b45bcc189acfd2223c13e933ff9dda112f00c619"
                # (14 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           = "21" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

Plan: 20 to add, 10 to change, 20 to destroy.

Pusher: @TylerHendrickson, Action: pull_request_target, Workflow: Continuous Integration

@TylerHendrickson TylerHendrickson enabled auto-merge (squash) September 27, 2023 19:59
@TylerHendrickson TylerHendrickson merged commit 15da07d into main Sep 29, 2023
17 checks passed
@TylerHendrickson TylerHendrickson deleted the feat/set-datadog-metric-types branch September 29, 2023 12:25
@TylerHendrickson TylerHendrickson added the enhancement New feature or request label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request terraform Pull requests that update Terraform code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants