Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pulumistack Pulumi Provider

A Pulumi provider for managing Pulumi Stacks.

Build and Test

$ make ensure
$ make build

Example

This example deploys an Azure Kubernetes Cluster (using a Go program that lives in pulumi/examples) and then a Guestbook application inside the Kubernetes cluster (using a C# program that also lives in a different folder of pulumi/examples). These two stacks can be wired together based on config and outputs, and dependencies are tracked between the two stacks.

import * as pulumistack from "./pulumistack"
import * as pulumi from "@pulumi/pulumi";

const project = pulumi.getProject();
const stack = pulumi.getStack();

const cluster = new pulumistack.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",
    }
});

const app = new pulumistack.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"],
    }
});

export const frontendIp = app.outputs["FrontendIp"];

Running pulumi up deploys 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/8

This 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>

References

Other resoruces for learning about the Pulumi resource model:

Metadata

Release files for pulumi-pulumistack 0.0.1a1612923212

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pulumi-pulumistack 0.0.1a1612923212
File Size Uploaded Provenance Actions
pulumi_pulumistack-0.0.1a1612923212.tar.gz 6.4 kB Without provenance Details for pulumi_pulumistack-0.0.1a1612923212.tar.gz

Release files / pulumi_pulumistack-0.0.1a1612923212.tar.gz

Download URL pulumi_pulumistack-0.0.1a1612923212.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c56f4d86cb9e1e746145b89adaf4ef8d9ce396d36b565254d74f710a0262ab1a
BLAKE2b-256 checksum
How to use checksums
bf8e6c1e0970a336ca49d93767e116df24518ecbd81c955d8b235c32b6fecfd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.9.1

Security for pulumi-pulumistack 0.0.1a1612923212

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page