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-6/

Workspace Lifecycle Exercise

Design a small infrastructure module that provisions resources for a batch workspace while honoring lifecycle rules.

Capabilities

Component-scoped resources

  • All created resources are children of a single grouping construct so they share a stable URN prefix and consolidated outputs @test

Controlled runner order

  • The compute runner is provisioned only after the state store is created, even when no properties from the state store are used directly @test

Preserve state when requested

  • When preserveState is true, destroying the stack leaves the state store intact and avoids replacement on updates that only touch the runner @test

Adopt existing state

  • When adoptExistingStateId is provided, the state store is treated as an existing resource with that identifier instead of creating a new one @test

Implementation

@generates

API

export interface WorkspaceArgs {
  serviceName: string;
  preserveState?: boolean;
  adoptExistingStateId?: string;
}

export interface WorkspaceResult {
  stateLocation: unknown;
  runnerName: unknown;
}

export function createWorkspace(name: string, args: WorkspaceArgs): WorkspaceResult;

Dependencies { .dependencies }

@pulumi/pulumi { .dependency }

Provides the infrastructure as code runtime and resource lifecycle controls.