Package: pulumi-pulumistack
pulumistack Pulumi ProviderA Pulumi provider for managing PulumiStacks.Build and Test$makeensure
$makebuildExampleThis example deploys an Azure Kubernetes Cluster (using a Go program that lives inpulumi/examples) and then a Guestbook application inside the Kubernetes cluster (using a C# program that also lives in a different folder ofpulumi/examples).  These two stacks can be wired together based on config and outputs, and dependencies are tracked between the two stacks.import*aspulumistackfrom"./pulumistack"import*aspulumifrom"@pulumi/pulumi";constproject=pulumi.getProject();conststack=pulumi.getStack();constcluster=newpulumistack.Stack("azure-go-aks",{repoUrl:"https://github.com/pulumi/examples/",path:"azure-go-aks",name:`lukehoban/azure-go-aks/${project}-${stack}`,config:{"azure:location":"westus","kubernetesVersion":"1.16.13",}});constapp=newpulumistack.Stack("kubernetes-cs-guestbook",{repoUrl:"https://github.com/pulumi/examples/",path:"kubernetes-cs-guestbook/components",name:`lukehoban/guestbook-csharp-components/${project}-${stack}`,config:{"kubernetes:kubeconfig":cluster.outputs["kubeconfig"],}});exportconstfrontendIp=app.outputs["FrontendIp"];Runningpulumi updeploys each of the nested stacks and then the computed stack output.$ pulumi up     
Previewing update (dev):
     Type                        Name                                Plan       
 +   pulumi:pulumi:Stack         pulumistack-kubeclussterandapp-dev  create     
 +   ├─ pulumistack:stack:Stack  azure-go-aks                        create     
 +   └─ pulumistack:stack:Stack  kubernetes-cs-guestbook             create     
 
Resources:
    + 3 to create

Do you want to perform this update? yes
Updating (dev):
     Type                        Name                                Status      
 +   pulumi:pulumi:Stack         pulumistack-kubeclussterandapp-dev  created     
 +   ├─ pulumistack:stack:Stack  azure-go-aks                        created     
 +   └─ pulumistack:stack:Stack  kubernetes-cs-guestbook             created     
 
Outputs:
    frontendIp: "13.87.216.164"

Resources:
    + 3 created

Duration: 7m41s

Permalink: https://app.pulumi.com/lukehoban/pulumistack-kubeclussterandapp/dev/updates/8This results in a working Guestbook application running in the new AKS cluster:$ curl 13.87.216.164
<html ng-app="redis">
  <head>
    <title>Guestbook</title>
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script>
    <script src="controllers.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.13.0/ui-bootstrap-tpls.js"></script>
  </head>
  <body ng-controller="RedisCtrl">
    <div style="width: 50%; margin-left: 20px">
      <h2>Guestbook</h2>
    <form>
    <fieldset>
    <input ng-model="msg" placeholder="Messages" class="form-control" type="text" name="input"><br>
    <button type="button" class="btn btn-primary" ng-click="controller.onRedis()">Submit</button>
    </fieldset>
    </form>
    <div>
      <div ng-repeat="msg in messages track by $index">
        {{msg}}
      </div>
    </div>
    </div>
  </body>
</html>ReferencesOther resoruces for learning about the Pulumi resource model:Pulumi Kubernetes providerPulumi Terraform Remote State providerDynamic Providers