I'm having an issue when trying to pass an output ...
# yaml
m
I'm having an issue when trying to pass an output to an intrinsic function
Copy code
the argument to Fn::ToBase64 must be a string; the argument to Fn::ToBase64 must be a string
the variables section is:
Copy code
variables:
  kubeconfigs:
    Fn::Invoke:
      Function: azure-native:containerservice:listManagedClusterUserCredentials
      Arguments:
        resourceGroupName: ${rg.name}
        resourceName: ${cluster-1.name}
  kubeconfigb64:
    Fn::ToBase64: ${kubeconfigs.kubeconfigs[0].value}
the outputs section is as such
Copy code
outputs:
  kconfig: ${kubeconfigs.kubeconfigs[0].value}
the output is:
Copy code
Outputs:
  + kconfig: "YXBpVmVyc2lv................................................."
o
Meant to post internally? 🙂
Looks like an issue with ToBase64 being overly strict. I'll make a PR
👍 1
m
wanted to post it here just in case it helps a community member
o
we had unit tests to allow it to take an expression, but the tests used the abstract syntax tree and not the parser 😕 https://github.com/pulumi/pulumi-yaml/pull/221