billowy-horse-79629
03/20/2022, 6:46 PMgetIssuerCAThumbprint()
function on ts, and i’m using a native https.Agent, and an Output<>
as the issueUrl
.
For some reason when i’m trying to preview
it’s waiting the cert to be fetched instead of skipping it (as output functions should work), and i’m getting this error (on the image).
Any help please ? Thanks guys.echoing-dinner-19531
03/20/2022, 7:04 PM(as output functions should work)Not quite. Output functions might not run at preview time, it depends on if the inputs to the function can be known or not.
billowy-horse-79629
03/20/2022, 8:30 PMechoing-dinner-19531
03/20/2022, 9:10 PMI thought that if the function gets an output variable the function won't run on preview.No we try to run as much as we can at preview, outputs are used to indicate that we might not be able to run it at preview time and so it will stay unknown. If you have something that you don't want to run at preview time you can use
runtime.isDryRun()
billowy-horse-79629
03/21/2022, 7:47 AMechoing-dinner-19531
03/21/2022, 9:37 AMbillowy-horse-79629
03/21/2022, 9:38 AMundefined
.
Am I doing something wrong ?echoing-dinner-19531
03/21/2022, 9:42 AMnew Resource
). Currently our method of making these "update-only" operations is to use a resource provider. But that is a bit heavy handed for just a helper method doing a http call.
When i’m previewing this dependency, the preview fails as the output apply result isWhat output is this? It might be that its value really is.undefined
undefined
or it might be the unknown value tracking has a bug here.billowy-horse-79629
03/21/2022, 9:42 AMechoing-dinner-19531
03/21/2022, 9:43 AMissuer
is a string why are you trying to [0]
index it?apply
does.x.apply(y => y
is a no-op. Its exactly the same as just x
.billowy-horse-79629
03/21/2022, 9:54 AMechoing-dinner-19531
03/21/2022, 10:03 AMOutput<T>
a bit like a promise, it might have a value in it but you can't directly see that. Instead for a promise you use then
to chain them together and the runtume calls each then
method as the promise resolves. Outputs
are similar but we use apply
and we also support the concept of "unknown at preview time" where if an output is unknown because its coming from a resource operation that we won't run at preview time (like actually creating a cloud resource) then we don't run the apply function and just resolve the next part of the output chain to "unknown" as well.billowy-horse-79629
03/21/2022, 10:18 AM.replace
function on the issuer output, and for some reason I get :
Calling [toString] on an [Output<T>] is not supported.
To get the value of an Output<T> as an Output<string> consider either:
1: o.apply(v => `prefix${v}suffix`)
2: pulumi.interpolate `prefix${v}suffix`
echoing-dinner-19531
03/21/2022, 10:28 AMbillowy-horse-79629
03/21/2022, 10:40 AMechoing-dinner-19531
03/21/2022, 10:50 AMall
and apply
to take all those outputs and use them inside one apply to return the PolicyDocumentbillowy-horse-79629
03/21/2022, 1:02 PMapply
, but now I want to return this Role, which I can’t because now externalDnsRole
is an output.echoing-dinner-19531
03/21/2022, 1:22 PMInput<PolicyDocument>
. And an Output<T>
is an Input<T>
so it's fine to make the policy document inside an apply. In fact PolicyDocument.Statement
is an input as are the args for a PolicyStatement.
billowy-horse-79629
03/21/2022, 9:48 PMechoing-dinner-19531
03/21/2022, 10:02 PM