CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-pulumi--pulumi

Pulumi's Node.js SDK for infrastructure-as-code platform that allows you to create, deploy, and manage infrastructure using familiar programming languages and tools.

85

1.02x
Overview
Eval results
Files

task.mdevals/scenario-5/

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.

Install with Tessl CLI

npx tessl i tessl/npm-pulumi--pulumi

tile.json