pulumi / pulumi-pulumiservice

https://pulumi.com
Apache License 2.0
13 stars 7 forks source link

Fix panic when environment uses computed values #414

Closed seanyeh closed 2 months ago

seanyeh commented 2 months ago

Fixes https://github.com/pulumi/pulumi-pulumiservice/issues/411

This is related to https://github.com/pulumi/pulumi-pulumiservice/pull/399

Example repro program:

import * as pulumi from "@pulumi/pulumi";
import * as service from "@pulumi/pulumiservice";
import * as aws from "@pulumi/aws";

const org = "big-org";
const bucket = new aws.s3.Bucket("myBucket", {
    bucket: "syeh-panic-test",
    acl: "private",
});

const envDef = pulumi.interpolate`values:
  myKey1: "${bucket.arn}"`;
const envAsset = envDef.apply(x => new pulumi.asset.StringAsset(x));

const environment = new service.Environment("panic", {
  organization: org,
  project: "abc",
  name: "panic",
  yaml: envAsset,
})