sparse-intern-71089
03/16/2022, 10:47 PMstocky-restaurant-98004
03/17/2022, 3:38 PMapply
to use a regular string to create the pulumi.StringMap
. Here's a sorta-similar example of using the ARN of a secret to formulate an IAM policy doc.
There may be a better way, but I think this will get you un-stuck: https://github.com/pulumi/github-issue-automation/blob/main/pulumi/main.go#L108-L139bright-needle-80161
03/17/2022, 4:06 PMdata
parameter. https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/go/kubernetes/core/v1/secret.go#L31bright-needle-80161
03/17/2022, 4:07 PMarn:aws:secretsmanager:us-east-1:678129227502:secret:pulumisecret-7s7QC6
bright-needle-80161
03/17/2022, 4:08 PMbright-needle-80161
03/17/2022, 4:23 PMbright-needle-80161
03/17/2022, 6:10 PMdata := secretData.ApplyT(func(v pulumi.Map) string {
return fmt.Sprintf("%v", v)
}).(pulumi.MapOutput)
// Create new kubernetes secretes object
corev1.NewSecret(ctx, "pulumi-secret", &corev1.SecretArgs{
StringData: data,
Metadata: &metav1.ObjectMetaArgs{
Namespace: namespace.Metadata.Elem().Name(),
Labels: appLabels,
},
})
bright-needle-80161
03/17/2022, 6:12 PMDiagnostics:
pulumi:pulumi:Stack (kubernetes-ccmx/kubernetes/dev):
# kubernetes
./main.go:108:22: cannot use fmt.Sprintf("%v", v) (type string) as type pulumi.StringMapOutput in return argument
./main.go:112:4: cannot use data (type pulumi.Output) as type pulumi.StringMapInput in field value:
pulumi.Output does not implement pulumi.StringMapInput (missing ToStringMapOutput method)
error: an unhandled error occurred: program exited with non-zero exit code: 2