npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kitsu-io/pulumi-postmark

v1.0.0

Published

A [Pulumi](https://www.pulumi.com) provider for [Postmark](https://postmarkapp.com), for managing transactional-email infrastructure declaratively: **Servers**, **Domains**, **Sender Signatures**, and **Templates**.

Downloads

198

Readme

pulumi-postmark

A Pulumi provider for Postmark, for managing transactional-email infrastructure declaratively: Servers, Domains, Sender Signatures, and Templates.

Built as a native Go provider on pulumi-go-provider and wrapping the mrz1836/postmark client.

Resources

| Resource | What it manages | Token used | |---|---|---| | postmark:index:Server | A sending server: inbound-email config, tracking, and its own (secret) API token | Account | | postmark:index:Domain | A sending domain; exposes DKIM / Return-Path DNS records as outputs | Account | | postmark:index:DomainVerification | Triggers DKIM / Return-Path verification after your DNS is published | Account | | postmark:index:SenderSignature | A single verified From address | Account | | postmark:index:Template | A transactional template or layout (lives inside a Server) | Server |

Authentication

Postmark uses two tokens with different scopes:

  • Account API token (X-Postmark-Account-Token) — manages Servers, Domains and Sender Signatures. Required.
  • Server API token (X-Postmark-Server-Token) — manages Templates inside one server.

Configure the provider:

pulumi config set --secret postmark:accountToken <ACCOUNT_TOKEN>
# optional default server token for Templates (single-server convenience):
pulumi config set --secret postmark:serverToken <SERVER_TOKEN>

Or via environment variables: POSTMARK_ACCOUNT_TOKEN, POSTMARK_SERVER_TOKEN, POSTMARK_BASE_URL.

Templates and server tokens

A Template needs the API token of its parent server. The idiomatic way is to wire it from the Server resource's secret apiTokens output:

srv, _ := postmark.NewServer(ctx, "app", &postmark.ServerArgs{Name: pulumi.String("app")})
postmark.NewTemplate(ctx, "welcome", &postmark.TemplateArgs{
    Name:        pulumi.String("Welcome"),
    Subject:     pulumi.String("Hi"),
    HtmlBody:    pulumi.String("<h1>Hi {{name}}</h1>"),
    ServerToken: srv.ApiTokens.Index(pulumi.Int(0)), // <- wired from the server
})

Token resolution precedence for a Template: serverToken input → serverId lookup (the provider fetches the token using the account token) → provider serverToken config.

DNS verification flow (Domains)

Verification is deliberately split from provisioning so pulumi up never blocks on DNS:

  1. Domain.Create returns the records to publish as outputs: dkimPendingHost / dkimPendingTextValue (a TXT record) and returnPathDomainCnameValue (a CNAME).
  2. Wire those outputs into your DNS provider (Route53, Cloudflare, …).
  3. Add a DomainVerification resource (depending on your DNS records) to call Postmark's verify endpoints. Set pollTimeoutSeconds to wait for propagation up to a bounded timeout; the default (0) makes a single, non-blocking attempt.

DKIM rotation (RotateDKIM) is not automated — the active/pending/revoked records are surfaced as outputs for you to manage deliberately.

Sender Signature confirmation

A SenderSignature is created unconfirmed: Postmark emails the address a link that a human must click. The provider never blocks on this — confirmed is a read-only output that flips to true (observable after pulumi refresh) once the link is clicked. Change the triggerResend input to resend the confirmation email. Prefer a verified Domain where possible, since it needs no human step.

Importing existing resources

pulumi import postmark:index:Server          app          12345
pulumi import postmark:index:Domain          example-com  36736
pulumi import postmark:index:SenderSignature ceo          9876
pulumi import postmark:index:Template        welcome      12345/678   # {serverId}/{templateId}

Importing a Template requires a usable server token (postmark:serverToken config or a resolvable serverId), since reading a template is a server-scoped operation.

Development

make provider       # build bin/pulumi-resource-postmark
make install        # build + copy the plugin into $GOPATH/bin (on the local plugin path)
make codegen        # regenerate schema.json + all SDK sources
make build_sdks     # compile all language SDKs (go, nodejs, python, dotnet, java)
make test_provider  # run provider unit tests
make lint           # golangci-lint

This repo follows the pulumi-provider-boilerplate layout and tooling (root Go module, pulumictl-based versioning, GoReleaser). Tool versions are pinned in .mise.toml / .pulumi.version.

To try the example against a real (sandbox) Postmark account:

make install
cd examples/simple
pulumi config set --secret postmark:accountToken <ACCOUNT_TOKEN>
pulumi up

For local provider debugging without installing, use a binary path under plugins.providers in Pulumi.yaml, or PULUMI_DEBUG_PROVIDERS.

Releasing

CI runs on every push/PR; pushing a vX.Y.Z tag builds the plugin binaries, publishes a GitHub Release, tags the Go SDK, and publishes the npm SDK (@kitsu-io/pulumi-postmark). See docs/RELEASING.md for the release flow and one-time setup.

License

Apache-2.0