I'm certain this has been answered before but this...
# golang
I'm certain this has been answered before but this Slack instance only retains 90 days of history, but what is the magic combination to retrieve a
from an output? Getting this error:
Copy code
cannot convert vpce.VpcEndpoint.NetworkInterfaceIds (variable of type pulumi.StringArrayOutput) to type pulumi.StringArray
Yeah I’ve tried several incarnations of ApplyT and pulumi.ToStringArray, etc but still run into a similar result without being able to convert the output into something usable.
Basically whatever I try results in a similar message:
cannot use vpce.VpcEndpoint.ToVpcEndpointOutput().SubnetIds().ApplyT((func(ids []string) []string literal)) (value of type "<http://github.com/pulumi/pulumi/sdk/v3/go/internal|github.com/pulumi/pulumi/sdk/v3/go/internal>".Output) as pulumi.StringArray value in struct literal compiler (IncompatibleAssign)
What are you trying to pass this into that it expects a
? Resource properties should be typed as
, if you have a
there isn't any way to turn that into a plain
except for within the ApplyT call.
Thanks, @echoing-dinner-19531! I believe I have sorted out the issue this weekend and I’m using StringArrayInput. At least currently my LSP isn’t complaining. I’m building a bunch of component resources for internal use/self service. I’m going to instantiate a resource today and verify what I have implemented works as expected, but it sounds like what I landed on matches with your reply so that’s good.