Skip to content
HTML/CSS to ImageDocs

Define your HTML/CSS to Image setup alongside the applications that use it, using Terraform or Pulumi.

Infrastructure as code (IaC) puts your configuration in version control. Review proposed changes before applying them, reuse the same setup across environments, and connect HCTI resources to infrastructure managed by other providers.

See the Terraform Registry documentation for the complete provider, resource, and data source reference.

  • An application’s rendering setup: create an API key with the required permissions, save its secret in your cloud’s secrets manager, and deploy a reusable image template with your application.
  • Image delivery to your own storage: provision a bucket and access policies with your cloud provider, register an HCTI storage destination, and reference it from templates or images.
  • Social images for a website: manage an Open Graph configuration and its template with the same deployment that updates your site.
  • Repeatable environments: give development and production separate application keys and resource configurations. Your provider credentials determine the HCTI organization each deployment manages.

Resource references establish dependencies. For example, an image can reference the ID of a template created in the same deployment, without copying IDs between files.

Workflow Terraform Pulumi
Configuration HCL TypeScript, JavaScript, Python, Go, C#, Java, or YAML
Review changes terraform plan pulumi preview
Apply changes terraform apply pulumi up
Get started Terraform guide Pulumi guide

The Pulumi provider bridges the HCTI Terraform provider, so both offer the same resource lifecycle behavior. Their release versions are independent.

Resource Use it for Guides
HTML/CSS images Save image definitions from HTML and CSS Terraform · Pulumi
URL images Save webpage screenshot definitions Terraform · Pulumi
Templated images Create images from a reusable template and values Terraform · Pulumi
Templates Manage reusable HTML/CSS designs and their versions Terraform · Pulumi
API keys Manage application credentials and permissions Terraform · Pulumi
Proxies Register an existing proxy for rendering Terraform · Pulumi
Storage destinations Connect image output to your object storage Terraform · Pulumi
OG configurations Configure automatic Open Graph images Terraform · Pulumi

Both providers can also look up an existing template, its version history, and the AWS external ID and HCTI writer role ARN needed for an S3 trust policy. They do not offer usage lookups or manage organization membership, billing, or plan settings.

Use a dedicated management key with the permissions needed to read, create/update, and delete the resources in your deployment. Plan and refresh operations need read access too. An Owner or Admin can configure this key in the dashboard. Use it to manage separate application keys; do not manage the provider’s own credentials as a resource.

Terraform and Pulumi keep state to track resource IDs and configuration. API key secrets, proxy passwords, storage credentials, headers, and template values may be present in that state. Use an access-controlled backend. Terraform’s sensitive marking hides values in normal output but does not remove them from state; use Pulumi secret inputs for confidential values in your programs.

Image resources save definitions. Applying or refreshing a deployment does not render image bytes. Use the returned rendering URL when you want the image rendered. For custom-storage-only output, rendering requires an authenticated PUT to the returned /store URL rather than a public CDN request.

Changing image rendering inputs replaces the image with a new ID. Each image resource has independent ownership because the provider disables create-time deduplication. Template edits create a new version under the same template ID. Destroying a storage destination removes its HCTI configuration, not the bucket or files; destroying an API key disables it.

For deployment-time rendering, see rendering after Terraform apply or Pulumi render steps. If old URLs must remain available, configure Pulumi retention or follow the Terraform retention limitations before replacing or removing images.

Use IaC for persistent application configuration and managed image definitions. For images created in response to individual user requests, call the image API from your application.

Need help?

Talk to a human. Email support@htmlcsstoimage.com and we’ll help you get started.