-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Warehouse create and alter properties #598
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "snowflake_system_get_snowflake_platform_info Data Source - terraform-provider-snowflake" | ||
subcategory: "" | ||
description: |- | ||
|
||
--- | ||
|
||
# snowflake_system_get_snowflake_platform_info (Data Source) | ||
|
||
|
||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
|
||
### Read-Only | ||
|
||
- **aws_vpc_ids** (List of String) Snowflake AWS Virtual Private Cloud IDs | ||
- **azure_vnet_subnet_ids** (List of String) Snowflake Azure Virtual Network Subnet IDs | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,13 @@ import ( | |
) | ||
|
||
// warehouseCreateProperties are only available via the CREATE statement | ||
var warehouseCreateProperties = []string{"initially_suspended", "wait_for_provisioning", "statement_timeout_in_seconds"} | ||
var warehouseCreateProperties = []string{"initially_suspended", "wait_for_provisioning"} | ||
|
||
var warehouseProperties = []string{ | ||
"comment", "warehouse_size", "max_cluster_count", "min_cluster_count", | ||
"scaling_policy", "auto_suspend", "auto_resume", | ||
"resource_monitor", | ||
"resource_monitor", "max_concurrency_level", "statement_queued_timeout_in_seconds", | ||
"statement_timeout_in_seconds", | ||
} | ||
|
||
var warehouseSchema = map[string]*schema.Schema{ | ||
|
@@ -84,6 +85,7 @@ var warehouseSchema = map[string]*schema.Schema{ | |
Type: schema.TypeBool, | ||
Description: "Specifies whether the warehouse is created initially in the ‘Suspended’ state.", | ||
Optional: true, | ||
ForceNew: true, | ||
}, | ||
"resource_monitor": { | ||
Type: schema.TypeString, | ||
|
@@ -95,14 +97,26 @@ var warehouseSchema = map[string]*schema.Schema{ | |
Type: schema.TypeBool, | ||
Description: "Specifies whether the warehouse, after being resized, waits for all the servers to provision before executing any queued or new queries.", | ||
Optional: true, | ||
ForceNew: true, | ||
}, | ||
"statement_timeout_in_seconds": { | ||
Type: schema.TypeInt, | ||
Optional: true, | ||
Default: 0, | ||
ForceNew: false, | ||
Description: "Specifies the time, in seconds, after which a running SQL statement (query, DDL, DML, etc.) is canceled by the system", | ||
}, | ||
"statement_queued_timeout_in_seconds": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to add these to Read+Update There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe just Read actually |
||
Type: schema.TypeInt, | ||
Optional: true, | ||
Default: 0, | ||
Description: "Object parameter that specifies the time, in seconds, a SQL statement (query, DDL, DML, etc.) can be queued on a warehouse before it is canceled by the system.", | ||
}, | ||
"max_concurrency_level": { | ||
Type: schema.TypeInt, | ||
Optional: true, | ||
Default: 0, | ||
Description: "Object parameter that specifies the concurrency level for SQL statements (i.e. queries and DML) executed by a warehouse.", | ||
}, | ||
} | ||
|
||
// Warehouse returns a pointer to the resource representing a warehouse | ||
|
@@ -175,6 +189,18 @@ func ReadWarehouse(d *schema.ResourceData, meta interface{}) error { | |
if err != nil { | ||
return err | ||
} | ||
err = d.Set("statement_timeout_in_seconds", w.StatementTimeoutInSeconds) | ||
if err != nil { | ||
return err | ||
} | ||
err = d.Set("statement_queued_timeout_in_seconds", w.StatementQueuedTimeoutInSeconds) | ||
if err != nil { | ||
return err | ||
} | ||
err = d.Set("max_concurrency_level", w.MaxConcurrencyLevel) | ||
if err != nil { | ||
return err | ||
} | ||
err = d.Set("resource_monitor", w.ResourceMonitor) | ||
|
||
return err | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should probably ForceNew