new Lambda Function URL with Terraform

1

I have noticed the new Function URL for lambdas that have just been launched recently. I am interested to use this functionality as it will be a cost-saver for us. However, I have not found any way to add it to integrate it into our terraform files. the tutorial here uses all other services but terraform. If you have any idea how and if it can be done, I will be grateful.

Thanks!

The DF
demandé il y a 2 ans3112 vues
2 réponses
2
Réponse acceptée

You can use the aws_lambda_function_url resource in Terraform, something like this:

resource "aws_lambda_function_url" "function" {
    function_name      = aws_lambda_function.function.function_name
    authorization_type = "NONE"
}

You can find more information in the documentation: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function_url

Ed
répondu il y a 2 ans
AWS
EXPERT
Gokul
vérifié il y a 2 ans
1

This blog article does a nice end-to-end walkthrough of creating a lambda function url resource with Terraform including the provider block, aws_lambda_function_url resource and dependencies:

https://nquayson.com/aws-lambda-function-url-using-terraform-quick-walkthrough

naleb
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions