pulumi / pulumi-yaml

YAML language provider for Pulumi
Apache License 2.0
39 stars 12 forks source link

StackReference outputs are incorrectly typed as string instead of any #599

Closed AaronFriel closed 3 months ago

AaronFriel commented 3 months ago

Suppose we have the following program, assuming that the stack reference's subnets property is an array of strings:

resources:
  vpc:
    options: {}
    properties:
      name: some/vpc/stack
    type: pulumi:pulumi:StackReference
  eksCluster:
    properties:
      vpcConfig:
        subnetIds: ${vpc.outputs.subnets}

This program should succeed, as the vpcConfig.subnetIds input accepts an array of strings - however instead users will encounter an error in the analysis phase of running this program:

vpcConfig: Cannot assign '{subnetIds: string}' to 'aws:eks/ClusterVpcConfig:ClusterVpcConfig':
        subnetIds: Cannot assign type 'string' to type 'List<string>'