1. Registry
  2. Packages
  3. Logfire
  4. API Docs
  5. FrontendApplication
Viewing docs for Logfire v0.1.21
published on Wednesday, Sep 9, 2026 by Pydantic
logfire logo
Viewing docs for Logfire v0.1.21
published on Wednesday, Sep 9, 2026 by Pydantic

    Experimental: the backing management API is currently enabled only in Logfire staging environments. Manages an immutable Logfire frontend application identity and exposes one active restricted browser token. Use logfire.FrontendApplicationToken for two-phase rotation. Creation is not retried automatically because the operation is not idempotent; after an uncertain failure, list the applications and import the matching identity instead of applying again.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as logfire from "@pydantic/pulumi-logfire";
    
    const example = new logfire.Project("example", {});
    const browser = new logfire.FrontendApplication("browser", {
        projectId: example.id,
        serviceNamespace: "storefront",
        environment: "production",
    });
    export const browserWriteToken = browser.token;
    
    import pulumi
    import pulumi_logfire as logfire
    
    example = logfire.Project("example")
    browser = logfire.FrontendApplication("browser",
        project_id=example.id,
        service_namespace="storefront",
        environment="production")
    pulumi.export("browserWriteToken", browser.token)
    
    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 {
    		example, err := logfire.NewProject(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		browser, err := logfire.NewFrontendApplication(ctx, "browser", &logfire.FrontendApplicationArgs{
    			ProjectId:        example.ID(),
    			ServiceNamespace: pulumi.String("storefront"),
    			Environment:      pulumi.String("production"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("browserWriteToken", browser.Token)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logfire = Pulumi.Logfire;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Logfire.Project("example");
    
        var browser = new Logfire.FrontendApplication("browser", new()
        {
            ProjectId = example.Id,
            ServiceNamespace = "storefront",
            Environment = "production",
        });
    
        return new Dictionary<string, object?>
        {
            ["browserWriteToken"] = browser.Token,
        };
    });
    
    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.FrontendApplication;
    import com.pulumi.logfire.FrontendApplicationArgs;
    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 example = new Project("example");
    
            var browser = new FrontendApplication("browser", FrontendApplicationArgs.builder()
                .projectId(example.id())
                .serviceNamespace("storefront")
                .environment("production")
                .build());
    
            ctx.export("browserWriteToken", browser.token());
        }
    }
    
    resources:
      example:
        type: logfire:Project
      browser:
        type: logfire:FrontendApplication
        properties:
          projectId: ${example.id}
          serviceNamespace: storefront
          environment: production
    outputs:
      browserWriteToken: ${browser.token}
    
    Example coming soon!
    

    Create FrontendApplication Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FrontendApplication(name: string, args: FrontendApplicationArgs, opts?: CustomResourceOptions);
    @overload
    def FrontendApplication(resource_name: str,
                            args: FrontendApplicationArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def FrontendApplication(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            project_id: Optional[str] = None,
                            adopt_existing_service_name: Optional[bool] = None,
                            environment: Optional[str] = None,
                            name: Optional[str] = None,
                            service_namespace: Optional[str] = None)
    func NewFrontendApplication(ctx *Context, name string, args FrontendApplicationArgs, opts ...ResourceOption) (*FrontendApplication, error)
    public FrontendApplication(string name, FrontendApplicationArgs args, CustomResourceOptions? opts = null)
    public FrontendApplication(String name, FrontendApplicationArgs args)
    public FrontendApplication(String name, FrontendApplicationArgs args, CustomResourceOptions options)
    
    type: logfire:FrontendApplication
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "logfire_frontend_application" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args FrontendApplicationArgs
    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 FrontendApplicationArgs
    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 FrontendApplicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FrontendApplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FrontendApplicationArgs
    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 frontendApplicationResource = new Logfire.FrontendApplication("frontendApplicationResource", new()
    {
        ProjectId = "string",
        AdoptExistingServiceName = false,
        Environment = "string",
        Name = "string",
        ServiceNamespace = "string",
    });
    
    example, err := logfire.NewFrontendApplication(ctx, "frontendApplicationResource", &logfire.FrontendApplicationArgs{
    	ProjectId:                pulumi.String("string"),
    	AdoptExistingServiceName: pulumi.Bool(false),
    	Environment:              pulumi.String("string"),
    	Name:                     pulumi.String("string"),
    	ServiceNamespace:         pulumi.String("string"),
    })
    
    resource "logfire_frontend_application" "frontendApplicationResource" {
      lifecycle {
        create_before_destroy = true
      }
      project_id                  = "string"
      adopt_existing_service_name = false
      environment                 = "string"
      name                        = "string"
      service_namespace           = "string"
    }
    
    var frontendApplicationResource = new FrontendApplication("frontendApplicationResource", FrontendApplicationArgs.builder()
        .projectId("string")
        .adoptExistingServiceName(false)
        .environment("string")
        .name("string")
        .serviceNamespace("string")
        .build());
    
    frontend_application_resource = logfire.FrontendApplication("frontendApplicationResource",
        project_id="string",
        adopt_existing_service_name=False,
        environment="string",
        name="string",
        service_namespace="string")
    
    const frontendApplicationResource = new logfire.FrontendApplication("frontendApplicationResource", {
        projectId: "string",
        adoptExistingServiceName: false,
        environment: "string",
        name: "string",
        serviceNamespace: "string",
    });
    
    type: logfire:FrontendApplication
    properties:
        adoptExistingServiceName: false
        environment: string
        name: string
        projectId: string
        serviceNamespace: string
    

    FrontendApplication 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 FrontendApplication resource accepts the following input properties:

    ProjectId string
    UUID of the project that owns the application.
    AdoptExistingServiceName bool
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    Environment string
    Immutable value used to overwrite deployment.environment.name when set.
    Name string
    Immutable application name. Logfire overwrites service.name with this value.
    ServiceNamespace string
    Immutable value used to overwrite service.namespace when set.
    ProjectId string
    UUID of the project that owns the application.
    AdoptExistingServiceName bool
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    Environment string
    Immutable value used to overwrite deployment.environment.name when set.
    Name string
    Immutable application name. Logfire overwrites service.name with this value.
    ServiceNamespace string
    Immutable value used to overwrite service.namespace when set.
    project_id string
    UUID of the project that owns the application.
    adopt_existing_service_name bool
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    environment string
    Immutable value used to overwrite deployment.environment.name when set.
    name string
    Immutable application name. Logfire overwrites service.name with this value.
    service_namespace string
    Immutable value used to overwrite service.namespace when set.
    projectId String
    UUID of the project that owns the application.
    adoptExistingServiceName Boolean
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    environment String
    Immutable value used to overwrite deployment.environment.name when set.
    name String
    Immutable application name. Logfire overwrites service.name with this value.
    serviceNamespace String
    Immutable value used to overwrite service.namespace when set.
    projectId string
    UUID of the project that owns the application.
    adoptExistingServiceName boolean
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    environment string
    Immutable value used to overwrite deployment.environment.name when set.
    name string
    Immutable application name. Logfire overwrites service.name with this value.
    serviceNamespace string
    Immutable value used to overwrite service.namespace when set.
    project_id str
    UUID of the project that owns the application.
    adopt_existing_service_name bool
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    environment str
    Immutable value used to overwrite deployment.environment.name when set.
    name str
    Immutable application name. Logfire overwrites service.name with this value.
    service_namespace str
    Immutable value used to overwrite service.namespace when set.
    projectId String
    UUID of the project that owns the application.
    adoptExistingServiceName Boolean
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    environment String
    Immutable value used to overwrite deployment.environment.name when set.
    name String
    Immutable application name. Logfire overwrites service.name with this value.
    serviceNamespace String
    Immutable value used to overwrite service.namespace when set.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FrontendApplication resource produces the following output properties:

    CreatedAt string
    Timestamp when the application was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    An active restricted browser token. The provider recovers this value on refresh and import.
    TokenId string
    Identifier of an active restricted browser token.
    CreatedAt string
    Timestamp when the application was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    An active restricted browser token. The provider recovers this value on refresh and import.
    TokenId string
    Identifier of an active restricted browser token.
    created_at string
    Timestamp when the application was created.
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    An active restricted browser token. The provider recovers this value on refresh and import.
    token_id string
    Identifier of an active restricted browser token.
    createdAt String
    Timestamp when the application was created.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    An active restricted browser token. The provider recovers this value on refresh and import.
    tokenId String
    Identifier of an active restricted browser token.
    createdAt string
    Timestamp when the application was created.
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    An active restricted browser token. The provider recovers this value on refresh and import.
    tokenId string
    Identifier of an active restricted browser token.
    created_at str
    Timestamp when the application was created.
    id str
    The provider-assigned unique ID for this managed resource.
    token str
    An active restricted browser token. The provider recovers this value on refresh and import.
    token_id str
    Identifier of an active restricted browser token.
    createdAt String
    Timestamp when the application was created.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    An active restricted browser token. The provider recovers this value on refresh and import.
    tokenId String
    Identifier of an active restricted browser token.

    Look up Existing FrontendApplication Resource

    Get an existing FrontendApplication 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?: FrontendApplicationState, opts?: CustomResourceOptions): FrontendApplication
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            adopt_existing_service_name: Optional[bool] = None,
            created_at: Optional[str] = None,
            environment: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            service_namespace: Optional[str] = None,
            token: Optional[str] = None,
            token_id: Optional[str] = None) -> FrontendApplication
    func GetFrontendApplication(ctx *Context, name string, id IDInput, state *FrontendApplicationState, opts ...ResourceOption) (*FrontendApplication, error)
    public static FrontendApplication Get(string name, Input<string> id, FrontendApplicationState? state, CustomResourceOptions? opts = null)
    public static FrontendApplication get(String name, Output<String> id, FrontendApplicationState state, CustomResourceOptions options)
    resources:  _:    type: logfire:FrontendApplication    get:      id: ${id}
    import {
      to = logfire_frontend_application.example
      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.
    The following state arguments are supported:
    AdoptExistingServiceName bool
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    CreatedAt string
    Timestamp when the application was created.
    Environment string
    Immutable value used to overwrite deployment.environment.name when set.
    Name string
    Immutable application name. Logfire overwrites service.name with this value.
    ProjectId string
    UUID of the project that owns the application.
    ServiceNamespace string
    Immutable value used to overwrite service.namespace when set.
    Token string
    An active restricted browser token. The provider recovers this value on refresh and import.
    TokenId string
    Identifier of an active restricted browser token.
    AdoptExistingServiceName bool
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    CreatedAt string
    Timestamp when the application was created.
    Environment string
    Immutable value used to overwrite deployment.environment.name when set.
    Name string
    Immutable application name. Logfire overwrites service.name with this value.
    ProjectId string
    UUID of the project that owns the application.
    ServiceNamespace string
    Immutable value used to overwrite service.namespace when set.
    Token string
    An active restricted browser token. The provider recovers this value on refresh and import.
    TokenId string
    Identifier of an active restricted browser token.
    adopt_existing_service_name bool
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    created_at string
    Timestamp when the application was created.
    environment string
    Immutable value used to overwrite deployment.environment.name when set.
    name string
    Immutable application name. Logfire overwrites service.name with this value.
    project_id string
    UUID of the project that owns the application.
    service_namespace string
    Immutable value used to overwrite service.namespace when set.
    token string
    An active restricted browser token. The provider recovers this value on refresh and import.
    token_id string
    Identifier of an active restricted browser token.
    adoptExistingServiceName Boolean
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    createdAt String
    Timestamp when the application was created.
    environment String
    Immutable value used to overwrite deployment.environment.name when set.
    name String
    Immutable application name. Logfire overwrites service.name with this value.
    projectId String
    UUID of the project that owns the application.
    serviceNamespace String
    Immutable value used to overwrite service.namespace when set.
    token String
    An active restricted browser token. The provider recovers this value on refresh and import.
    tokenId String
    Identifier of an active restricted browser token.
    adoptExistingServiceName boolean
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    createdAt string
    Timestamp when the application was created.
    environment string
    Immutable value used to overwrite deployment.environment.name when set.
    name string
    Immutable application name. Logfire overwrites service.name with this value.
    projectId string
    UUID of the project that owns the application.
    serviceNamespace string
    Immutable value used to overwrite service.namespace when set.
    token string
    An active restricted browser token. The provider recovers this value on refresh and import.
    tokenId string
    Identifier of an active restricted browser token.
    adopt_existing_service_name bool
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    created_at str
    Timestamp when the application was created.
    environment str
    Immutable value used to overwrite deployment.environment.name when set.
    name str
    Immutable application name. Logfire overwrites service.name with this value.
    project_id str
    UUID of the project that owns the application.
    service_namespace str
    Immutable value used to overwrite service.namespace when set.
    token str
    An active restricted browser token. The provider recovers this value on refresh and import.
    token_id str
    Identifier of an active restricted browser token.
    adoptExistingServiceName Boolean
    Allow creation when telemetry already reports under name. Set this before replacing service_namespace or environment without changing name.
    createdAt String
    Timestamp when the application was created.
    environment String
    Immutable value used to overwrite deployment.environment.name when set.
    name String
    Immutable application name. Logfire overwrites service.name with this value.
    projectId String
    UUID of the project that owns the application.
    serviceNamespace String
    Immutable value used to overwrite service.namespace when set.
    token String
    An active restricted browser token. The provider recovers this value on refresh and import.
    tokenId String
    Identifier of an active restricted browser token.

    Import

    The pulumi import command can be used, for example:

    $ pulumi import logfire:index/frontendApplication:FrontendApplication browser "project-id/application-id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    logfire pydantic/pulumi-logfire
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the logfire Terraform Provider.
    logfire logo
    Viewing docs for Logfire v0.1.21
    published on Wednesday, Sep 9, 2026 by Pydantic

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial