Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

cloud-init

v1.3.0 published on Thursday, Nov 18, 2021 by Pulumi

The cloud-init provider for Pulumi can be used to render valid MIME-multipart cloud-init config.

Example

const cloudinit = require("@pulumi/cloudinit")

const resourceConf = new cloudinit.Config("config", {
    gzip: false,
    base64Encode: false,
    parts: [{
        contentType: "text/x-shellscript",
        content: "baz",
        filename: "foobar.sh",
    }]
});
import * as cloudinit from "@pulumi/cloudinit";

const resourceConf = new cloudinit.Config("config", {
    gzip: false,
    base64Encode: false,
    parts: [{
        contentType: "text/x-shellscript",
        content: "baz",
        filename: "foobar.sh",
    }]
});
import pulumi_cloudinit as cloudinit

resource_config = cloudinit.Config("resource", base64_encode=False,
                                   gzip=False,
                                   parts=[cloudinit.GetConfigPartArgs(
                                       content="baz",
                                       content_type="text/x-shellscript",
                                       filename="foobar.sh",
                                   )])
import (
  "github.com/pulumi/pulumi-cloudinit/sdk/go/cloudinit"
  "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
  pulumi.Run(func(ctx *pulumi.Context) error {
    conf, err := cloudinit.NewConfig(ctx, "test", &cloudinit.ConfigArgs{
      Gzip:         pulumi.Bool(false),
      Base64Encode: pulumi.Bool(false),
      Parts: cloudinit.ConfigPartArray{
        &cloudinit.ConfigPartArgs{
          Content:     pulumi.String("baz"),
          ContentType: pulumi.String("text/x-shellscript"),
          Filename:    pulumi.String("foobar.sh"),
        },
      },
    })
    if err != nil {
      return err
    }

    return nil
  })
}
using System.Collections.Generic;
using System.Threading.Tasks;
using Pulumi;
using Pulumi.CloudInit;

class Program
{
    static Task Main() =>
        Deployment.Run(() => {
          var conf = new Pulumi.CloudInit.Config("demo", new Pulumi.CloudInit.ConfigArgs
          {
              Gzip = false,
              Base64Encode = false,
              Parts =
              {
                  new ConfigPartArgs()
                  {
                      Content = "baz",
                      ContentType = "text/x-shellscript",
                      Filename = "foobar.sh",
                  }
              }
          });
        });
}