Official Terraform provider for Nitrozen.io — manage changelog projects and entries as infrastructure code.
Declare the provider in your Terraform configuration and run terraform init to install it.
terraform {
required_providers {
nitrozen = {
source = "nitrozenio/nitrozen"
version = "~> 1.0"
}
}
}A complete example that creates a project and publishes a changelog entry:
terraform {
required_providers {
nitrozen = {
source = "nitrozenio/nitrozen"
version = "~> 1.0"
}
}
}
provider "nitrozen" {
token = var.nitrozen_token
}
variable "nitrozen_token" {
description = "Nitrozen API token"
type = string
sensitive = true
}
resource "nitrozen_project" "my_app" {
name = "My App"
description = "Changelog for My App"
}
resource "nitrozen_entry" "launch" {
project_id = nitrozen_project.my_app.id
title = "v1.0 — Initial Release"
content = "We shipped v1.0. Thanks for your patience and support!"
category = "new"
is_published = true
}Create an API token from the API Tokens page and pass it to the provider. It's recommended to use a Terraform variable or environment variable rather than hardcoding the token.
provider "nitrozen" {
token = var.nitrozen_token
}
variable "nitrozen_token" {
description = "Nitrozen API token"
type = string
sensitive = true
}You can also provide the token via a .tfvars file or the TF_VAR_nitrozen_token environment variable:
export TF_VAR_nitrozen_token="your-token-here"
terraform applyManages a changelog project on Nitrozen.io.
resource "nitrozen_project" "example" {
name = "My App"
description = "Product updates and release notes"
}
output "project_id" {
value = nitrozen_project.example.id
}| Argument | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The name of the project. |
| description | string | No | An optional description for the project. |
| Attribute | Type | Description |
|---|---|---|
| id | number | The unique ID of the project. Exported after creation. |
Manages a changelog entry within a project.
resource "nitrozen_entry" "release" {
project_id = nitrozen_project.my_app.id
title = "v2.0 — Dark mode"
content = "We added dark mode support across the entire app."
category = "new"
is_published = true
}
# Draft entry (is_published defaults to false)
resource "nitrozen_entry" "draft" {
project_id = nitrozen_project.my_app.id
title = "Upcoming maintenance window"
content = "Scheduled maintenance on Saturday 2am–4am UTC."
category = "announcement"
}| Argument | Type | Required | Description |
|---|---|---|---|
| project_id | number | Yes | The ID of the parent project. Changing this forces a new resource. |
| title | string | Yes | The title of the changelog entry. |
| content | string | Yes | The body content of the entry. Markdown is supported. |
| category | string | Yes | The entry category. See valid values below. |
| is_published | bool | No | Whether the entry is publicly visible. Defaults to false. |
category values:
new
improvement
fix
announcement
Projects on a plan with custom categories enabled can define additional category slugs from the dashboard — any of those slugs are valid here too.
| Attribute | Type | Description |
|---|---|---|
| id | number | The unique ID of the entry. Exported after creation. |
Bring existing Nitrozen resources under Terraform management using terraform import.
# Import using the project ID
terraform import nitrozen_project.example 123# Import using project_id/entry_id
terraform import nitrozen_entry.example 42/7