https://pulumi.com logo
#general
Title
# general
s

strong-helmet-83704

09/28/2022, 5:44 AM
Could someone please explain the difference between calling pulumi.invokeOptions vs pulumi.resourceOptions on a given resource. They seem to be interchangeable but in some scenarios resourceOptions gives a merge exception. Iā€™m not sure where one should be used over the other? thanks in advance šŸ™
e

echoing-dinner-19531

09/28/2022, 7:11 AM
invokeOptions are for invokes, resourceOptions are for resources. We recently tightened up the Python runtime validation to error if the wrong one was passed in.
šŸ‘ 1
s

strong-helmet-83704

09/28/2022, 7:13 AM
So a get_() type function i presume is considered an invoke and a resource creation is a resource?
e

echoing-dinner-19531

09/28/2022, 7:18 AM
Some gets are "resource reads" which take resource options, but yes a lot of get and lookup calls are invokes. The type signuatures for these should say which one they take. e.g. LoadBalancer.get is a read which takes resource options, but get_load_balancer is an invoke that takes invoke options.
šŸ™Œ 1
āœ… 1
22 Views