We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@EvanBoyle wrote this in slack, and I think it'd be useful to put here somewhere:
package main import ( "github.com/pulumi/pulumi/sdk/v2/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { ref, err := pulumi.NewStackReference(ctx, "EvanBoyle/ref1/dev", nil) if err != nil { return err } strarr := ref.GetOutput(pulumi.String("ref")).ApplyStringArray(func(out interface{}) []string { var res []string if out != nil { for _, v := range out.([]interface{}) { res = append(res, v.(string)) } } return res }) idx0 := strarr.ApplyString(func(a []string) string { var res string if len(a) > 0 { res = a[0] } return res }) ctx.Export("idx0", idx0) return nil }) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@EvanBoyle wrote this in slack, and I think it'd be useful to put here somewhere:
The text was updated successfully, but these errors were encountered: