import function with AWS resource

wanted to use the terraform import option to get AWS lambda function .
within main.tf file i write the below -
import {
to = aws_lambda_function.gembot_lambda_function
id = var.lambda_import_id
}

and within variable.tf
variable “lambda_import_id” {}

and within value.tf file write the exact value
lambda_import_id = “stockmgmt-gem-connector-healthcheck-import”

but this is not working .
NB:we don’t have a option to put the exact id within main.tf file we need to use the above steps.
Please let me know the exact solution