How to create multiple aliases for aws lambda function?

Hi guys,

Is it possible with Terraform to create multiple aliases for lambda_function and on each iteration to update the aliases one by one? What I did so far is to try for_each meta-argument:

resource "aws_lambda_alias" "test_lambda_alias" {
  for_each         = toset(["staging", "dev", "prod"])
  name             = each.value
  description      = "a sample description"
  function_name    = var.function_name
  function_version = != "" ? var.function_version : "$LATEST"

The block above will create the 3 aliases pointing to the $LATEST version but I want to instruct Terraform different way:

dev alias → point always to $LATEST
prod alias → to be updated after staging on the next iteration.
staging alias → point always to the latest version number

It must look something like that for example:

dev version: $LATEST
prod version: 19
staging version: 20