Skip to content

feat: Support FIPS-compliant extension layer #30

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ShepleySound
Copy link

Reference: #29

@ShepleySound ShepleySound requested a review from a team as a code owner May 30, 2025 20:10
@ShepleySound ShepleySound requested a review from alexgallotta May 30, 2025 20:10
Copy link
Contributor

@lym953 lym953 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 the changes!

variables.tf Outdated
@@ -32,6 +32,12 @@ variable "datadog_python_layer_version" {
default = 106
}

variable "datadog_enable_fips" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you rename it as datadog_is_fips_enabled to be consistent with Serverless Plugin?
DataDog/serverless-plugin-datadog#598 (comment)

Copy link
Author

Choose a reason for hiding this comment

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

Done! I see that there was also a change in that PR to make FIPS the default when in GovCloud. Would you prefer that behavior here as well? I'd just need to move that logic into the locals block.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please go ahead. Thanks for helping with this change!

Copy link
Author

Choose a reason for hiding this comment

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

Apologies for the late response! So in the serverless plugin site is a proper parameter, whereas here it's just a DD_SITE entry in an environment_variables map. That plus the fact that TF doesn't support conditional variable defaults (iirc) might make the implementation a bit sloppy.

I went ahead and gave it a go, but I'm also happy to revert it if it's a little too magical. Changing the default behavior might also be considered a breaking change.

@@ -55,7 +56,7 @@ locals {

locals {
datadog_extension_layer_arn = "${local.datadog_layer_name_base}:Datadog-Extension${local.datadog_extension_layer_suffix}:${var.datadog_extension_layer_version}"
datadog_extension_layer_suffix = local.datadog_layer_suffix
datadog_extension_layer_suffix = "${local.datadog_layer_suffix}${local.fips_suffix}"
Copy link
Contributor

Choose a reason for hiding this comment

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

what are we using the existing "datadog_layer_suffix" bit for? can we reuse it for fips?

Copy link
Author

@ShepleySound ShepleySound Jun 18, 2025

Choose a reason for hiding this comment

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

Looks like it's a lookup on the architectures variable and determines the suffix for both the layer for the Datadog Lambda Library and the layer for the Lambda Extension.

From what I've gathered from the docs, the Extension has FIPS-compatible layers, but the Lambda Library does not. So the suffixes are related, but do actually need to be different in this case.

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