or run

npx @tessl/cli init
Log in

Version

Files

docs

asset-management.mdautomation.mdconfiguration.mddynamic-resources.mdindex.mdlogging-diagnostics.mdoutput-system.mdprovider-development.mdresource-management.mdruntime-operations.mdstack-references.mdutilities.md
tile.json

task.mdevals/scenario-4/

Feature Flag Provider Server

Implement a lightweight provider server that exposes a single resource for managing feature flags, including schema bridging for multi-language use.

Capabilities

Serve provider schema

  • Starting the provider server returns a ready gRPC server and exposes a schema that declares a feature:index:Flag resource with inputs name (string, required, replace on change), enabled (boolean, default false), and optional description (string). @test

CRUD and diff handling

  • Creating a flag with name, enabled, and description returns the same values, generates an id prefixed with flag-, and persists state so a subsequent read returns the stored values. @test
  • Updating only description for an existing flag updates outputs without requiring replacement and preserves existing values. @test
  • Changing the name field triggers a replacement: the old flag is deleted and a new one is created with the new name while keeping other properties. @test

Parameterized provider behavior

  • Provider parameterization allows overriding the id prefix; when a custom prefix is provided, created resources use that prefix while still returning the declared schema and version. @test

Implementation

@generates

API

export interface FlagInputs {
  name: string;
  enabled?: boolean;
  description?: string;
  prefix?: string;
}

export interface FlagOutputs extends FlagInputs {
  id: string;
}

export interface ProviderServer {
  close(): Promise<void>;
}

export function startProviderServer(): Promise<ProviderServer>;

export function createInMemoryStore(): Map<string, FlagOutputs>;

Dependencies { .dependencies }

@pulumi/pulumi { .dependency }

Provides provider server and schema bridging runtime.