bitter-dentist-28132
08/12/2019, 7:35 PMOutput<string>
is not an Input<string>
error.white-balloon-205
I'm getting anThat would be surprising - anis not anOutput<string>
error.Input<string>
Output
is definitely a legal value of an Input
. Do you have the error message?
is there a way to use a kubernetes service's load balancer ip for creating a dns recordDefinitely should be possible. Something like https://github.com/pulumi/examples/blob/master/aws-ts-eks-hello-world/index.ts#L85 passed into the
A
record resource should work.bitter-dentist-28132
08/12/2019, 7:44 PMType 'Output<string> | undefined' is not assignable to type 'Input<string>'
and it's triggering on the line for the value
of the digitalocean.DnsRecord
resourceServiceDeployment
class from https://github.com/pulumi/examples/blob/master/kubernetes-ts-guestbook/components/k8sjs.ts to fit my need, but i'm using the same ipAddress
output to provide the DnsRecord
white-balloon-205
| undefined
. That is telling you that the value may not be available, so you either need to write an if (something.ip) { ... }
and handle the case it is unavailable, or else use something.ip!
in TypeScript to ignore the possibility it is undefined if you are really sure it will not be undefined
in practice for you use-case.bitter-dentist-28132
08/12/2019, 7:52 PMif
. right now, i'm just doing a check on the ingress hostname, and if it's part of our DO domain, then add the records. when it's not part of that DO domain, then it's probably an internal/testing cluster where there's wildcard DNS set up.
do you think there is a better way to handle that? if i gate to something.ip
will typescript know it can't be undefined? i'm not very well-versed in typescriptwhite-balloon-205
| undefined
from the observed type. It's generally very good at this - and this type check actually frequently catches real bugs.