[Terraform]lambdaの環境変数をignore_changesする

LINEで送る
Pocket

resource "aws_lambda_function" "hoge" {
  s3_bucket     = "hoge"
  s3_key        = "lambda/hoge.zip"
  function_name = "hoge"
  role          = aws_iam_role.hoge.arn
  handler       = "lambda_function.lambda_handler"
  runtime       = "python3.7"
  memory_size   = "128"
  timeout       = "600"
  environment {
    variables = {
      API_Key = ""     
    }
  }


  lifecycle {
    ignore_changes = [
      environment["API_Key"],
    ]
  }

 

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *