Skip to content

Commit 8850b1b

Browse files
committed
Merge branch 'main' of github.com:unity-sds/unity-proxy
2 parents e1855ce + 41c7084 commit 8850b1b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@ Unity Reverse Proxy
22

33
How 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
```

0 commit comments

Comments
 (0)