techservicesillinois / terraform-aws-cloudwatch-to-splunk

Provide lambda function to migrate CloudWatch logs to Splunk
MIT License
3 stars 7 forks source link

Don't hardcode S3 bucket in this module, other cleanup #3

Closed JonRoma closed 10 months ago

JonRoma commented 4 years ago

This module contains lines of Terraform code like this:

s3_bucket   = "drone-${local.region}-${local.account_id}"

s3_key      = "splunk-aws-serverless-apps/splunk-cloudwatch-logs-processor.zip"

One question I would ask is whether there is a common location (bucket or wherever) that we should establish for .zip files to be deployed to lambda. As noted, this should be overridable, of course). The reason we did this as we did is that we had issues with "stale" lambda functions being deployed when we used inline code Recall that we had issues deploying a lambda function inline, which is why we switched to putting them into S3 and deploying them from there.

For this type of deployment, the bucket name is reasonable default, but I agree that it should allow being overridden by the caller.

Honestly, given that our Terraform code to stand up lambda functions is not consistent from one deployment, we should review and reconsider with the thought of sharing more code.

JonRoma commented 10 months ago

The offending code has been retired. See #839a52edfd1.