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

Turn on Terraform Updates for Lambda Layers #250

Merged
merged 5 commits into from
Aug 28, 2024
Merged

Turn on Terraform Updates for Lambda Layers #250

merged 5 commits into from
Aug 28, 2024

Conversation

Kamsiy
Copy link
Contributor

@Kamsiy Kamsiy commented Aug 28, 2024

Description

Artemis currently ignores changes in the Lambda layers. This brings up the following problems:

  1. Ignoring changes makes it difficult to update Layers without a custom script. For example, deploying new Datadog layers is not possible without running a custom script

  2. When Terraform has to destroy and recreate a Lambda, the layers that are manually added through a script are also removed from the Lambda.

To fix some of these issues, this PR:

  • Removes the ignore_change attribute. This will allow Terraform to make updates to the Lambda layers
  • Adds a data source to fetch the latest version of the heimdall-core and artemis-backend-core Lambda layers. This makes it easier to update the lambda layers in Multiple AWS Lambdas.

Other Updates:

Renamed terraform variables:

  • datadog_lambda_variables -> datadog_environment_variables

Added terraform outputs to share values with other modules:

  • backend_core_lambda_layer - This stores the arn for the latest version of the artemis-backend-core Lambda layer
  • datadog_secret_arn - This stores the arn for the DATADOG_API_SECRET.

Removed terraform variables:

  • extra_lambda_layers_* - Since shifting to having a core lambda layer for all Lambdas, these variables are no longer needed.
  • datadog_lambda_layers - These layers will be added to the lambda_layers variables

How Has This Been Tested?

tested in a dev environment

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change

Checklist

  • My code follows conforms to the coding standards.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Pic

Embed something funny here

@Kamsiy Kamsiy marked this pull request as ready for review August 28, 2024 17:32
@Kamsiy Kamsiy requested a review from a team as a code owner August 28, 2024 17:32
@Kamsiy Kamsiy added this pull request to the merge queue Aug 28, 2024
Merged via the queue into main with commit 3edbe7f Aug 28, 2024
6 checks passed
@Kamsiy Kamsiy deleted the lambda_layers branch August 28, 2024 18:34
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.

2 participants