published on Wednesday, Apr 8, 2026 by Pydantic
published on Wednesday, Apr 8, 2026 by Pydantic
Manages a Logfire write token.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as logfire from "@pydantic/pulumi-logfire";
const exampleProject = new logfire.Project("exampleProject", {});
const exampleWriteToken = new logfire.WriteToken("exampleWriteToken", {
projectId: exampleProject.id,
expiresAt: "2099-12-31T23:59:59Z",
});
import pulumi
import pulumi_logfire as logfire
example_project = logfire.Project("exampleProject")
example_write_token = logfire.WriteToken("exampleWriteToken",
project_id=example_project.id,
expires_at="2099-12-31T23:59:59Z")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pydantic/pulumi-logfire/sdk/go/logfire"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleProject, err := logfire.NewProject(ctx, "exampleProject", nil)
if err != nil {
return err
}
_, err = logfire.NewWriteToken(ctx, "exampleWriteToken", &logfire.WriteTokenArgs{
ProjectId: exampleProject.ID(),
ExpiresAt: pulumi.String("2099-12-31T23:59:59Z"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Logfire = Pulumi.Logfire;
return await Deployment.RunAsync(() =>
{
var exampleProject = new Logfire.Project("exampleProject");
var exampleWriteToken = new Logfire.WriteToken("exampleWriteToken", new()
{
ProjectId = exampleProject.Id,
ExpiresAt = "2099-12-31T23:59:59Z",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logfire.Project;
import com.pulumi.logfire.WriteToken;
import com.pulumi.logfire.WriteTokenArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleProject = new Project("exampleProject");
var exampleWriteToken = new WriteToken("exampleWriteToken", WriteTokenArgs.builder()
.projectId(exampleProject.id())
.expiresAt("2099-12-31T23:59:59Z")
.build());
}
}
resources:
exampleProject:
type: logfire:Project
exampleWriteToken:
type: logfire:WriteToken
properties:
projectId: ${exampleProject.id}
expiresAt: 2099-12-31T23:59:59Z
Create WriteToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WriteToken(name: string, args: WriteTokenArgs, opts?: CustomResourceOptions);@overload
def WriteToken(resource_name: str,
args: WriteTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WriteToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
expires_at: Optional[str] = None)func NewWriteToken(ctx *Context, name string, args WriteTokenArgs, opts ...ResourceOption) (*WriteToken, error)public WriteToken(string name, WriteTokenArgs args, CustomResourceOptions? opts = null)
public WriteToken(String name, WriteTokenArgs args)
public WriteToken(String name, WriteTokenArgs args, CustomResourceOptions options)
type: logfire:WriteToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WriteTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WriteTokenArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WriteTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WriteTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WriteTokenArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var writeTokenResource = new Logfire.Index.WriteToken("writeTokenResource", new()
{
ProjectId = "string",
ExpiresAt = "string",
});
example, err := logfire.NewWriteToken(ctx, "writeTokenResource", &logfire.WriteTokenArgs{
ProjectId: pulumi.String("string"),
ExpiresAt: pulumi.String("string"),
})
var writeTokenResource = new WriteToken("writeTokenResource", WriteTokenArgs.builder()
.projectId("string")
.expiresAt("string")
.build());
write_token_resource = logfire.WriteToken("writeTokenResource",
project_id="string",
expires_at="string")
const writeTokenResource = new logfire.WriteToken("writeTokenResource", {
projectId: "string",
expiresAt: "string",
});
type: logfire:WriteToken
properties:
expiresAt: string
projectId: string
WriteToken Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WriteToken resource accepts the following input properties:
- project_
id str - UUID of the project that owns the token.
- expires_
at str - Optional RFC3339 expiration timestamp for the token (for example
2026-12-31T23:59:59Z). If omitted, the token does not expire.
Outputs
All input properties are implicitly available as output properties. Additionally, the WriteToken resource produces the following output properties:
- Created
At string - Timestamp when the token was created.
- Created
By stringName - Display name of the user that created the token.
- Description string
- Description is fixed to "Created by Public API" for provider-managed tokens.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Name string - Name of the project that owns the token.
- Token string
- The generated write token. Only returned on creation.
- Token
Prefix string - Prefix of the generated write token.
- Created
At string - Timestamp when the token was created.
- Created
By stringName - Display name of the user that created the token.
- Description string
- Description is fixed to "Created by Public API" for provider-managed tokens.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Name string - Name of the project that owns the token.
- Token string
- The generated write token. Only returned on creation.
- Token
Prefix string - Prefix of the generated write token.
- created
At String - Timestamp when the token was created.
- created
By StringName - Display name of the user that created the token.
- description String
- Description is fixed to "Created by Public API" for provider-managed tokens.
- id String
- The provider-assigned unique ID for this managed resource.
- project
Name String - Name of the project that owns the token.
- token String
- The generated write token. Only returned on creation.
- token
Prefix String - Prefix of the generated write token.
- created
At string - Timestamp when the token was created.
- created
By stringName - Display name of the user that created the token.
- description string
- Description is fixed to "Created by Public API" for provider-managed tokens.
- id string
- The provider-assigned unique ID for this managed resource.
- project
Name string - Name of the project that owns the token.
- token string
- The generated write token. Only returned on creation.
- token
Prefix string - Prefix of the generated write token.
- created_
at str - Timestamp when the token was created.
- created_
by_ strname - Display name of the user that created the token.
- description str
- Description is fixed to "Created by Public API" for provider-managed tokens.
- id str
- The provider-assigned unique ID for this managed resource.
- project_
name str - Name of the project that owns the token.
- token str
- The generated write token. Only returned on creation.
- token_
prefix str - Prefix of the generated write token.
- created
At String - Timestamp when the token was created.
- created
By StringName - Display name of the user that created the token.
- description String
- Description is fixed to "Created by Public API" for provider-managed tokens.
- id String
- The provider-assigned unique ID for this managed resource.
- project
Name String - Name of the project that owns the token.
- token String
- The generated write token. Only returned on creation.
- token
Prefix String - Prefix of the generated write token.
Look up Existing WriteToken Resource
Get an existing WriteToken resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WriteTokenState, opts?: CustomResourceOptions): WriteToken@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
created_by_name: Optional[str] = None,
description: Optional[str] = None,
expires_at: Optional[str] = None,
project_id: Optional[str] = None,
project_name: Optional[str] = None,
token: Optional[str] = None,
token_prefix: Optional[str] = None) -> WriteTokenfunc GetWriteToken(ctx *Context, name string, id IDInput, state *WriteTokenState, opts ...ResourceOption) (*WriteToken, error)public static WriteToken Get(string name, Input<string> id, WriteTokenState? state, CustomResourceOptions? opts = null)public static WriteToken get(String name, Output<String> id, WriteTokenState state, CustomResourceOptions options)resources: _: type: logfire:WriteToken get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - Timestamp when the token was created.
- Created
By stringName - Display name of the user that created the token.
- Description string
- Description is fixed to "Created by Public API" for provider-managed tokens.
- Expires
At string - Optional RFC3339 expiration timestamp for the token (for example
2026-12-31T23:59:59Z). If omitted, the token does not expire. - Project
Id string - UUID of the project that owns the token.
- Project
Name string - Name of the project that owns the token.
- Token string
- The generated write token. Only returned on creation.
- Token
Prefix string - Prefix of the generated write token.
- Created
At string - Timestamp when the token was created.
- Created
By stringName - Display name of the user that created the token.
- Description string
- Description is fixed to "Created by Public API" for provider-managed tokens.
- Expires
At string - Optional RFC3339 expiration timestamp for the token (for example
2026-12-31T23:59:59Z). If omitted, the token does not expire. - Project
Id string - UUID of the project that owns the token.
- Project
Name string - Name of the project that owns the token.
- Token string
- The generated write token. Only returned on creation.
- Token
Prefix string - Prefix of the generated write token.
- created
At String - Timestamp when the token was created.
- created
By StringName - Display name of the user that created the token.
- description String
- Description is fixed to "Created by Public API" for provider-managed tokens.
- expires
At String - Optional RFC3339 expiration timestamp for the token (for example
2026-12-31T23:59:59Z). If omitted, the token does not expire. - project
Id String - UUID of the project that owns the token.
- project
Name String - Name of the project that owns the token.
- token String
- The generated write token. Only returned on creation.
- token
Prefix String - Prefix of the generated write token.
- created
At string - Timestamp when the token was created.
- created
By stringName - Display name of the user that created the token.
- description string
- Description is fixed to "Created by Public API" for provider-managed tokens.
- expires
At string - Optional RFC3339 expiration timestamp for the token (for example
2026-12-31T23:59:59Z). If omitted, the token does not expire. - project
Id string - UUID of the project that owns the token.
- project
Name string - Name of the project that owns the token.
- token string
- The generated write token. Only returned on creation.
- token
Prefix string - Prefix of the generated write token.
- created_
at str - Timestamp when the token was created.
- created_
by_ strname - Display name of the user that created the token.
- description str
- Description is fixed to "Created by Public API" for provider-managed tokens.
- expires_
at str - Optional RFC3339 expiration timestamp for the token (for example
2026-12-31T23:59:59Z). If omitted, the token does not expire. - project_
id str - UUID of the project that owns the token.
- project_
name str - Name of the project that owns the token.
- token str
- The generated write token. Only returned on creation.
- token_
prefix str - Prefix of the generated write token.
- created
At String - Timestamp when the token was created.
- created
By StringName - Display name of the user that created the token.
- description String
- Description is fixed to "Created by Public API" for provider-managed tokens.
- expires
At String - Optional RFC3339 expiration timestamp for the token (for example
2026-12-31T23:59:59Z). If omitted, the token does not expire. - project
Id String - UUID of the project that owns the token.
- project
Name String - Name of the project that owns the token.
- token String
- The generated write token. Only returned on creation.
- token
Prefix String - Prefix of the generated write token.
Package Details
- Repository
- logfire pydantic/pulumi-logfire
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
logfireTerraform Provider.
published on Wednesday, Apr 8, 2026 by Pydantic
