Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom header block into distribution origin block #108

Merged
merged 3 commits into from
Nov 27, 2020

Conversation

homeria-repo
Copy link
Contributor

what

  • add custom_origin_headers variable

  • Updated README.md

  • Update variables.tf

  • Update main.tf

  • Updated README.md

  • Executed 'terraform fmt'

why

Use case : LambdaEdge does not allow environment variables, so if you want use multiple distributions to call same lambdaEdge function you can use a custom_headers block into distribution to pass some variables that the lambda function can read and execute some logic depends of a distribution.

references

https://stackoverflow.com/questions/54828808/aws-lambdaedge-nodejs-environment-variables-are-not-supported#:~:text=Environment%20variables%20are%20not%20supported%20by%20Lambda%40Edge%20as%20specified,with%20CloudFront%20Origin%20Custom%20Headers.

* add custom_origin_headers variable

Use case : LambdaEdge does not allow environment variables, so if you want use multiple distributions to call same lambdaEdge function you can use a custom_headers block into distribution to pass some variables that the lambda function can read and execute some logic depends of a distribution.

* Updated README.md

* Update variables.tf

* Update main.tf

* Updated README.md

* Executed 'terraform fmt'
@homeria-repo homeria-repo requested a review from a team as a code owner October 24, 2020 09:41
@homeria-repo homeria-repo requested review from jamengual and RothAndrew and removed request for a team October 24, 2020 09:41
@RothAndrew RothAndrew requested review from aknysh and removed request for RothAndrew October 27, 2020 19:38
@Gowiem
Copy link
Member

Gowiem commented Nov 25, 2020

/test all

@Gowiem
Copy link
Member

Gowiem commented Nov 26, 2020

/rebuild-readme

@Gowiem
Copy link
Member

Gowiem commented Nov 26, 2020

/test all

@Gowiem
Copy link
Member

Gowiem commented Nov 26, 2020

/test bats

@Gowiem
Copy link
Member

Gowiem commented Nov 27, 2020

/test all

@Gowiem
Copy link
Member

Gowiem commented Nov 27, 2020

/test all

@Gowiem Gowiem merged commit 4edfe5b into cloudposse:master Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants