great-sunset-35510/18/2021, 12:48 PM
which is not a good practice in python and one should use custom exceptions, so at least raising
or something would be great. https://github.com/pulumi/pulumi/blob/master/sdk/python/lib/pulumi/runtime/invoke.py#L121 @red-match-15116 Is there any chance that there is an existing issue about this? (I could not find any) I bumped into this trying to get an existing RDS instance when I found out that the
AWS provider differentiates between 2 types and I'm only interested in arguments that they have in common.
AWS SDK in this case raises
try: db = rds.get_cluster( cluster_identifier=db_params.apply(lambda x: x["db"]["identifier"]), opts=pulumi.InvokeOptions(provider=ec1_provider), ) except Exception as exc: print(type(exc)) db = rds.get_instance( db_instance_identifier=db_params.apply(lambda x: x["db"]["identifier"]), opts=pulumi.InvokeOptions(provider=ec1_provider), )
but I guess that
is not smart enough to raise this exception.
red-match-1511610/18/2021, 4:10 PM