The first one is known at preview phase, it gives you the name you have set, it might not be the same value as during deployment time, but there is a value there.
The second one is not, you need all the metadata to have it passed to the apply function, so it is only available during deployment.
This seems correct to me
s
steep-angle-29984
09/11/2020, 8:29 AM
Thanks, I didn't know that.
To be clear, the first one will be called during preview with the value which is set on resource instantiation and if it isn't set, as in my case, it will still be called in preview but with 'undefined'?
g
green-school-95910
09/11/2020, 12:04 PM
Yeah, during preview if the resource is new the values that have a matching input may be called with the input value, which may be undefined
green-school-95910
09/11/2020, 12:08 PM
That is my interpretation. I have not looked into the code for the kubernetes plugin to check if this what it actually does. I know that gcp plugin does that for some similar cases