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

Convert Go Azure examples to fnOutput form #1154

Merged
merged 11 commits into from
Jan 21, 2022
Prev Previous commit
Next Next commit
azure-go-appservice-docker changed image to dockerhub nginx
  • Loading branch information
Kyle Dixler committed Jan 19, 2022
commit 5de4568358e664b76861fca21e79b5f478100597
43 changes: 17 additions & 26 deletions azure-go-appservice-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,41 +50,32 @@ The example shows two scenarios:
$ pulumi stack output helloEndpoint
https://helloappecc2f992.azurewebsites.net
$ curl "$(pulumi stack output helloEndpoint)"
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Azure Container Instances!</title>
</head>
<title>Welcome to nginx!</title>
<style>
h1 {
color: darkblue;
font-family:arial, sans-serif;
font-weight: lighter;
}
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>

</head>
<body>

<div align="center">
<h1>Welcome to Azure Container Instances!</h1>

<svg id="Layer_1" data-name="Layer 1" xmlns="http:https://www.w3.org/2000/svg" viewBox="0 0 49.8 49.9" width="250px" height="250px">
<title>ContainerInstances_rgb_UI</title>
<path d="M41.9,11.368A11.929,11.929,0,0,0,20.3,5.061a9.444,9.444,0,0,0-14.932,9.8A8.969,8.969,0,0,0,9.064,32H39.442A10.463,10.463,0,0,0,41.9,11.368Z" transform="translate(-0.1 -0.1)" fill="#fff"/>
<path d="M41.9,11.368A11.929,11.929,0,0,0,20.3,5.061a9.444,9.444,0,0,0-14.932,9.8A8.969,8.969,0,0,0,9.064,32H39.442A10.463,10.463,0,0,0,41.9,11.368Z" transform="translate(-0.1 -0.1)" fill="#27a9e1" opacity="0.6" style="isolation:isolate"/>
<path d="M13,22a1,1,0,0,0-1,1V49a1,1,0,0,0,1,1H37a1,1,0,0,0,1-1V23a1,1,0,0,0-1-1Z" transform="translate(-0.1 -0.1)" fill="#672a7a"/>
<path d="M26.95,16" transform="translate(-0.1 -0.1)" fill="none"/>
<path d="M34.95,20" transform="translate(-0.1 -0.1)" fill="none"/>
<polygon points="22.9 21.9 22.9 14.9 19.9 14.9 24.9 7.9 29.9 14.9 26.9 14.9 26.9 21.9 22.9 21.9" fill="#fff"/>
<path d="M26.95,16" transform="translate(-0.1 -0.1)" fill="#814a98"/>
<path d="M33,25H15V47H35V25ZM21,45H17V27h4Zm6,0H23V27h4Zm6,0H29V27h4Z" transform="translate(-0.1 -0.1)" fill="#b92025" opacity="0.3" style="isolation:isolate"/>
<path d="M33,25H15V47H35V25ZM21,45H17V27h4Zm6,0H23V27h4Zm6,0H29V27h4Z" transform="translate(-0.1 -0.1)" fill="#fff" style="isolation:isolate"/>
</svg>
</div>

<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http:https://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http:https://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>



$ pulumi stack output getStartedEndpoint
http:https://get-started-15da13.azurewebsites.net
$ curl "$(pulumi stack output getStartedEndpoint)"
Expand Down
4 changes: 2 additions & 2 deletions azure-go-appservice-docker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ func main() {
//
// Scenario 1: deploying an image from Docker Hub.
// The example uses a HelloWorld application written in Go.
// Image: https://hub.docker.com/r/microsoft/azure-appservices-go-quickstart/
// Image: https://hub.docker.com/_/nginx
//
imageInDockerHub := "mcr.microsoft.com/azuredocs/aci-helloworld"
imageInDockerHub := "nginx"
helloApp, err := web.NewWebApp(ctx, "helloApp", &web.WebAppArgs{
ResourceGroupName: resourceGroup.Name,
ServerFarmId: plan.ID(),
Expand Down