From af59b324e91f5aa26780c50f47669613491b35f1 Mon Sep 17 00:00:00 2001 From: Mikhail Shilkov Date: Mon, 21 Sep 2020 07:51:17 +0200 Subject: [PATCH] Azure NextGen examples (#797) --- azure-nextgen-cs-aci/.gitignore | 353 ++++++++++++++++++ azure-nextgen-cs-aci/Aci.csproj | 14 + azure-nextgen-cs-aci/MyStack.cs | 64 ++++ azure-nextgen-cs-aci/Program.cs | 8 + azure-nextgen-cs-aci/Pulumi.yaml | 8 + azure-nextgen-cs-aci/README.md | 53 +++ azure-nextgen-cs-appservice-docker/.gitignore | 353 ++++++++++++++++++ .../AppService.csproj | 16 + azure-nextgen-cs-appservice-docker/MyStack.cs | 159 ++++++++ azure-nextgen-cs-appservice-docker/Program.cs | 8 + .../Pulumi.yaml | 8 + azure-nextgen-cs-appservice-docker/README.md | 63 ++++ .../node-app/.dockerignore | 2 + .../node-app/Dockerfile | 6 + .../node-app/app/index.html | 5 + .../node-app/app/index.js | 13 + .../node-app/app/package.json | 12 + azure-nextgen-go-aci/Pulumi.yaml | 8 + azure-nextgen-go-aci/README.md | 53 +++ azure-nextgen-go-aci/go.mod | 8 + azure-nextgen-go-aci/go.sum | 301 +++++++++++++++ azure-nextgen-go-aci/main.go | 72 ++++ .../Pulumi.yaml | 8 + azure-nextgen-go-appservice-docker/README.md | 63 ++++ azure-nextgen-go-appservice-docker/go.mod | 10 + azure-nextgen-go-appservice-docker/go.sum | 301 +++++++++++++++ azure-nextgen-go-appservice-docker/main.go | 192 ++++++++++ .../node-app/.dockerignore | 2 + .../node-app/Dockerfile | 6 + .../node-app/app/index.html | 5 + .../node-app/app/index.js | 13 + .../node-app/app/package.json | 12 + azure-nextgen-py-aci/.gitignore | 2 + azure-nextgen-py-aci/Pulumi.yaml | 8 + azure-nextgen-py-aci/README.md | 63 ++++ azure-nextgen-py-aci/__main__.py | 41 ++ azure-nextgen-py-aci/requirements.txt | 2 + azure-nextgen-py-appservice-docker/.gitignore | 2 + .../Pulumi.yaml | 8 + azure-nextgen-py-appservice-docker/README.md | 74 ++++ .../__main__.py | 105 ++++++ .../node-app/.dockerignore | 2 + .../node-app/Dockerfile | 6 + .../node-app/app/index.html | 5 + .../node-app/app/index.js | 13 + .../node-app/app/package.json | 12 + .../requirements.txt | 4 + azure-nextgen-ts-aci/Pulumi.yaml | 8 + azure-nextgen-ts-aci/README.md | 59 +++ azure-nextgen-ts-aci/index.ts | 43 +++ azure-nextgen-ts-aci/package.json | 11 + azure-nextgen-ts-aci/tsconfig.json | 19 + .../Pulumi.yaml | 8 + azure-nextgen-ts-appservice-docker/README.md | 69 ++++ azure-nextgen-ts-appservice-docker/index.ts | 128 +++++++ .../node-app/.dockerignore | 2 + .../node-app/Dockerfile | 6 + .../node-app/app/index.html | 5 + .../node-app/app/index.js | 13 + .../node-app/app/package.json | 12 + .../package.json | 13 + .../tsconfig.json | 19 + 62 files changed, 2961 insertions(+) create mode 100644 azure-nextgen-cs-aci/.gitignore create mode 100644 azure-nextgen-cs-aci/Aci.csproj create mode 100644 azure-nextgen-cs-aci/MyStack.cs create mode 100644 azure-nextgen-cs-aci/Program.cs create mode 100644 azure-nextgen-cs-aci/Pulumi.yaml create mode 100644 azure-nextgen-cs-aci/README.md create mode 100644 azure-nextgen-cs-appservice-docker/.gitignore create mode 100644 azure-nextgen-cs-appservice-docker/AppService.csproj create mode 100644 azure-nextgen-cs-appservice-docker/MyStack.cs create mode 100644 azure-nextgen-cs-appservice-docker/Program.cs create mode 100644 azure-nextgen-cs-appservice-docker/Pulumi.yaml create mode 100644 azure-nextgen-cs-appservice-docker/README.md create mode 100644 azure-nextgen-cs-appservice-docker/node-app/.dockerignore create mode 100644 azure-nextgen-cs-appservice-docker/node-app/Dockerfile create mode 100644 azure-nextgen-cs-appservice-docker/node-app/app/index.html create mode 100644 azure-nextgen-cs-appservice-docker/node-app/app/index.js create mode 100644 azure-nextgen-cs-appservice-docker/node-app/app/package.json create mode 100644 azure-nextgen-go-aci/Pulumi.yaml create mode 100644 azure-nextgen-go-aci/README.md create mode 100644 azure-nextgen-go-aci/go.mod create mode 100644 azure-nextgen-go-aci/go.sum create mode 100644 azure-nextgen-go-aci/main.go create mode 100644 azure-nextgen-go-appservice-docker/Pulumi.yaml create mode 100644 azure-nextgen-go-appservice-docker/README.md create mode 100644 azure-nextgen-go-appservice-docker/go.mod create mode 100644 azure-nextgen-go-appservice-docker/go.sum create mode 100644 azure-nextgen-go-appservice-docker/main.go create mode 100644 azure-nextgen-go-appservice-docker/node-app/.dockerignore create mode 100644 azure-nextgen-go-appservice-docker/node-app/Dockerfile create mode 100644 azure-nextgen-go-appservice-docker/node-app/app/index.html create mode 100644 azure-nextgen-go-appservice-docker/node-app/app/index.js create mode 100644 azure-nextgen-go-appservice-docker/node-app/app/package.json create mode 100644 azure-nextgen-py-aci/.gitignore create mode 100644 azure-nextgen-py-aci/Pulumi.yaml create mode 100644 azure-nextgen-py-aci/README.md create mode 100644 azure-nextgen-py-aci/__main__.py create mode 100644 azure-nextgen-py-aci/requirements.txt create mode 100644 azure-nextgen-py-appservice-docker/.gitignore create mode 100644 azure-nextgen-py-appservice-docker/Pulumi.yaml create mode 100644 azure-nextgen-py-appservice-docker/README.md create mode 100644 azure-nextgen-py-appservice-docker/__main__.py create mode 100644 azure-nextgen-py-appservice-docker/node-app/.dockerignore create mode 100644 azure-nextgen-py-appservice-docker/node-app/Dockerfile create mode 100644 azure-nextgen-py-appservice-docker/node-app/app/index.html create mode 100644 azure-nextgen-py-appservice-docker/node-app/app/index.js create mode 100644 azure-nextgen-py-appservice-docker/node-app/app/package.json create mode 100644 azure-nextgen-py-appservice-docker/requirements.txt create mode 100644 azure-nextgen-ts-aci/Pulumi.yaml create mode 100644 azure-nextgen-ts-aci/README.md create mode 100644 azure-nextgen-ts-aci/index.ts create mode 100644 azure-nextgen-ts-aci/package.json create mode 100644 azure-nextgen-ts-aci/tsconfig.json create mode 100644 azure-nextgen-ts-appservice-docker/Pulumi.yaml create mode 100644 azure-nextgen-ts-appservice-docker/README.md create mode 100644 azure-nextgen-ts-appservice-docker/index.ts create mode 100644 azure-nextgen-ts-appservice-docker/node-app/.dockerignore create mode 100644 azure-nextgen-ts-appservice-docker/node-app/Dockerfile create mode 100644 azure-nextgen-ts-appservice-docker/node-app/app/index.html create mode 100644 azure-nextgen-ts-appservice-docker/node-app/app/index.js create mode 100644 azure-nextgen-ts-appservice-docker/node-app/app/package.json create mode 100644 azure-nextgen-ts-appservice-docker/package.json create mode 100644 azure-nextgen-ts-appservice-docker/tsconfig.json diff --git a/azure-nextgen-cs-aci/.gitignore b/azure-nextgen-cs-aci/.gitignore new file mode 100644 index 000000000..e64527066 --- /dev/null +++ b/azure-nextgen-cs-aci/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/azure-nextgen-cs-aci/Aci.csproj b/azure-nextgen-cs-aci/Aci.csproj new file mode 100644 index 000000000..143a781c5 --- /dev/null +++ b/azure-nextgen-cs-aci/Aci.csproj @@ -0,0 +1,14 @@ + + + + Exe + netcoreapp3.1 + enable + + + + + + + + diff --git a/azure-nextgen-cs-aci/MyStack.cs b/azure-nextgen-cs-aci/MyStack.cs new file mode 100644 index 000000000..3cb3badcf --- /dev/null +++ b/azure-nextgen-cs-aci/MyStack.cs @@ -0,0 +1,64 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. +using Pulumi; +using Pulumi.AzureNextGen.ContainerInstance.Latest; +using Pulumi.AzureNextGen.ContainerInstance.Latest.Inputs; +using Pulumi.AzureNextGen.Resources.Latest; + +class MyStack : Stack +{ + public MyStack() + { + var config = new Pulumi.Config(); + var location = config.Get("location") ?? "WestUS"; + + var resourceGroup = new ResourceGroup("resourceGroup", new ResourceGroupArgs + { + ResourceGroupName = "aci-rg", + Location = location + }); + + var imageName = "mcr.microsoft.com/azuredocs/aci-helloworld"; + var containerGroup = new ContainerGroup("containerGroup", new ContainerGroupArgs + { + ResourceGroupName = resourceGroup.Name, + Location = resourceGroup.Location, + ContainerGroupName = "helloworld", + OsType = "Linux", + Containers = + { + new ContainerArgs + { + Name = "acilinuxpublicipcontainergroup", + Image = imageName, + Ports = { new ContainerPortArgs { Port = 80} }, + Resources = new ResourceRequirementsArgs + { + Requests = new ResourceRequestsArgs + { + Cpu = 1.0, + MemoryInGB = 1.5, + } + } + } + }, + IpAddress = new IpAddressArgs + { + Ports = + { + new PortArgs + { + Port = 80, + Protocol = "Tcp", + } + }, + Type = "Public" + }, + RestartPolicy = "always" + }); + + this.ContainerIPv4Address = containerGroup.IpAddress.Apply(ip => ip!.Ip); + } + + [Output("containerIPv4Address")] + public Output ContainerIPv4Address { get; set; } +} diff --git a/azure-nextgen-cs-aci/Program.cs b/azure-nextgen-cs-aci/Program.cs new file mode 100644 index 000000000..1ee1c12fe --- /dev/null +++ b/azure-nextgen-cs-aci/Program.cs @@ -0,0 +1,8 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. +using System.Threading.Tasks; +using Pulumi; + +class Program +{ + static Task Main() => Deployment.RunAsync(); +} diff --git a/azure-nextgen-cs-aci/Pulumi.yaml b/azure-nextgen-cs-aci/Pulumi.yaml new file mode 100644 index 000000000..fab863bd6 --- /dev/null +++ b/azure-nextgen-cs-aci/Pulumi.yaml @@ -0,0 +1,8 @@ +name: azureng-cs-aci +runtime: dotnet +description: Creates Azure Container Instance with a public IP +template: + config: + location: + description: Azure region to deploy resources to + default: WestUS diff --git a/azure-nextgen-cs-aci/README.md b/azure-nextgen-cs-aci/README.md new file mode 100644 index 000000000..5e0b98e64 --- /dev/null +++ b/azure-nextgen-cs-aci/README.md @@ -0,0 +1,53 @@ +[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new) + +# Azure Container Instances on Linux + +Starting point for building web application hosted in Azure Container Instances. + +## Running the App + +1. Create a new stack: + + ``` + $ pulumi stack init dev + ``` + +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): + + ``` + $ az login + ``` + +1. Set the azure location in which to run the test: + + ``` + $ pulumi config set location westus2 + ``` + +1. Run `pulumi up` to preview and deploy changes: + + ``` + $ pulumi up + Previewing changes: + ... + + Performing changes: + ... + Resources: + + 3 created + + Duration: 1m18s + ``` + +1. Check the deployed endpoints: + + ``` + $ pulumi stack output containerIPv4Address + 13.83.66.37 + $ curl "$(pulumi stack output containerIPv4Address)" + + + Welcome to Azure Container Instances! + + ... + ``` diff --git a/azure-nextgen-cs-appservice-docker/.gitignore b/azure-nextgen-cs-appservice-docker/.gitignore new file mode 100644 index 000000000..e64527066 --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/azure-nextgen-cs-appservice-docker/AppService.csproj b/azure-nextgen-cs-appservice-docker/AppService.csproj new file mode 100644 index 000000000..69af0f5a8 --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/AppService.csproj @@ -0,0 +1,16 @@ + + + + Exe + netcoreapp3.1 + enable + + + + + + + + + + diff --git a/azure-nextgen-cs-appservice-docker/MyStack.cs b/azure-nextgen-cs-appservice-docker/MyStack.cs new file mode 100644 index 000000000..e7621d2d1 --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/MyStack.cs @@ -0,0 +1,159 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. +using System.Linq; +using Pulumi; +using Pulumi.AzureNextGen.ContainerRegistry.Latest; +using Pulumi.AzureNextGen.ContainerRegistry.Latest.Inputs; +using Pulumi.AzureNextGen.Resources.Latest; +using Pulumi.AzureNextGen.Web.Latest; +using Pulumi.AzureNextGen.Web.Latest.Inputs; +using Pulumi.Docker; +using Pulumi.Random; + +class MyStack : Stack +{ + public MyStack() + { + var config = new Pulumi.Config(); + var location = config.Get("location") ?? "WestUS"; + + var resourceGroup = new ResourceGroup("resourceGroup", new ResourceGroupArgs + { + ResourceGroupName = "appservice-docker-rg", + Location = location + }); + + var plan = new AppServicePlan("linux-apps", new AppServicePlanArgs + { + ResourceGroupName = resourceGroup.Name, + Name = "linux-asp", + Location = resourceGroup.Location, + Kind = "Linux", + Reserved = true, + Sku = new SkuDescriptionArgs + { + Name = "B1", + Tier = "Basic" + } + }); + + var suffix = new RandomString("random", new RandomStringArgs + { + Length = 6, + Special = false, + Upper = false, + }); + + // + // 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/ + // + var imageInDockerHub = "microsoft/azure-appservices-go-quickstart"; + + var helloApp = new WebApp("hello-app", new WebAppArgs + { + ResourceGroupName = resourceGroup.Name, + Location = plan.Location, + Name = Output.Format($"hello-app-{suffix.Result}"), + ServerFarmId = plan.Id, + SiteConfig = new SiteConfigArgs + { + AppSettings = new[] + { + new NameValuePairArgs + { + Name = "WEBSITES_ENABLE_APP_SERVICE_STORAGE", + Value = "false" + } + }, + AlwaysOn = true, + LinuxFxVersion = $"DOCKER|{imageInDockerHub}" + }, + HttpsOnly = true + }); + + this.HelloEndpoint = Output.Format($"https://{helloApp.DefaultHostName}/hello"); + + // + // Scenario 2: deploying a custom image from Azure Container Registry. + // + var customImage = "node-app"; + + var registry = new Registry("myregistry", new RegistryArgs + { + ResourceGroupName = resourceGroup.Name, + RegistryName = Output.Format($"registry{suffix.Result}"), + Location = resourceGroup.Location, + Sku = new SkuArgs { Name = "Basic" }, + AdminUserEnabled = true + }); + + var credentials = Output.Tuple(resourceGroup.Name, registry.Name).Apply(values => + ListRegistryCredentials.InvokeAsync(new ListRegistryCredentialsArgs + { + ResourceGroupName = values.Item1, + RegistryName = values.Item2 + })); + var adminUsername = credentials.Apply(c => c.Username ?? ""); + var adminPassword = credentials.Apply(c => Output.CreateSecret(c.Passwords.First().Value ?? "")); + + var myImage = new Image(customImage, new ImageArgs + { + ImageName = Output.Format($"{registry.LoginServer}/{customImage}:v1.0.0"), + Build = new DockerBuild { Context = $"./{customImage}" }, + Registry = new ImageRegistry + { + Server = registry.LoginServer, + Username = adminUsername, + Password = adminPassword + }, + }); + + var getStartedApp = new WebApp("get-started", new WebAppArgs + { + ResourceGroupName = resourceGroup.Name, + Location = plan.Location, + Name = Output.Format($"get-started-{suffix.Result}"), + ServerFarmId = plan.Id, + SiteConfig = new SiteConfigArgs + { + AppSettings = new[] + { + new NameValuePairArgs + { + Name = "WEBSITES_ENABLE_APP_SERVICE_STORAGE", + Value = "false" + }, + new NameValuePairArgs + { + Name = "DOCKER_REGISTRY_SERVER_URL", + Value = Output.Format($"https://{registry.LoginServer}") + }, + new NameValuePairArgs + { + Name = "DOCKER_REGISTRY_SERVER_USERNAME", + Value = adminUsername + }, + new NameValuePairArgs + { + Name = "DOCKER_REGISTRY_SERVER_PASSWORD", + Value = adminPassword + }, + new NameValuePairArgs + { + Name = "WEBSITES_PORT", + Value = "80" // Our custom image exposes port 80. Adjust for your app as needed. + } + }, + AlwaysOn = true, + LinuxFxVersion = Output.Format($"DOCKER|{myImage.ImageName}") + }, + HttpsOnly = true + }); + + this.GetStartedEndpoint = Output.Format($"https://{getStartedApp.DefaultHostName}"); + } + + [Output] public Output HelloEndpoint { get; set; } + [Output] public Output GetStartedEndpoint { get; set; } +} diff --git a/azure-nextgen-cs-appservice-docker/Program.cs b/azure-nextgen-cs-appservice-docker/Program.cs new file mode 100644 index 000000000..1ee1c12fe --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/Program.cs @@ -0,0 +1,8 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. +using System.Threading.Tasks; +using Pulumi; + +class Program +{ + static Task Main() => Deployment.RunAsync(); +} diff --git a/azure-nextgen-cs-appservice-docker/Pulumi.yaml b/azure-nextgen-cs-appservice-docker/Pulumi.yaml new file mode 100644 index 000000000..4e452254b --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/Pulumi.yaml @@ -0,0 +1,8 @@ +name: azureng-cs-appservice-docker +runtime: dotnet +description: Creates Azure App Service and Deploys Docker images to +template: + config: + location: + description: Azure region to deploy resources to + default: WestUS diff --git a/azure-nextgen-cs-appservice-docker/README.md b/azure-nextgen-cs-appservice-docker/README.md new file mode 100644 index 000000000..824b7f559 --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/README.md @@ -0,0 +1,63 @@ +[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new) + +# Azure App Service Running Docker Containers on Linux + +Starting point for building web application hosted in Azure App Service from Docker images. + +The example shows two scenarios: + +- Deploying an existing image from Docker Hub +- Deploying a new custom registry in Azure Container Registry, building a custom Docker image, and running the image from the custom registry + +## Running the App + +1. Create a new stack: + + ``` + $ pulumi stack init dev + ``` + +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): + + ``` + $ az login + ``` + +1. Set the azure location in which to run the test: + + ``` + $ pulumi config set location westus2 + ``` + +1. Run `pulumi up` to preview and deploy changes: + + ``` + $ pulumi up + Previewing changes: + ... + + Performing changes: + ... + Resources: + + 8 created + + Duration: 56s + ``` + +1. Check the deployed endpoints: + + ``` + $ pulumi stack output HelloEndpoint + http://hello-app-91dfea.azurewebsites.net/hello + $ curl "$(pulumi stack output HelloEndpoint)" + Hello, world! + + $ pulumi stack output GetStartedEndpoint + http://get-started-15da13.azurewebsites.net + $ curl "$(pulumi stack output GetStartedEndpoint)" + + +

Your custom docker image is running in Azure App Service!

+ + + ``` diff --git a/azure-nextgen-cs-appservice-docker/node-app/.dockerignore b/azure-nextgen-cs-appservice-docker/node-app/.dockerignore new file mode 100644 index 000000000..5171c5408 --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/node-app/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/azure-nextgen-cs-appservice-docker/node-app/Dockerfile b/azure-nextgen-cs-appservice-docker/node-app/Dockerfile new file mode 100644 index 000000000..b797db724 --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/node-app/Dockerfile @@ -0,0 +1,6 @@ +FROM node:8.9.3-alpine +RUN mkdir -p /usr/src/app +COPY ./app/* /usr/src/app/ +WORKDIR /usr/src/app +RUN npm install +CMD node /usr/src/app/index.js \ No newline at end of file diff --git a/azure-nextgen-cs-appservice-docker/node-app/app/index.html b/azure-nextgen-cs-appservice-docker/node-app/app/index.html new file mode 100644 index 000000000..0f64a8205 --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/node-app/app/index.html @@ -0,0 +1,5 @@ + + +

Your custom docker image is running in Azure App Service!

+ + \ No newline at end of file diff --git a/azure-nextgen-cs-appservice-docker/node-app/app/index.js b/azure-nextgen-cs-appservice-docker/node-app/app/index.js new file mode 100644 index 000000000..e0101aba1 --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/node-app/app/index.js @@ -0,0 +1,13 @@ +const express = require('express'); +const morgan = require('morgan'); + +const app = express(); +app.use(morgan('combined')); + +app.get('/', (req, res) => { + res.sendFile(__dirname + '/index.html') +}); + +var listener = app.listen(process.env.PORT || 80, function() { + console.log('listening on port ' + listener.address().port); +}); \ No newline at end of file diff --git a/azure-nextgen-cs-appservice-docker/node-app/app/package.json b/azure-nextgen-cs-appservice-docker/node-app/app/package.json new file mode 100644 index 000000000..469aaddde --- /dev/null +++ b/azure-nextgen-cs-appservice-docker/node-app/app/package.json @@ -0,0 +1,12 @@ +{ + "name": "node-helloworld", + "version": "1.0.0", + "description": "", + "main": "index.js", + "dependencies": { + "express": "^4.14.0", + "morgan": "^1.8.2" + }, + "devDependencies": {}, + "author": "" +} diff --git a/azure-nextgen-go-aci/Pulumi.yaml b/azure-nextgen-go-aci/Pulumi.yaml new file mode 100644 index 000000000..399b501a9 --- /dev/null +++ b/azure-nextgen-go-aci/Pulumi.yaml @@ -0,0 +1,8 @@ +name: azureng-go-aci +runtime: go +description: Creates Azure Container Instance with a public IP +template: + config: + location: + description: Azure region to deploy resources to + default: WestUS diff --git a/azure-nextgen-go-aci/README.md b/azure-nextgen-go-aci/README.md new file mode 100644 index 000000000..1d808d691 --- /dev/null +++ b/azure-nextgen-go-aci/README.md @@ -0,0 +1,53 @@ +[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new) + +# Azure Container Instances on Linux + +Starting point for building web application hosted in Azure Container Instances. + +## Running the App + +1. Create a new stack: + + ``` + $ pulumi stack init dev + ``` + +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): + + ``` + $ az login + ``` + +1. Set the azure location in which to run the test: + + ``` + $ pulumi config set location westus2 + ``` + +1. Run `pulumi up` to preview and deploy changes: + + ``` + $ pulumi up + Previewing changes: + ... + + Performing changes: + ... + Resources: + + 3 created + + Duration: 1m18s + ``` + +1. Check the deployed endpoint: + + ``` + $ pulumi stack output containerIPv4Address + 13.83.66.37 + $ curl "$(pulumi stack output containerIPv4Address)" + + + Welcome to Azure Container Instances! + + ... + ``` \ No newline at end of file diff --git a/azure-nextgen-go-aci/go.mod b/azure-nextgen-go-aci/go.mod new file mode 100644 index 000000000..07e3521d0 --- /dev/null +++ b/azure-nextgen-go-aci/go.mod @@ -0,0 +1,8 @@ +module github.com/pulumi/examples/azure-go-aci + +go 1.13 + +require ( + github.com/pulumi/pulumi-azure-nextgen/sdk v0.1.0 + github.com/pulumi/pulumi/sdk/v2 v2.0.0 +) diff --git a/azure-nextgen-go-aci/go.sum b/azure-nextgen-go-aci/go.sum new file mode 100644 index 000000000..586a0db39 --- /dev/null +++ b/azure-nextgen-go-aci/go.sum @@ -0,0 +1,301 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cheggaaa/pb v1.0.18 h1:G/DgkKaBP0V5lnBg/vx61nVxxAU+VqU5yMzSc0f2PPE= +github.com/cheggaaa/pb v1.0.18/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/djherbis/times v1.2.0 h1:xANXjsC/iBqbO00vkWlYwPWgBgEVU6m6AFYg0Pic+Mc= +github.com/djherbis/times v1.2.0/go.mod h1:CGMZlo255K5r4Yw0b9RRfFQpM2y7uOmxg4jm9HsaVf8= +github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc= +github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.8 h1:3tS41NlGYSmhhe/8fhGRzc+z3AYCw1Fe1WAyLuujKs0= +github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pulumi/pulumi-azure-nextgen/sdk v0.0.0-20200917212940-17e4216af957 h1:DwdT4joCbXzHKKrKZdNfidlYC+R7oEv6z0adjuC8M5s= +github.com/pulumi/pulumi-azure-nextgen/sdk v0.1.0 h1:SsGy/cyrdbPblNaOUF3do+FQreYSOcIWBrKBn0XG2O4= +github.com/pulumi/pulumi-azure-nextgen/sdk v0.1.0/go.mod h1:fkyDtuEem8AYbINvR7y5i7EyVEqWa5lyi0B15D/yRLo= +github.com/pulumi/pulumi-azure/sdk/v3 v3.0.0 h1:UK9og7uTSwXQrDbYJxGYKLIpTGF6ffQGQum8KiYmP4U= +github.com/pulumi/pulumi-azure/sdk/v3 v3.0.0/go.mod h1:hZf4OGDeY+7Wbdq/3CbeuhbtRQw2UsRzs95f7mlCjfE= +github.com/pulumi/pulumi-docker v1.5.0 h1:Wg94ooWKcOpI2A+rsbuEtD2i+o5IGeZY1e9sdhqeDKk= +github.com/pulumi/pulumi-docker/sdk v0.0.0-20200416220238-c315a35622c8 h1:dy+YUHixjhKx2kY0eT97/cfYp/i+2ODnKzDHvQi1D4A= +github.com/pulumi/pulumi-docker/sdk/v2 v2.3.0 h1:kFSIB16HVNW+TyOSG6ULr0S9PpsnRtP2SLA6esklL98= +github.com/pulumi/pulumi-docker/sdk/v2 v2.3.0/go.mod h1:J0I8pec653rvuAZNKpNxLj6ZuIKutcRDP+4iYUuD504= +github.com/pulumi/pulumi-random v1.7.0 h1:X7Zqdn3/OFhsLEPNmoIBr/DKCwd1JD5ozO+mH5z+lbE= +github.com/pulumi/pulumi-random v2.3.1+incompatible h1:8PQcZvLcvC9gb7FjkHjehDISU76iImgivhuwgbbOw2E= +github.com/pulumi/pulumi-random/sdk v1.7.0 h1:6WL+mI7TlQajNsAwZbmaic8vEAx198x7HFbeeKvOf1I= +github.com/pulumi/pulumi-random/sdk/v2 v2.3.1 h1:02YkcbVirUUjCQgsnup4OmBTH0zXxDhkFbMVRH6dSEQ= +github.com/pulumi/pulumi-random/sdk/v2 v2.3.1/go.mod h1:PPzzdlKYXLuBjcl6T4FvvQgKBntKa9gMbZtgslBlVHc= +github.com/pulumi/pulumi/sdk/v2 v2.0.0 h1:3VMXbEo3bqeaU+YDt8ufVBLD0WhLYE3tG3t/nIZ3Iac= +github.com/pulumi/pulumi/sdk/v2 v2.0.0/go.mod h1:W7k1UDYerc5o97mHnlHHp5iQZKEby+oQrQefWt+2RF4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.6 h1:breEStsVwemnKh2/s6gMvSdMEkwW0sK8vGStnlVBMCs= +github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= +github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 h1:9VTskZOIRf2vKF3UL8TuWElry5pgUpV1tFSe/e/0m/E= +github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM= +github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= +github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 h1:TjszyFsQsyZNHwdVdZ5m7bjmreu0znc2kRYsEml9/Ww= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d h1:62ap6LNOjDU6uGmKXHJbSfciMoV+FeI1sRXx/pLDL44= +golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= +gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= +gopkg.in/src-d/go-git-fixtures.v3 v3.5.0 h1:ivZFOIltbce2Mo8IjzUHAFoq/IylO9WHhNOAJK+LsJg= +gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= +gopkg.in/src-d/go-git.v4 v4.13.1 h1:SRtFyV8Kxc0UP7aCHcijOMQGPxHSmMOPrzulQWolkYE= +gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/azure-nextgen-go-aci/main.go b/azure-nextgen-go-aci/main.go new file mode 100644 index 000000000..b52d90550 --- /dev/null +++ b/azure-nextgen-go-aci/main.go @@ -0,0 +1,72 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. +package main + +import ( + containerinstance "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/containerinstance/latest" + resources "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/resources/latest" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi/config" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + c := config.New(ctx, "") + location := c.Get("location") + if location == "" { + location = "WestUS" + } + + resourceGroup, err := resources.NewResourceGroup(ctx, "resourceGroup", &resources.ResourceGroupArgs{ + ResourceGroupName: pulumi.String("aci-rg"), + Location: pulumi.String(location), + }) + if err != nil { + return err + } + + imageName := "mcr.microsoft.com/azuredocs/aci-helloworld" + containerGroup, err := containerinstance.NewContainerGroup(ctx, "containerGroup", &containerinstance.ContainerGroupArgs{ + ResourceGroupName: resourceGroup.Name, + Location: resourceGroup.Location, + ContainerGroupName: pulumi.String("helloworld"), + OsType: pulumi.String("Linux"), + Containers: &containerinstance.ContainerArray{ + &containerinstance.ContainerArgs{ + Name: pulumi.String("acilinuxpublicipcontainergroup"), + Image: pulumi.String(imageName), + Ports: &containerinstance.ContainerPortArray{ + &containerinstance.ContainerPortArgs{Port: pulumi.Int(80)}, + }, + Resources: &containerinstance.ResourceRequirementsArgs{ + Requests: &containerinstance.ResourceRequestsArgs{ + Cpu: pulumi.Float64(1.0), + MemoryInGB: pulumi.Float64(1.5), + }, + }, + }, + }, + IpAddress: &containerinstance.IpAddressArgs{ + Ports: &containerinstance.PortArray{ + &containerinstance.PortArgs{ + Port: pulumi.Int(80), + Protocol: pulumi.String("Tcp"), + }, + }, + Type: pulumi.String("Public"), + }, + RestartPolicy: pulumi.String("always"), + }) + if err != nil { + return err + } + + ctx.Export("containerIPv4Address", containerGroup.IpAddress.ApplyT(func(ip *containerinstance.IpAddressResponse) (string, error) { + if ip == nil || ip.Ip == nil { + return "", nil + } + return *ip.Ip, nil + }).(pulumi.StringOutput)) + + return nil + }) +} diff --git a/azure-nextgen-go-appservice-docker/Pulumi.yaml b/azure-nextgen-go-appservice-docker/Pulumi.yaml new file mode 100644 index 000000000..1687ed9cb --- /dev/null +++ b/azure-nextgen-go-appservice-docker/Pulumi.yaml @@ -0,0 +1,8 @@ +name: azureng-go-appservice-docker +runtime: go +description: Creates Azure App Service and Deploys Docker images to +template: + config: + location: + description: Azure region to deploy resources to + default: WestUS diff --git a/azure-nextgen-go-appservice-docker/README.md b/azure-nextgen-go-appservice-docker/README.md new file mode 100644 index 000000000..b8485414a --- /dev/null +++ b/azure-nextgen-go-appservice-docker/README.md @@ -0,0 +1,63 @@ +[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new) + +# Azure App Service Running Docker Containers on Linux + +Starting point for building web application hosted in Azure App Service from Docker images. + +The example shows two scenarios: + +- Deploying an existing image from Docker Hub +- Deploying a new custom registry in Azure Container Registry, building a custom Docker image, and running the image from the custom registry + +## Running the App + +1. Create a new stack: + + ``` + $ pulumi stack init dev + ``` + +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): + + ``` + $ az login + ``` + +1. Set the azure location in which to run the test: + + ``` + $ pulumi config set location westus2 + ``` + +1. Run `pulumi up` to preview and deploy changes: + + ``` + $ pulumi up + Previewing changes: + ... + + Performing changes: + ... + Resources: + + 8 created + + Duration: 56s + ``` + +1. Check the deployed website endpoint: + + ``` + $ pulumi stack output helloEndpoint + http://hello-app-91dfea.azurewebsites.net/hello + $ curl "$(pulumi stack output helloEndpoint)" + Hello, world! + + $ pulumi stack output getStartedEndpoint + http://get-started-15da13.azurewebsites.net + $ curl "$(pulumi stack output getStartedEndpoint)" + + +

Your custom docker image is running in Azure App Service!

+ + + ``` diff --git a/azure-nextgen-go-appservice-docker/go.mod b/azure-nextgen-go-appservice-docker/go.mod new file mode 100644 index 000000000..6bd5eb5e8 --- /dev/null +++ b/azure-nextgen-go-appservice-docker/go.mod @@ -0,0 +1,10 @@ +module github.com/pulumi/examples/azure-go-appservice + +go 1.13 + +require ( + github.com/pulumi/pulumi-azure-nextgen/sdk v0.1.0 + github.com/pulumi/pulumi-docker/sdk/v2 v2.3.0 + github.com/pulumi/pulumi-random/sdk/v2 v2.3.1 + github.com/pulumi/pulumi/sdk/v2 v2.0.0 +) diff --git a/azure-nextgen-go-appservice-docker/go.sum b/azure-nextgen-go-appservice-docker/go.sum new file mode 100644 index 000000000..586a0db39 --- /dev/null +++ b/azure-nextgen-go-appservice-docker/go.sum @@ -0,0 +1,301 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cheggaaa/pb v1.0.18 h1:G/DgkKaBP0V5lnBg/vx61nVxxAU+VqU5yMzSc0f2PPE= +github.com/cheggaaa/pb v1.0.18/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/djherbis/times v1.2.0 h1:xANXjsC/iBqbO00vkWlYwPWgBgEVU6m6AFYg0Pic+Mc= +github.com/djherbis/times v1.2.0/go.mod h1:CGMZlo255K5r4Yw0b9RRfFQpM2y7uOmxg4jm9HsaVf8= +github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc= +github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.8 h1:3tS41NlGYSmhhe/8fhGRzc+z3AYCw1Fe1WAyLuujKs0= +github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pulumi/pulumi-azure-nextgen/sdk v0.0.0-20200917212940-17e4216af957 h1:DwdT4joCbXzHKKrKZdNfidlYC+R7oEv6z0adjuC8M5s= +github.com/pulumi/pulumi-azure-nextgen/sdk v0.1.0 h1:SsGy/cyrdbPblNaOUF3do+FQreYSOcIWBrKBn0XG2O4= +github.com/pulumi/pulumi-azure-nextgen/sdk v0.1.0/go.mod h1:fkyDtuEem8AYbINvR7y5i7EyVEqWa5lyi0B15D/yRLo= +github.com/pulumi/pulumi-azure/sdk/v3 v3.0.0 h1:UK9og7uTSwXQrDbYJxGYKLIpTGF6ffQGQum8KiYmP4U= +github.com/pulumi/pulumi-azure/sdk/v3 v3.0.0/go.mod h1:hZf4OGDeY+7Wbdq/3CbeuhbtRQw2UsRzs95f7mlCjfE= +github.com/pulumi/pulumi-docker v1.5.0 h1:Wg94ooWKcOpI2A+rsbuEtD2i+o5IGeZY1e9sdhqeDKk= +github.com/pulumi/pulumi-docker/sdk v0.0.0-20200416220238-c315a35622c8 h1:dy+YUHixjhKx2kY0eT97/cfYp/i+2ODnKzDHvQi1D4A= +github.com/pulumi/pulumi-docker/sdk/v2 v2.3.0 h1:kFSIB16HVNW+TyOSG6ULr0S9PpsnRtP2SLA6esklL98= +github.com/pulumi/pulumi-docker/sdk/v2 v2.3.0/go.mod h1:J0I8pec653rvuAZNKpNxLj6ZuIKutcRDP+4iYUuD504= +github.com/pulumi/pulumi-random v1.7.0 h1:X7Zqdn3/OFhsLEPNmoIBr/DKCwd1JD5ozO+mH5z+lbE= +github.com/pulumi/pulumi-random v2.3.1+incompatible h1:8PQcZvLcvC9gb7FjkHjehDISU76iImgivhuwgbbOw2E= +github.com/pulumi/pulumi-random/sdk v1.7.0 h1:6WL+mI7TlQajNsAwZbmaic8vEAx198x7HFbeeKvOf1I= +github.com/pulumi/pulumi-random/sdk/v2 v2.3.1 h1:02YkcbVirUUjCQgsnup4OmBTH0zXxDhkFbMVRH6dSEQ= +github.com/pulumi/pulumi-random/sdk/v2 v2.3.1/go.mod h1:PPzzdlKYXLuBjcl6T4FvvQgKBntKa9gMbZtgslBlVHc= +github.com/pulumi/pulumi/sdk/v2 v2.0.0 h1:3VMXbEo3bqeaU+YDt8ufVBLD0WhLYE3tG3t/nIZ3Iac= +github.com/pulumi/pulumi/sdk/v2 v2.0.0/go.mod h1:W7k1UDYerc5o97mHnlHHp5iQZKEby+oQrQefWt+2RF4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.6 h1:breEStsVwemnKh2/s6gMvSdMEkwW0sK8vGStnlVBMCs= +github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= +github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 h1:9VTskZOIRf2vKF3UL8TuWElry5pgUpV1tFSe/e/0m/E= +github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM= +github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= +github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 h1:TjszyFsQsyZNHwdVdZ5m7bjmreu0znc2kRYsEml9/Ww= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d h1:62ap6LNOjDU6uGmKXHJbSfciMoV+FeI1sRXx/pLDL44= +golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= +gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= +gopkg.in/src-d/go-git-fixtures.v3 v3.5.0 h1:ivZFOIltbce2Mo8IjzUHAFoq/IylO9WHhNOAJK+LsJg= +gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= +gopkg.in/src-d/go-git.v4 v4.13.1 h1:SRtFyV8Kxc0UP7aCHcijOMQGPxHSmMOPrzulQWolkYE= +gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/azure-nextgen-go-appservice-docker/main.go b/azure-nextgen-go-appservice-docker/main.go new file mode 100644 index 000000000..096fc7db6 --- /dev/null +++ b/azure-nextgen-go-appservice-docker/main.go @@ -0,0 +1,192 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. +package main + +import ( + "fmt" + + containerregistry "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/containerregistry/latest" + resources "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/resources/latest" + web "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/web/latest" + "github.com/pulumi/pulumi-docker/sdk/v2/go/docker" + "github.com/pulumi/pulumi-random/sdk/v2/go/random" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi/config" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + c := config.New(ctx, "") + location := c.Get("location") + if location == "" { + location = "WestUS" + } + + resourceGroup, err := resources.NewResourceGroup(ctx, "resourceGroup", &resources.ResourceGroupArgs{ + ResourceGroupName: pulumi.String("appservice-docker-rg"), + Location: pulumi.String(location), + }) + if err != nil { + return err + } + + plan, err := web.NewAppServicePlan(ctx, "plan", &web.AppServicePlanArgs{ + ResourceGroupName: resourceGroup.Name, + Name: pulumi.String("linux-asp"), + Location: resourceGroup.Location, + Kind: pulumi.String("Linux"), + Reserved: pulumi.Bool(true), + Sku: &web.SkuDescriptionArgs{ + Name: pulumi.String("B1"), + Tier: pulumi.String("Basic"), + }, + }) + if err != nil { + return err + } + + suffix, err := random.NewRandomString(ctx, "suffix", &random.RandomStringArgs{ + Length: pulumi.Int(6), + Special: pulumi.Bool(false), + Upper: pulumi.Bool(false), + }) + if err != nil { + return err + } + + // + // 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/ + // + imageInDockerHub := "microsoft/azure-appservices-go-quickstart" + helloApp, err := web.NewWebApp(ctx, "helloApp", &web.WebAppArgs{ + ResourceGroupName: resourceGroup.Name, + Location: plan.Location, + Name: suffix.Result.ApplyT(func(result string) (string, error) { + return fmt.Sprintf("%v%v", "hello-app-", result), nil + }).(pulumi.StringOutput), + ServerFarmId: plan.ID(), + SiteConfig: &web.SiteConfigArgs{ + AppSettings: web.NameValuePairArray{ + &web.NameValuePairArgs{ + Name: pulumi.String("WEBSITES_ENABLE_APP_SERVICE_STORAGE"), + Value: pulumi.String("false"), + }, + }, + AlwaysOn: pulumi.Bool(true), + LinuxFxVersion: pulumi.String(fmt.Sprintf("%v%v", "DOCKER|", imageInDockerHub)), + }, + HttpsOnly: pulumi.Bool(true), + }) + if err != nil { + return err + } + + ctx.Export("helloEndpoint", helloApp.DefaultHostName.ApplyT(func(defaultHostName string) (string, error) { + return fmt.Sprintf("%v%v%v", "https://", defaultHostName, "/hello"), nil + }).(pulumi.StringOutput)) + + // + // Scenario 2: deploying a custom image from Azure Container Registry. + // + customImage := "node-app" + registry, err := containerregistry.NewRegistry(ctx, "registry", &containerregistry.RegistryArgs{ + ResourceGroupName: resourceGroup.Name, + RegistryName: suffix.Result.ApplyT(func(result string) (string, error) { + return fmt.Sprintf("%v%v", "registry", result), nil + }).(pulumi.StringOutput), + Location: resourceGroup.Location, + Sku: &containerregistry.SkuArgs{ + Name: pulumi.String("Basic"), + }, + AdminUserEnabled: pulumi.Bool(true), + }) + if err != nil { + return err + } + + credentials := pulumi.All(resourceGroup.Name, registry.Name).ApplyT( + func (args []interface{}) (*containerregistry.ListRegistryCredentialsResult, error) { + resourceGroupName := args[0].(string) + registryName := args[1].(string) + return containerregistry.ListRegistryCredentials(ctx, &containerregistry.ListRegistryCredentialsArgs{ + ResourceGroupName: resourceGroupName, + RegistryName: registryName, + }) + }, + ) + + adminUsername := credentials.ApplyT(func(result interface{}) (string, error) { + credentials := result.(*containerregistry.ListRegistryCredentialsResult) + return *credentials.Username, nil + }).(pulumi.StringOutput) + adminPassword := credentials.ApplyT(func(result interface{}) (string, error) { + credentials := result.(*containerregistry.ListRegistryCredentialsResult) + return *credentials.Passwords[0].Value, nil + }).(pulumi.StringOutput) + + myImage, err := docker.NewImage(ctx, customImage, &docker.ImageArgs{ + ImageName: registry.LoginServer.ApplyT(func(result string) (string, error) { + return fmt.Sprintf("%s/%s:v1.0.0", result, customImage), nil + }).(pulumi.StringOutput), + Build: &docker.DockerBuildArgs { Context: pulumi.String(fmt.Sprintf("./%s", customImage)) }, + Registry: &docker.ImageRegistryArgs{ + Server: registry.LoginServer, + Username: adminUsername, + Password: adminPassword, + }, + }) + if err != nil { + return err + } + + getStartedApp, err := web.NewWebApp(ctx, "getStartedApp", &web.WebAppArgs{ + ResourceGroupName: resourceGroup.Name, + Location: plan.Location, + Name: suffix.Result.ApplyT(func(result string) (string, error) { + return fmt.Sprintf("%v%v", "get-started-", result), nil + }).(pulumi.StringOutput), + ServerFarmId: plan.ID(), + SiteConfig: &web.SiteConfigArgs{ + AppSettings: web.NameValuePairArray{ + &web.NameValuePairArgs{ + Name: pulumi.String("WEBSITES_ENABLE_APP_SERVICE_STORAGE"), + Value: pulumi.String("false"), + }, + &web.NameValuePairArgs{ + Name: pulumi.String("DOCKER_REGISTRY_SERVER_URL"), + Value: registry.LoginServer.ApplyT(func(loginServer string) (string, error) { + return fmt.Sprintf("%v%v", "https://", loginServer), nil + }).(pulumi.StringOutput), + }, + &web.NameValuePairArgs{ + Name: pulumi.String("DOCKER_REGISTRY_SERVER_USERNAME"), + Value: adminUsername, + }, + &web.NameValuePairArgs{ + Name: pulumi.String("DOCKER_REGISTRY_SERVER_PASSWORD"), + Value: adminPassword, + }, + &web.NameValuePairArgs{ + Name: pulumi.String("WEBSITES_PORT"), + Value: pulumi.String("80"), + }, + }, + AlwaysOn: pulumi.Bool(true), + LinuxFxVersion: myImage.ImageName.ApplyT(func(result string) (string, error) { + return fmt.Sprintf("DOCKER|%s", result), nil + }).(pulumi.StringOutput), + }, + HttpsOnly: pulumi.Bool(true), + }) + if err != nil { + return err + } + + ctx.Export("getStartedEndpoint", getStartedApp.DefaultHostName.ApplyT(func(defaultHostName string) (string, error) { + return fmt.Sprintf("%v%v", "https://", defaultHostName), nil + }).(pulumi.StringOutput)) + + return nil + }) +} diff --git a/azure-nextgen-go-appservice-docker/node-app/.dockerignore b/azure-nextgen-go-appservice-docker/node-app/.dockerignore new file mode 100644 index 000000000..5171c5408 --- /dev/null +++ b/azure-nextgen-go-appservice-docker/node-app/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/azure-nextgen-go-appservice-docker/node-app/Dockerfile b/azure-nextgen-go-appservice-docker/node-app/Dockerfile new file mode 100644 index 000000000..b797db724 --- /dev/null +++ b/azure-nextgen-go-appservice-docker/node-app/Dockerfile @@ -0,0 +1,6 @@ +FROM node:8.9.3-alpine +RUN mkdir -p /usr/src/app +COPY ./app/* /usr/src/app/ +WORKDIR /usr/src/app +RUN npm install +CMD node /usr/src/app/index.js \ No newline at end of file diff --git a/azure-nextgen-go-appservice-docker/node-app/app/index.html b/azure-nextgen-go-appservice-docker/node-app/app/index.html new file mode 100644 index 000000000..0f64a8205 --- /dev/null +++ b/azure-nextgen-go-appservice-docker/node-app/app/index.html @@ -0,0 +1,5 @@ + + +

Your custom docker image is running in Azure App Service!

+ + \ No newline at end of file diff --git a/azure-nextgen-go-appservice-docker/node-app/app/index.js b/azure-nextgen-go-appservice-docker/node-app/app/index.js new file mode 100644 index 000000000..e0101aba1 --- /dev/null +++ b/azure-nextgen-go-appservice-docker/node-app/app/index.js @@ -0,0 +1,13 @@ +const express = require('express'); +const morgan = require('morgan'); + +const app = express(); +app.use(morgan('combined')); + +app.get('/', (req, res) => { + res.sendFile(__dirname + '/index.html') +}); + +var listener = app.listen(process.env.PORT || 80, function() { + console.log('listening on port ' + listener.address().port); +}); \ No newline at end of file diff --git a/azure-nextgen-go-appservice-docker/node-app/app/package.json b/azure-nextgen-go-appservice-docker/node-app/app/package.json new file mode 100644 index 000000000..469aaddde --- /dev/null +++ b/azure-nextgen-go-appservice-docker/node-app/app/package.json @@ -0,0 +1,12 @@ +{ + "name": "node-helloworld", + "version": "1.0.0", + "description": "", + "main": "index.js", + "dependencies": { + "express": "^4.14.0", + "morgan": "^1.8.2" + }, + "devDependencies": {}, + "author": "" +} diff --git a/azure-nextgen-py-aci/.gitignore b/azure-nextgen-py-aci/.gitignore new file mode 100644 index 000000000..a3807e5bd --- /dev/null +++ b/azure-nextgen-py-aci/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ diff --git a/azure-nextgen-py-aci/Pulumi.yaml b/azure-nextgen-py-aci/Pulumi.yaml new file mode 100644 index 000000000..8c447c9a4 --- /dev/null +++ b/azure-nextgen-py-aci/Pulumi.yaml @@ -0,0 +1,8 @@ +name: azureng-py-aci +runtime: python +description: Creates Azure Container Instance with a public IP +template: + config: + location: + description: Azure region to deploy resources to + default: WestUS diff --git a/azure-nextgen-py-aci/README.md b/azure-nextgen-py-aci/README.md new file mode 100644 index 000000000..c82693a1a --- /dev/null +++ b/azure-nextgen-py-aci/README.md @@ -0,0 +1,63 @@ +[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new) + +# Azure Container Instances on Linux + +Starting point for building web application hosted in Azure Container Instances. + +## Running the App + +1. Create a new stack: + + ```bash + $ pulumi stack init dev + ``` + +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): + + ```bash + $ az login + ``` + +1. Create a Python virtualenv, activate it, and install dependencies: + + This installs the dependent packages [needed](https://www.pulumi.com/docs/intro/concepts/how-pulumi-works/) for our Pulumi program. + + ```bash + $ python3 -m venv venv + $ source venv/bin/activate + $ pip3 install -r requirements.txt + ``` + +1. Set the azure location in which to run the test: + + ``` + $ pulumi config set location westus2 + ``` + +1. Run `pulumi up` to preview and deploy changes: + + ```bash + $ pulumi up + Previewing changes: + ... + + Performing changes: + ... + Resources: + + 3 created + + Duration: 1m18s + ``` + +1. Check the deployed endpoint: + + ``` + $ pulumi stack output containerIPv4Address + 13.83.66.37 + $ curl "$(pulumi stack output containerIPv4Address)" + + + Welcome to Azure Container Instances! + + ... + ``` diff --git a/azure-nextgen-py-aci/__main__.py b/azure-nextgen-py-aci/__main__.py new file mode 100644 index 000000000..bab64e795 --- /dev/null +++ b/azure-nextgen-py-aci/__main__.py @@ -0,0 +1,41 @@ +# Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +import pulumi +from pulumi_azure_nextgen.containerinstance import latest as containerinstance +from pulumi_azure_nextgen.resources import latest as resources + +config = pulumi.Config() +location = config.get("location") or "WestUS" + +resource_group = resources.ResourceGroup("resourceGroup", + resource_group_name="aci-rg", + location=location) + +image_name = "mcr.microsoft.com/azuredocs/aci-helloworld" +container_group = containerinstance.ContainerGroup("containerGroup", + resource_group_name=resource_group.name, + location=resource_group.location, + container_group_name="helloworld", + os_type="Linux", + containers=[containerinstance.ContainerArgs( + name="acilinuxpublicipcontainergroup", + image=image_name, + ports=[containerinstance.ContainerPortArgs(port=80)], + resources=containerinstance.ResourceRequirementsArgs( + requests=containerinstance.ResourceRequestsArgs( + cpu=1.0, + memory_in_gb=1.5, + ) + ), + )], + ip_address=containerinstance.IpAddressArgs( + ports=[containerinstance.PortArgs( + port=80, + protocol="Tcp", + )], + type="Public", + ), + restart_policy="always", +) + +pulumi.export("containerIPv4Address", container_group.ip_address.apply(lambda ip: ip.ip)) diff --git a/azure-nextgen-py-aci/requirements.txt b/azure-nextgen-py-aci/requirements.txt new file mode 100644 index 000000000..69f8c8e89 --- /dev/null +++ b/azure-nextgen-py-aci/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=2.0.0,<3.0.0 +pulumi-azure-nextgen>=0.1.0 diff --git a/azure-nextgen-py-appservice-docker/.gitignore b/azure-nextgen-py-appservice-docker/.gitignore new file mode 100644 index 000000000..a3807e5bd --- /dev/null +++ b/azure-nextgen-py-appservice-docker/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ diff --git a/azure-nextgen-py-appservice-docker/Pulumi.yaml b/azure-nextgen-py-appservice-docker/Pulumi.yaml new file mode 100644 index 000000000..4d2df593a --- /dev/null +++ b/azure-nextgen-py-appservice-docker/Pulumi.yaml @@ -0,0 +1,8 @@ +name: azureng-py-appservice-docker +runtime: python +description: Creates Azure App Service and Deploys Docker images to +template: + config: + location: + description: Azure region to deploy resources to + default: WestUS diff --git a/azure-nextgen-py-appservice-docker/README.md b/azure-nextgen-py-appservice-docker/README.md new file mode 100644 index 000000000..543172a66 --- /dev/null +++ b/azure-nextgen-py-appservice-docker/README.md @@ -0,0 +1,74 @@ +[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new) + +# Azure App Service Running Docker Containers on Linux + +Starting point for building a web application hosted in Azure App Service from Docker images. + +The example shows two scenarios: + +- Deploying an existing image from Docker Hub +- Deploying a new custom registry in Azure Container Registry, building a custom Docker image, and running the image from the custom registry + +## Running the App + +1. Create a new stack: + + ```bash + $ pulumi stack init dev + ``` + +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): + + ```bash + $ az login + ``` + +1. Create a Python virtualenv, activate it, and install dependencies: + + This installs the dependent packages [needed](https://www.pulumi.com/docs/intro/concepts/how-pulumi-works/) for our Pulumi program. + + ```bash + $ python3 -m venv venv + $ source venv/bin/activate + $ pip3 install -r requirements.txt + ``` + +1. Set the azure location in which to run the test: + + ``` + $ pulumi config set location westus2 + ``` + +1. Run `pulumi up` to preview and deploy changes: + + ```bash + $ pulumi up + Previewing changes: + ... + + Performing changes: + ... + Resources: + + 8 created + + Duration: 56s + ``` + +1. Check the deployed endpoints: + + ```bash + $ pulumi stack output helloEndpoint + http://hello-app91dfea21.azurewebsites.net/hello + $ curl "$(pulumi stack output helloEndpoint)" + Hello, world! + ``` + + $ pulumi stack output getStartedEndpoint + http://get-started-15da13.azurewebsites.net + $ curl "$(pulumi stack output getStartedEndpoint)" + + +

Your custom docker image is running in Azure App Service!

+ + + ``` diff --git a/azure-nextgen-py-appservice-docker/__main__.py b/azure-nextgen-py-appservice-docker/__main__.py new file mode 100644 index 000000000..3aa3b48de --- /dev/null +++ b/azure-nextgen-py-appservice-docker/__main__.py @@ -0,0 +1,105 @@ +# Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +import pulumi +from pulumi_azure_nextgen.containerregistry import latest as containerregistry +from pulumi_azure_nextgen.resources import latest as resources +from pulumi_azure_nextgen.storage import latest as storage +from pulumi_azure_nextgen.web import latest as web +import pulumi_docker as docker +import pulumi_random as random + +config = pulumi.Config() +location = config.get("location") or "WestUS" + +resource_group = resources.ResourceGroup("resourceGroup", + resource_group_name="appservice-docker-rg", + location=location) + +plan = web.AppServicePlan("plan", + resource_group_name=resource_group.name, + name="linux-asp", + location=resource_group.location, + kind="Linux", + reserved=True, + sku=web.SkuDescriptionArgs( + name="B1", + tier="Basic", + ) +) + +suffix = random.RandomString("suffix", + length=6, + special=False, + upper=False) + +# +# 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_in_docker_hub = "microsoft/azure-appservices-go-quickstart" + +hello_app = web.WebApp("helloApp", + resource_group_name=resource_group.name, + location=plan.location, + name=suffix.result.apply(lambda result: f"hello-app-{result}"), + server_farm_id=plan.id, + site_config=web.SiteConfigArgs( + app_settings=[web.NameValuePairArgs( + name="WEBSITES_ENABLE_APP_SERVICE_STORAGE", + value="false" + )], + always_on=True, + linux_fx_version=f"DOCKER|{image_in_docker_hub}", + ), + https_only=True) + +pulumi.export("helloEndpoint", hello_app.default_host_name.apply(lambda default_host_name: f"https://{default_host_name}/hello")) + +# +# Scenario 2: deploying a custom image from Azure Container Registry. +# +custom_image = "node-app" +registry = containerregistry.Registry("registry", + resource_group_name=resource_group.name, + registry_name=suffix.result.apply(lambda result: f"registry{result}"), + location=resource_group.location, + sku=containerregistry.SkuArgs( + name="Basic", + ), + admin_user_enabled=True) + +credentials = pulumi.Output.all(resource_group.name, registry.name).apply(lambda args: containerregistry.list_registry_credentials(resource_group_name=args[0], + registry_name=args[1])) +admin_username = credentials.username +admin_password = credentials.passwords[0]["value"] + +my_image = docker.Image(custom_image, + image_name=registry.login_server.apply(lambda login_server: f"{login_server}/{custom_image}:v1.0.0"), + build=docker.DockerBuild(context=f"./{custom_image}"), + registry=docker.ImageRegistry( + server=registry.login_server, + username=admin_username, + password=admin_password + ) +) + +get_started_app = web.WebApp("getStartedApp", + resource_group_name=resource_group.name, + location=plan.location, + name=suffix.result.apply(lambda result: f"get-started-{result}"), + server_farm_id=plan.id, + site_config=web.SiteConfigArgs( + app_settings=[ + web.NameValuePairArgs(name="WEBSITES_ENABLE_APP_SERVICE_STORAGE", value="false"), + web.NameValuePairArgs(name="DOCKER_REGISTRY_SERVER_URL", value=registry.login_server.apply(lambda login_server: f"https://{login_server}")), + web.NameValuePairArgs(name="DOCKER_REGISTRY_SERVER_USERNAME", value=admin_username), + web.NameValuePairArgs(name="DOCKER_REGISTRY_SERVER_PASSWORD", value=admin_password), + web.NameValuePairArgs(name="WEBSITES_PORT", value="80"), + ], + always_on=True, + linux_fx_version=my_image.image_name.apply(lambda image_name: f"DOCKER|{image_name}"), + ), + https_only=True) + +pulumi.export("getStartedEndpoint", get_started_app.default_host_name.apply(lambda default_host_name: f"https://{default_host_name}")) diff --git a/azure-nextgen-py-appservice-docker/node-app/.dockerignore b/azure-nextgen-py-appservice-docker/node-app/.dockerignore new file mode 100644 index 000000000..5171c5408 --- /dev/null +++ b/azure-nextgen-py-appservice-docker/node-app/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/azure-nextgen-py-appservice-docker/node-app/Dockerfile b/azure-nextgen-py-appservice-docker/node-app/Dockerfile new file mode 100644 index 000000000..b797db724 --- /dev/null +++ b/azure-nextgen-py-appservice-docker/node-app/Dockerfile @@ -0,0 +1,6 @@ +FROM node:8.9.3-alpine +RUN mkdir -p /usr/src/app +COPY ./app/* /usr/src/app/ +WORKDIR /usr/src/app +RUN npm install +CMD node /usr/src/app/index.js \ No newline at end of file diff --git a/azure-nextgen-py-appservice-docker/node-app/app/index.html b/azure-nextgen-py-appservice-docker/node-app/app/index.html new file mode 100644 index 000000000..0f64a8205 --- /dev/null +++ b/azure-nextgen-py-appservice-docker/node-app/app/index.html @@ -0,0 +1,5 @@ + + +

Your custom docker image is running in Azure App Service!

+ + \ No newline at end of file diff --git a/azure-nextgen-py-appservice-docker/node-app/app/index.js b/azure-nextgen-py-appservice-docker/node-app/app/index.js new file mode 100644 index 000000000..e0101aba1 --- /dev/null +++ b/azure-nextgen-py-appservice-docker/node-app/app/index.js @@ -0,0 +1,13 @@ +const express = require('express'); +const morgan = require('morgan'); + +const app = express(); +app.use(morgan('combined')); + +app.get('/', (req, res) => { + res.sendFile(__dirname + '/index.html') +}); + +var listener = app.listen(process.env.PORT || 80, function() { + console.log('listening on port ' + listener.address().port); +}); \ No newline at end of file diff --git a/azure-nextgen-py-appservice-docker/node-app/app/package.json b/azure-nextgen-py-appservice-docker/node-app/app/package.json new file mode 100644 index 000000000..469aaddde --- /dev/null +++ b/azure-nextgen-py-appservice-docker/node-app/app/package.json @@ -0,0 +1,12 @@ +{ + "name": "node-helloworld", + "version": "1.0.0", + "description": "", + "main": "index.js", + "dependencies": { + "express": "^4.14.0", + "morgan": "^1.8.2" + }, + "devDependencies": {}, + "author": "" +} diff --git a/azure-nextgen-py-appservice-docker/requirements.txt b/azure-nextgen-py-appservice-docker/requirements.txt new file mode 100644 index 000000000..4c42d9520 --- /dev/null +++ b/azure-nextgen-py-appservice-docker/requirements.txt @@ -0,0 +1,4 @@ +pulumi>=2.0.0,<3.0.0 +pulumi-azure-nextgen>=0.1.0 +pulumi-docker>=2.0.0,<3.0.0 +pulumi-random>=2.0.0,<3.0.0 diff --git a/azure-nextgen-ts-aci/Pulumi.yaml b/azure-nextgen-ts-aci/Pulumi.yaml new file mode 100644 index 000000000..875e438b6 --- /dev/null +++ b/azure-nextgen-ts-aci/Pulumi.yaml @@ -0,0 +1,8 @@ +name: azureng-ts-aci +runtime: nodejs +description: Creates Azure Container Instance with a public IP +template: + config: + location: + description: Azure region to deploy resources to + default: WestUS diff --git a/azure-nextgen-ts-aci/README.md b/azure-nextgen-ts-aci/README.md new file mode 100644 index 000000000..c1193bcbc --- /dev/null +++ b/azure-nextgen-ts-aci/README.md @@ -0,0 +1,59 @@ +[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new) + +# Azure Container Instances on Linux + +Starting point for building web application hosted in Azure Container Instances. + +## Running the App + +1. Create a new stack: + + ``` + $ pulumi stack init dev + ``` + +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): + + ``` + $ az login + ``` + +1. Restore NPM dependencies: + + ``` + $ npm install + ``` + +1. Set the azure location in which to run the test: + + ``` + $ pulumi config set location westus2 + ``` + +1. Run `pulumi up` to preview and deploy changes: + + ``` + $ pulumi up + Previewing changes: + ... + + Performing changes: + ... + Resources: + + 3 created + + Duration: 1m18s + ``` + +1. Check the deployed endpoint: + + ``` + $ pulumi stack output containerIPv4Address + 13.83.66.37 + $ curl "$(pulumi stack output containerIPv4Address)" + + + Welcome to Azure Container Instances! + + ... + ``` diff --git a/azure-nextgen-ts-aci/index.ts b/azure-nextgen-ts-aci/index.ts new file mode 100644 index 000000000..96d007adf --- /dev/null +++ b/azure-nextgen-ts-aci/index.ts @@ -0,0 +1,43 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +import * as containerinstance from "@pulumi/azure-nextgen/containerinstance/latest"; +import * as resources from "@pulumi/azure-nextgen/resources/latest"; + +const config = new pulumi.Config(); +const location = config.get("location") || "WestUS"; + +const resourceGroup = new resources.ResourceGroup("resourceGroup", { + resourceGroupName: "aci-ts-rg", + location: location, +}); + +const imageName = "mcr.microsoft.com/azuredocs/aci-helloworld"; +const containerGroup = new containerinstance.ContainerGroup("containerGroup", { + resourceGroupName: resourceGroup.name, + location: resourceGroup.location, + containerGroupName: "helloworld", + osType: "Linux", + containers: [{ + name: "acilinuxpublicipcontainergroup", + image: imageName, + ports: [{ port: 80 }], + resources: { + requests: { + cpu: 1.0, + memoryInGB: 1.5, + }, + }, + }], + ipAddress: { + ports: [{ + port: 80, + protocol: "Tcp", + }], + type: "Public", + }, + restartPolicy: "always", +}); + +export const containerIPv4Address = containerGroup.ipAddress.apply(ip => ip?.ip); diff --git a/azure-nextgen-ts-aci/package.json b/azure-nextgen-ts-aci/package.json new file mode 100644 index 000000000..0c34c67dc --- /dev/null +++ b/azure-nextgen-ts-aci/package.json @@ -0,0 +1,11 @@ +{ + "name": "azure-nextgen-ts-aci", + "version": "1.0.0", + "devDependencies": { + "@types/node": "^8.0.0" + }, + "dependencies": { + "@pulumi/azure-nextgen": "^0.1.0", + "@pulumi/pulumi": "^2.0.0" + } +} diff --git a/azure-nextgen-ts-aci/tsconfig.json b/azure-nextgen-ts-aci/tsconfig.json new file mode 100644 index 000000000..61fe22191 --- /dev/null +++ b/azure-nextgen-ts-aci/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true, + "strictNullChecks": true + }, + "files": [ + "index.ts" + ] +} diff --git a/azure-nextgen-ts-appservice-docker/Pulumi.yaml b/azure-nextgen-ts-appservice-docker/Pulumi.yaml new file mode 100644 index 000000000..c6aa16b54 --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/Pulumi.yaml @@ -0,0 +1,8 @@ +name: azureng-ts-appservice-docker +runtime: nodejs +description: Creates Azure App Service and Deploys Docker images to +template: + config: + location: + description: Azure region to deploy resources to + default: WestUS diff --git a/azure-nextgen-ts-appservice-docker/README.md b/azure-nextgen-ts-appservice-docker/README.md new file mode 100644 index 000000000..2a006ad3b --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/README.md @@ -0,0 +1,69 @@ +[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new) + +# Azure App Service Running Docker Containers on Linux + +Starting point for building web application hosted in Azure App Service from Docker images. + +The example shows two scenarios: + +- Deploying an existing image from Docker Hub +- Deploying a new custom registry in Azure Container Registry, building a custom Docker image, and running the image from the custom registry + +## Running the App + +1. Create a new stack: + + ``` + $ pulumi stack init dev + ``` + +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): + + ``` + $ az login + ``` + +1. Restore NPM dependencies: + + ``` + $ npm install + ``` + +1. Set the azure location in which to run the test: + + ``` + $ pulumi config set location westus2 + ``` + +1. Run `pulumi up` to preview and deploy changes: + + ``` + $ pulumi up + Previewing changes: + ... + + Performing changes: + ... + Resources: + + 8 created + + Duration: 56s + ``` + +1. Check the deployed endpoints: + + ``` + $ pulumi stack output HelloEndpoint + http://hello-app-91dfea.azurewebsites.net/hello + $ curl "$(pulumi stack output HelloEndpoint)" + Hello, world! + + $ pulumi stack output GetStartedEndpoint + http://get-started-15da13.azurewebsites.net + $ curl "$(pulumi stack output GetStartedEndpoint)" + + +

Your custom docker image is running in Azure App Service!

+ + + ``` diff --git a/azure-nextgen-ts-appservice-docker/index.ts b/azure-nextgen-ts-appservice-docker/index.ts new file mode 100644 index 000000000..6c2b234f9 --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/index.ts @@ -0,0 +1,128 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +import * as docker from "@pulumi/docker"; +import * as pulumi from "@pulumi/pulumi"; +import * as random from "@pulumi/random"; + +import * as containerregistry from "@pulumi/azure-nextgen/containerregistry/latest"; +import * as resources from "@pulumi/azure-nextgen/resources/latest"; +import * as web from "@pulumi/azure-nextgen/web/latest"; + +const config = new pulumi.Config(); +const location = config.get("location") || "WestUS"; + +const resourceGroup = new resources.ResourceGroup("resourceGroup", { + resourceGroupName: "appservice-docker-rg", + location: location, +}); + +const plan = new web.AppServicePlan("plan", { + resourceGroupName: resourceGroup.name, + name: "linux-asp", + location: resourceGroup.location, + kind: "Linux", + reserved: true, + sku: { + name: "B1", + tier: "Basic", + }, +}); + +const suffix = new random.RandomString("suffix", { + length: 6, + special: false, + upper: false, +}); + +// +// 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/ +// +const imageInDockerHub = "microsoft/azure-appservices-go-quickstart"; + +const helloApp = new web.WebApp("helloApp", { + resourceGroupName: resourceGroup.name, + location: plan.location, + name: pulumi.interpolate`hello-app-${suffix.result}`, + serverFarmId: plan.id, + siteConfig: { + appSettings: [{ + name: "WEBSITES_ENABLE_APP_SERVICE_STORAGE", + value: "false", + }], + alwaysOn: true, + linuxFxVersion: `DOCKER|${imageInDockerHub}`, + }, + httpsOnly: true, +}); + +export const helloEndpoint = pulumi.interpolate`https://${helloApp.defaultHostName}/hello`; + +// +// Scenario 2: deploying a custom image from Azure Container Registry. +// +const customImage = "node-app"; +const registry = new containerregistry.Registry("registry", { + resourceGroupName: resourceGroup.name, + registryName: pulumi.interpolate`registry${suffix.result}`, + location: resourceGroup.location, + sku: { + name: "Basic", + }, + adminUserEnabled: true, +}); + +const credentials = pulumi.all([resourceGroup.name, registry.name]).apply( + ([resourceGroupName, registryName]) => containerregistry.listRegistryCredentials({ + resourceGroupName: resourceGroupName, + registryName: registryName, +})); +const adminUsername = credentials.apply(credentials => credentials.username!); +const adminPassword = credentials.apply(credentials => credentials.passwords![0].value!); + +const myImage = new docker.Image(customImage, { + imageName: pulumi.interpolate`${registry.loginServer}/${customImage}:v1.0.0`, + build: { context: `./${customImage}` }, + registry: { + server: registry.loginServer, + username: adminUsername, + password: adminPassword, + }, +}); + +const getStartedApp = new web.WebApp("getStartedApp", { + resourceGroupName: resourceGroup.name, + location: plan.location, + name: pulumi.interpolate`get-started-${suffix.result}`, + serverFarmId: plan.id, + siteConfig: { + appSettings: [ + { + name: "WEBSITES_ENABLE_APP_SERVICE_STORAGE", + value: "false", + }, + { + name: "DOCKER_REGISTRY_SERVER_URL", + value: pulumi.interpolate`https://${registry.loginServer}`, + }, + { + name: "DOCKER_REGISTRY_SERVER_USERNAME", + value: adminUsername, + }, + { + name: "DOCKER_REGISTRY_SERVER_PASSWORD", + value: adminPassword, + }, + { + name: "WEBSITES_PORT", + value: "80", // Our custom image exposes port 80. Adjust for your app as needed. + }, + ], + alwaysOn: true, + linuxFxVersion: pulumi.interpolate`DOCKER|${myImage.imageName}`, + }, + httpsOnly: true, +}); + +export const getStartedEndpoint = pulumi.interpolate`https://${getStartedApp.defaultHostName}`; diff --git a/azure-nextgen-ts-appservice-docker/node-app/.dockerignore b/azure-nextgen-ts-appservice-docker/node-app/.dockerignore new file mode 100644 index 000000000..5171c5408 --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/node-app/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/azure-nextgen-ts-appservice-docker/node-app/Dockerfile b/azure-nextgen-ts-appservice-docker/node-app/Dockerfile new file mode 100644 index 000000000..b797db724 --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/node-app/Dockerfile @@ -0,0 +1,6 @@ +FROM node:8.9.3-alpine +RUN mkdir -p /usr/src/app +COPY ./app/* /usr/src/app/ +WORKDIR /usr/src/app +RUN npm install +CMD node /usr/src/app/index.js \ No newline at end of file diff --git a/azure-nextgen-ts-appservice-docker/node-app/app/index.html b/azure-nextgen-ts-appservice-docker/node-app/app/index.html new file mode 100644 index 000000000..0f64a8205 --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/node-app/app/index.html @@ -0,0 +1,5 @@ + + +

Your custom docker image is running in Azure App Service!

+ + \ No newline at end of file diff --git a/azure-nextgen-ts-appservice-docker/node-app/app/index.js b/azure-nextgen-ts-appservice-docker/node-app/app/index.js new file mode 100644 index 000000000..e0101aba1 --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/node-app/app/index.js @@ -0,0 +1,13 @@ +const express = require('express'); +const morgan = require('morgan'); + +const app = express(); +app.use(morgan('combined')); + +app.get('/', (req, res) => { + res.sendFile(__dirname + '/index.html') +}); + +var listener = app.listen(process.env.PORT || 80, function() { + console.log('listening on port ' + listener.address().port); +}); \ No newline at end of file diff --git a/azure-nextgen-ts-appservice-docker/node-app/app/package.json b/azure-nextgen-ts-appservice-docker/node-app/app/package.json new file mode 100644 index 000000000..469aaddde --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/node-app/app/package.json @@ -0,0 +1,12 @@ +{ + "name": "node-helloworld", + "version": "1.0.0", + "description": "", + "main": "index.js", + "dependencies": { + "express": "^4.14.0", + "morgan": "^1.8.2" + }, + "devDependencies": {}, + "author": "" +} diff --git a/azure-nextgen-ts-appservice-docker/package.json b/azure-nextgen-ts-appservice-docker/package.json new file mode 100644 index 000000000..6cd9a932a --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/package.json @@ -0,0 +1,13 @@ +{ + "name": "azure-nextgen-ts-appservice-docker", + "version": "1.0.0", + "devDependencies": { + "@types/node": "^8.0.0" + }, + "dependencies": { + "@pulumi/azure-nextgen": "^0.1.0", + "@pulumi/docker": "^2.0.0", + "@pulumi/pulumi": "^2.0.0", + "@pulumi/random": "^2.0.0" + } +} diff --git a/azure-nextgen-ts-appservice-docker/tsconfig.json b/azure-nextgen-ts-appservice-docker/tsconfig.json new file mode 100644 index 000000000..61fe22191 --- /dev/null +++ b/azure-nextgen-ts-appservice-docker/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true, + "strictNullChecks": true + }, + "files": [ + "index.ts" + ] +}