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

Region Data Lookup Helper

Build a helper that combines two provider data-source lookups to produce deployment planning data for a single region.

Capabilities

Fetch availability zones for a region

  • Given a region string and a data-source token for zones, query the provider to list all availability zone names for that region and return them sorted alphabetically. @test

Resolve machine image for OS and architecture

  • Using a data-source token for image search along with OS and architecture filters, query the provider and return the selected image identifier. @test

Shared call options

  • Accept optional call options (provider reference, parent, plugin version) and apply them consistently to both data-source calls. @test

Combined result

  • Produce a single result object that includes the region, zones, selected image id, and the tokens used for each lookup. @test

Implementation

@generates

API

export interface InvokeTokenArgs {
  region: string;
  os: "ubuntu" | "debian";
  arch: "x86_64" | "arm64";
  zoneDataSourceToken: string;
  imageDataSourceToken: string;
  options?: InvokeOptionsInput;
}

export interface InvokeOptionsInput {
  provider?: any;
  parent?: any;
  version?: string;
}

export interface RegionLookupResult {
  region: string;
  zones: string[];
  imageId: string;
  sources: {
    zones: string;
    image: string;
  };
}

export function fetchRegionLookup(args: InvokeTokenArgs): Promise<RegionLookupResult>;

Dependencies { .dependencies }

@pulumi/pulumi { .dependency }

Provides infrastructure runtime and provider data-source invocation support.