Turn on Terraform Updates for Lambda Layers #250
Merged
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.
Description
Artemis currently ignores changes in the Lambda layers. This brings up the following problems:
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
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:
ignore_change
attribute. This will allow Terraform to make updates to the Lambda layersheimdall-core
andartemis-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 thearn
for the latest version of theartemis-backend-core
Lambda layerdatadog_secret_arn
- This stores thearn
for theDATADOG_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 thelambda_layers
variablesHow Has This Been Tested?
tested in a dev environment
Types of changes
Checklist
Pic