Skip to content

Terraform AWS sample code to demonstrate AWS Lambda Function URL

License

Notifications You must be signed in to change notification settings

haakond/terraform-aws-lambda-function-url

Repository files navigation

About

Terraform AWS sample code to demonstrate AWS Lambda Function URL as explained at https://hedrange.com/ . Link to come soon.

Usage

See examples/main.tf.

Requirements

Name Version
aws >= 5.47.0

Providers

Name Version
aws >= 5.47.0
aws.us-east-1 >= 5.47.0

Modules

Name Source Version
cloudfront_logs git::https://github.com/terraform-aws-modules/terraform-aws-s3-bucket.git?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a
lambda_function_url_demo git::https://github.com/terraform-aws-modules/terraform-aws-lambda.git?ref=f7866811bc1429ce224bf6a35448cb44aa5155e7

Resources

Name Type
aws_cloudfront_distribution.lambda_function_url_demo resource
aws_cloudfront_origin_access_control.cloudfront_oac_lambda_url resource
aws_cloudwatch_log_group.waf_cloudwatch_logs resource
aws_cloudwatch_log_resource_policy.waf_cloudwatch_logs_resource_policy resource
aws_lambda_permission.allow_cloudfront resource
aws_wafv2_web_acl.lambda_function_url_demo resource
aws_wafv2_web_acl_logging_configuration.waf_cloudwatch_logs_config resource
aws_caller_identity.current data source
aws_canonical_user_id.current data source
aws_cloudfront_log_delivery_canonical_user_id.cloudfront data source
aws_iam_policy_document.waf_logging data source
aws_region.current data source

Inputs

Name Description Type Default Required
provision_cloudfront Toggle for provisioning Cloudfront resources as a second module call, to avoid issues with circular dependencies for Lambda permissions. bool false no

Outputs

Name Description
lambda_function_url_demo_arn Lambda Function URL Demo ARN
lambda_function_url_demo_url Lambda Function URL Demo URL

Note: The inputs and outputs sections are automatically generated by terraform-docs in a git pre-commit hook. This requires setup of pre-commit-terraform . Follow the install instructions to use, including the dependencies setup. pre-commit ensures correct formatting, linting and generation of documentation. It also check's for trailing whitespace, merge conflics and mixed line endings. See .pre-commit-config.yaml for more information. A full guide to the pre-commit framework can be found here.

Authors/contributors

See contributors.

License

MIT licensed. See LICENSE. Feel free to fork and make use of what you want.

About

Terraform AWS sample code to demonstrate AWS Lambda Function URL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published