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

Cross-stack environment wiring

A small infrastructure helper that assembles service settings by reading outputs from other stacks. The focus is on retrieving network, database, and monitoring values while preserving secret data coming from remote stacks.

Capabilities

Network outputs

  • Given a network stack name, read the VPC identifier and private subnet IDs from that stack; throw an error if the VPC identifier is missing. @test

Database credentials

  • Given a database stack name, read the database endpoint hostname and password output; the password stays secret when returned. @test

Monitoring linkage

  • When a monitoring stack name is provided, read a monitoring URL from that stack; when omitted, the monitoring URL is undefined. @test

Combined configuration

  • Return a configuration object combining network, database, and optional monitoring values for downstream resource definitions. @test

Implementation

@generates

API

export interface StackNames {
  network: string;
  database: string;
  monitoring?: string;
}

export type InfraValue<T> = T | PromiseLike<T>;

export interface CrossStackConfig {
  vpcId: InfraValue<string>;
  privateSubnetIds: InfraValue<string[]>;
  databaseEndpoint: InfraValue<string>;
  databasePassword: InfraValue<string>;
  monitoringUrl?: InfraValue<string>;
}

export function buildCrossStackConfig(names: StackNames): CrossStackConfig;

Dependencies { .dependencies }

@pulumi/pulumi { .dependency }

Provides cross-stack data access and secret propagation.