Skip to content

Commit 4c1a4e4

Browse files
authored
chore: Remove upper bound from provider version, bump snowflake-database-role version, documentation update (#30)
* chore: remove upper bound from provider version, to allow usage of new providers, add information about preview feature, bump database-role module * docs: provide better readme
1 parent e462a16 commit 4c1a4e4

File tree

5 files changed

+34
-12
lines changed

5 files changed

+34
-12
lines changed

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,29 @@ List od code and variable (API) changes:
105105

106106
## Breaking changes in v4.x of the module
107107

108-
Due to rename of Snowflake terraform provider source, all `versions.tf` files were updated accordingly.
108+
- Due to rename of Snowflake terraform provider source, all `versions.tf` files were updated accordingly.
109109

110-
Please keep in mind to mirror this change in your own repos also.
110+
Please keep in mind to mirror this change in your own repos also.
111111

112-
[Snowflake documentation](https://github.com/snowflakedb/terraform-provider-snowflake/blob/main/SNOWFLAKEDB_MIGRATION.md)
112+
For more information about provider rename, refer to [Snowflake documentation](https://github.com/snowflakedb/terraform-provider-snowflake/blob/main/SNOWFLAKEDB_MIGRATION.md).
113+
114+
- Maximal version of supported provider was also unblocked in version `v4.1.x` , so keep in mind that, starting with Snowflake provider version `1.x`, the `snowflake_stage` resource is considered a preview feature and must be explicitly enabled in the provider configuration.
115+
116+
**Required Provider Configuration:**
117+
118+
```terraform
119+
provider "snowflake" {
120+
preview_features_enabled = ["snowflake_stage_resource"]
121+
}
122+
```
123+
124+
Without this configuration, you will encounter the following error:
125+
126+
```shell
127+
Error: snowflake_stage_resource is currently a preview feature, and must be enabled by adding snowflake_stage_resource to preview_features_enabled in Terraform configuration.
128+
```
129+
130+
For more information about preview features, refer to the [Snowflake provider documentation](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/stage#preview-features) and [Snowflake stage resource documentation](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/stage).
113131

114132
<!-- BEGIN_TF_DOCS -->
115133

@@ -144,8 +162,8 @@ Please keep in mind to mirror this change in your own repos also.
144162
| Name | Source | Version |
145163
|------|--------|---------|
146164
| <a name="module_roles_deep_merge"></a> [roles\_deep\_merge](#module\_roles\_deep\_merge) | Invicton-Labs/deepmerge/null | 0.1.5 |
147-
| <a name="module_snowflake_custom_role"></a> [snowflake\_custom\_role](#module\_snowflake\_custom\_role) | getindata/database-role/snowflake | 2.1.0 |
148-
| <a name="module_snowflake_default_role"></a> [snowflake\_default\_role](#module\_snowflake\_default\_role) | getindata/database-role/snowflake | 2.1.0 |
165+
| <a name="module_snowflake_custom_role"></a> [snowflake\_custom\_role](#module\_snowflake\_custom\_role) | getindata/database-role/snowflake | 3.0.0 |
166+
| <a name="module_snowflake_default_role"></a> [snowflake\_default\_role](#module\_snowflake\_default\_role) | getindata/database-role/snowflake | 3.0.0 |
149167

150168
## Outputs
151169

@@ -160,15 +178,15 @@ Please keep in mind to mirror this change in your own repos also.
160178
| Name | Version |
161179
|------|---------|
162180
| <a name="provider_context"></a> [context](#provider\_context) | >=0.4.0 |
163-
| <a name="provider_snowflake"></a> [snowflake](#provider\_snowflake) | ~> 0.95 |
181+
| <a name="provider_snowflake"></a> [snowflake](#provider\_snowflake) | >= 0.95 |
164182

165183
## Requirements
166184

167185
| Name | Version |
168186
|------|---------|
169187
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
170188
| <a name="requirement_context"></a> [context](#requirement\_context) | >=0.4.0 |
171-
| <a name="requirement_snowflake"></a> [snowflake](#requirement\_snowflake) | ~> 0.95 |
189+
| <a name="requirement_snowflake"></a> [snowflake](#requirement\_snowflake) | >= 0.95 |
172190

173191
## Resources
174192

examples/complete/providers.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
provider "snowflake" {}
1+
provider "snowflake" {
2+
preview_features_enabled = ["snowflake_stage_resource"]
3+
}
24

35
provider "context" {
46
properties = {

examples/simple/providers.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
provider "snowflake" {}
1+
provider "snowflake" {
2+
preview_features_enabled = ["snowflake_stage_resource"]
3+
}

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module "snowflake_default_role" {
4747
for_each = local.default_roles
4848

4949
source = "getindata/database-role/snowflake"
50-
version = "2.1.0"
50+
version = "3.0.0"
5151

5252
database_name = snowflake_stage.this.database
5353
context_templates = var.context_templates
@@ -82,7 +82,7 @@ module "snowflake_custom_role" {
8282
for_each = local.custom_roles
8383

8484
source = "getindata/database-role/snowflake"
85-
version = "2.1.0"
85+
version = "3.0.0"
8686

8787
database_name = snowflake_stage.this.database
8888
context_templates = var.context_templates

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
snowflake = {
55
source = "snowflakedb/snowflake"
6-
version = "~> 0.95"
6+
version = ">= 0.95"
77
}
88
context = {
99
source = "cloudposse/context"

0 commit comments

Comments
 (0)