File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,15 +2,23 @@ Unity Reverse Proxy
22
33How to trigger:
44```
5- resource "aws_lambda_invocation" "example_invocation2" {
6- function_name = module.unity-proxy-CgbrD.lambda_function_name
5+ variable "template" {
6+ default = <<EOT
7+ <VirtualHost *:8080>
8+ RewriteEngine on
9+ ProxyPass /sample http://test-demo-alb-616613476.us-west-2.elb.amazonaws.com:8888/sample/hello.jsp
10+ ProxyPassReverse /sample http://test-demo-alb-616613476.us-west-2.elb.amazonaws.com:8888/sample/hello.jsp
11+ </VirtualHost>
12+ EOT
13+ }
14+
15+ resource "aws_lambda_invocation" "demoinvocation2" {
16+ function_name = "ZwUycV-unity-proxy-httpdproxymanagement"
717
818 input = jsonencode({
919 filename = "example_filename1",
10- template = "<VirtualHost *:8080>\nRewriteEngine on \n ProxyPass /management/ http://<DNS_NAME>/\n ProxyPassReverse /management/ http://<DNS_NAME>/ \n ProxyPreserveHost On \n RewriteCond {HTTP:Upgrade} websocket [NC] \n RewriteCond {HTTP:Connection} upgrade [NC] \n RewriteRule /management/(.*) ws://<DNS_NAME>/$1 [P,L] \n FallbackResource /management/index.html \n </VirtualHost>"
20+ template = var.template
1121 })
1222
13- # Depends on ensures that the Lambda function is created before it is invoked.
14- depends_on = [module.unity-proxy-CgbrD]
1523}
1624```
You can’t perform that action at this time.
0 commit comments