How to use the @pulumi/linode.StackScript function in @pulumi/linode

To help you get started, we’ve selected a few @pulumi/linode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pulumi / examples / linode-js-webserver / index.ts View on Github external
// Copyright 2016-2019, Pulumi Corporation.  All rights reserved.

const pulumi = require("@pulumi/pulumi");
const linode = require("@pulumi/linode");
const debian9 = "linode/debian9";

// (optional) create a simple web server using a startup script for the instance
const startupScript = `#!/bin/bash
echo "Hello, World!" > index.html
nohup python -m SimpleHTTPServer 80 &`;

const profile = pulumi.output(linode.getProfile({ async: true }));

const stackscript = new linode.StackScript("simple-server", {
  label: "simple-server",
  script: startupScript,
  description: "SimpleHTTPServer example StackScript",
  images: [debian9],

const linodeInstance = new linode.Instance("instance", {
  instanceType: "g6-nanode-1",
  stackscriptId: stackscript,
  image: debian9,
  region: "us-east",
  // Include all "LISH" registered SSH Keys
  authorizedKeys: profile.authorizedKeys,
  // Include all User configured SSH Keys
  authorizedUsers: [profile.username],
}, { dependsOn: [stackscript] });


A Pulumi package for creating and managing linode cloud resources.

Latest version published 5 months ago

Package Health Score

78 / 100
Full package analysis