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

great-receptionist-19570

06/01/2023, 9:56 PM
Hi I had a question about creating a Snowflake python UDF with Pulumi. I am getting this error with my resource definition:
Copy code
SQL compilation error: An active warehouse is required for creating Python UDFs
but I don’t see where a warehouse can be specified in the Snowflake Function code:
Copy code
class Function(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 arguments: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['FunctionArgumentArgs']]]]] = None,
                 comment: Optional[pulumi.Input[str]] = None,
                 database: Optional[pulumi.Input[str]] = None,
                 handler: Optional[pulumi.Input[str]] = None,
                 imports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 language: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 null_input_behavior: Optional[pulumi.Input[str]] = None,
                 packages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 return_behavior: Optional[pulumi.Input[str]] = None,
                 return_type: Optional[pulumi.Input[str]] = None,
                 runtime_version: Optional[pulumi.Input[str]] = None,
                 schema: Optional[pulumi.Input[str]] = None,
                 statement: Optional[pulumi.Input[str]] = None,
                 target_path: Optional[pulumi.Input[str]] = None,
                 __props__=None):
how can I set a warehouse for this case?
I’ll answer my own question. In this case the IaC deploy was failing on our test account which had a user associated that had no default warehouse. Easy fix.