Skip to content

chatloop/terraform-aws-cloudfront-auth

Repository files navigation

AWS CloudFront Auth Terraform module

This module provisions a Lambda@Edge function that can be associated to a CloudFront distribution to provide OpenID Connect authentication at edge functionality.

Currently, the only supported provider is Microsoft AzureAD.

Requirements

Name Version
terraform ~> 1.0
aws ~> 5.0
external ~> 2.0
local ~> 2.0
tls ~> 4.0

Providers

Name Version
external 2.3.4
local 2.5.1
tls 4.0.5

Modules

Name Source Version
lambda github.com/terraform-aws-modules/terraform-aws-lambda 1d122404c2a3834ce39a7c5a319a3e754d5b0c29

Resources

Name Type
local_sensitive_file.config resource
tls_private_key.key_pair resource
external_external.create_config data source

Inputs

Name Description Type Default Required
client_id Microsoft Azure AD Application ID string n/a yes
client_secret Microsoft Azure AD Client Secret string n/a yes
function_name Name for the lambda function string "lambda-edge-azure-auth" no
redirect_uri Registered Microsoft Azure AD Application Redirect URI string n/a yes
session_duration Authenticated session duration, in hours number 168 no
simple_urls_enabled Appends index.html on to directory paths (e.g. www.example.com/about/ retrieves www.example.com/about/index.html from a backend s3 origin.) bool true no
tenant Microsoft Azure AD Tenant ID string n/a yes
trailing_slash_redirects_enabled Enables 301 redirects for directory paths not ending in a forward slash. e.g. www.example.com/about -> www.example.com/about/ bool false no

Outputs

Name Description
lambda_qualified_arn n/a

About

Terraform module that provides CloudFront authentication using Lambda@Edge

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages