In the AWS console there is an option to change the lambda log format between text and JSON under Configuration > Monitoring and operations tools > Logging configuration > Log format. It appears to be defaulting to Text and I want to update it to JSON for all my lambda functions. The functions are currently completely managed with Terraform but I don’t see any option in the provider documentation for this setting in Terraform. Am I missing something or does Terraform not support this setting? Any other options besides something like explicitly setting it using the API?
I reviewed terraform provider lambda documentation and terraform provider cloudwatch log group documentation. I did not find any relevant settings.
2
Answers
Amazon added this log configuration feature to AWS Lambda only 5 days ago. The Terraform AWS Provider does not support this new feature yet. There is an issue you can upvote and track here, to add the feature.
You can use the
awscc
provider for that, it seems it is already available: