terraform-provider-snowflake icon indicating copy to clipboard operation
terraform-provider-snowflake copied to clipboard

[Bug]: The resource 'snowflake_warehouse' doesn't allow resource_constraint as a variable

Open scottl33 opened this issue 11 months ago • 3 comments

Terraform CLI Version

1.11.0

Terraform Provider Version

0.99.0

Company Name

OLO

Terraform Configuration

resource "snowflake_warehouse" "snowpark_wh" {
  name = "SNOWPARK_WAREHOUSE"

  warehouse_size = "xsmall"
  warehouse_type = "SNOWPARK-OPTIMIZED"
}

Category

category:resource

Object type(s)

resource:warehouse

Expected Behavior

Create a snowpark optimized warehouse as an XS

Actual Behavior

When creating a snowpark-optimized warehouse as an XS invalid property combination 'RESOURCE_CONSTRAINT'='MEMORY_16X' and 'WAREHOUSE_SIZE'='X-Small' The variable, 'RESOURCE_CONSTRAINT' is not defined in the provider. This makes it so user's have to select at least a medium instance and do not have control over allocating a larger resource constraint for larger warehouses.

Steps to Reproduce

resource "snowflake_warehouse" "snowpark_wh" { name = "SNOWPARK_WAREHOUSE"

warehouse_size = "xsmall" warehouse_type = "SNOWPARK-OPTIMIZED" }

How much impact is this issue causing?

Low

Logs

No response

Additional Information

The only workaround is to select at least a medium warehouse. I am currently testing what the behavior is with bigger warehouses.

Would you like to implement a fix?

  • [X] Yeah, I'll take it 😎

scottl33 avatar Dec 09 '24 20:12 scottl33

Hello @scottl33 👋 This was recently added to the warehouse object, so it's not in the warehouse resource yet. I see you checked the checkbox about implementing this feature yourself. Please read our contributing guidelines, and in case of any issues (or questions about the implementation), use this thread for communication. Thanks :)

sfc-gh-jcieslak avatar Dec 10 '24 07:12 sfc-gh-jcieslak

Hey,

Thanks for an ever improving module.

Currently we are managing all our Snowflake warehouses using Terraform. We would like to use RESOURCE_CONSTRAINT to change some of our warehouses to STANDARD_GEN_2.

Any news on when the module will support it?

louis-pie avatar May 19 '25 16:05 louis-pie

Hey, there is no official timeline yet, we will share the roadmap this week.

For the time being, you can use snowflake_execute to alter the warehouse.

sfc-gh-asawicki avatar May 19 '25 16:05 sfc-gh-asawicki

Checking in to see if there is any update on this variable.

SuperbTUM avatar Jul 18 '25 01:07 SuperbTUM

Hey @SuperbTUM, no. We will let you all know when we start the work (we should start it within the next 2 weeks).

sfc-gh-asawicki avatar Jul 18 '25 09:07 sfc-gh-asawicki

https://github.com/snowflakedb/terraform-provider-snowflake/pull/3880 -- drafted up something I got working personally if its at all useful 🙇🏼 its missing (currently) validations on resource_constraint for different warehouse_type

danielford831 avatar Jul 23 '25 15:07 danielford831

Hi all,

This feature is available in v2.7.0 (release notes, migration guide). Please check it out and provide us feedback, thanks!

sfc-gh-jmichalak avatar Sep 11 '25 15:09 sfc-gh-jmichalak

Closing due to inactivity.

sfc-gh-jmichalak avatar Oct 20 '25 13:10 sfc-gh-jmichalak