Done :
main.tf contains script and iam type for your lambda
terraform plan to show the changes
terraform apply to apply the plan
aws lambda list-functions : to verify if lambda is created or not
console shows : Unknown output type:
Problem
After creating your terraform script to deploy a lambda
when you configure your aws cli with your information for the firstime :
aws_access_key_id = xxxx
aws_secret_access_key = xxx
region = eu-central-1
output = if you clicked just enter here or made any unknown output type
Solution
go to C:\Users\%%\.aws\config
change output = anything to output =json or xml
other information u can save ur
aws_access_key_id = xxxx
aws_secret_access_key = xxx
in credentieals file under /user.aws or in Environment_Variable , or insert them every time before request
——————
i use Git Bash to run scripts / terraform (functions) / aws (fucntions)