From 41c708479089f727ff3263e0ae5736513bcc2e12 Mon Sep 17 00:00:00 2001 From: Tom Barber Date: Wed, 28 Feb 2024 16:49:13 +0000 Subject: [PATCH] Update README.md --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ebe9cb7..9e93552 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,23 @@ Unity Reverse Proxy How to trigger: ``` -resource "aws_lambda_invocation" "example_invocation2" { - function_name = module.unity-proxy-CgbrD.lambda_function_name +variable "template" { + default = < + RewriteEngine on + ProxyPass /sample http://test-demo-alb-616613476.us-west-2.elb.amazonaws.com:8888/sample/hello.jsp + ProxyPassReverse /sample http://test-demo-alb-616613476.us-west-2.elb.amazonaws.com:8888/sample/hello.jsp + +EOT +} + +resource "aws_lambda_invocation" "demoinvocation2" { + function_name = "ZwUycV-unity-proxy-httpdproxymanagement" input = jsonencode({ filename = "example_filename1", - template = "\nRewriteEngine on \n ProxyPass /management/ http:///\n ProxyPassReverse /management/ http:/// \n ProxyPreserveHost On \n RewriteCond {HTTP:Upgrade} websocket [NC] \n RewriteCond {HTTP:Connection} upgrade [NC] \n RewriteRule /management/(.*) ws:///$1 [P,L] \n FallbackResource /management/index.html \n " + template = var.template }) - # Depends on ensures that the Lambda function is created before it is invoked. - depends_on = [module.unity-proxy-CgbrD] } ```