Wednesday, February 21, 2024
HomeSoftware EngineeringFind out how to add a Lambda Setting Variable in Terraform

Find out how to add a Lambda Setting Variable in Terraform


In case you have an aws_lambda_function block that should make use of atmosphere variables, then you’ll be able to merely do the next:

useful resource "aws_lambda_function" "test_lambda" {
  filename         = "lambda_function_payload.zip"
  function_name    = "lambda_function_name"
  runtime          = "python3.9"
  ...

  atmosphere {
    variables = {
      api_key = "secret-key"
    }
  }
}

The above instance creates an atmosphere variable referred to as api_key with a price of secret-key

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments