You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Support setting storage_aws_external_id in storage integration resource (#3659)
## Summary
This PR adds support for specifying the `storage_aws_external_id` field
when creating and updating a Snowflake storage integration resource.
Previously, the field was treated as `Computed` and could not be
explicitly set via Terraform, which caused issues in scenarios involving
AWS IAM role trust relationships requiring a fixed external ID.
## What was changed
- Updated the Create and Alter function in sdk to pass the value to the
Snowflake API if specified.
- Changed `storage_aws_external_id` attribute to be `Optional`.
- Added acceptance test to verify the behavior.
- Updated doc of storage integration.
- Add clarification of missing support for Git API integrations.
## Test Plan
* [x] integration tests for storage integration
* [ ] acceptance tests for storage integration
## References
-
#2624
---------
Co-authored-by: Jakub Michalak <[email protected]>
Copy file name to clipboardExpand all lines: MIGRATION_GUIDE.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,14 @@ for changes required after enabling given [Snowflake BCR Bundle](https://docs.sn
21
21
> [!TIP]
22
22
> If you're still using the `Snowflake-Labs/snowflake` source, see [Upgrading from Snowflake-Labs Provider](./SNOWFLAKEDB_MIGRATION.md) to upgrade to the snowflakedb namespace.
23
23
24
+
## v2.4.x ➞ v2.5.0
25
+
26
+
### *(new feature)* Added `storage_aws_external_id` field in the `storage_integration` resource
27
+
28
+
Previously, this field was read-only. In this version, this field is an optional configurable attribute. Additionally, we added a new `describe_output` field to handle this field properly (read more in our [design considerations](v1-preparations/CHANGES_BEFORE_V1.md#default-values)). Note that fields other than `storage_aws_external_id` do not leverage this field. This will be addressed during the resource rework.
29
+
30
+
Note that this resource is still in preview, and not officially supported. This change was requested and done by the community: [#3659](https://github.com/snowflakedb/terraform-provider-snowflake/pull/3659).
Copy file name to clipboardExpand all lines: docs/resources/api_integration.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ description: |-
7
7
8
8
!> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled` field in the [provider configuration](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs#schema). Please always refer to the [Getting Help](https://github.com/snowflakedb/terraform-provider-snowflake?tab=readme-ov-file#getting-help) section in our Github repo to best determine how to get help for your questions.
9
9
10
+
-> **Note** Currently, API integrations for `git_https_api` API provider are not supported. It will be added in the future.
Copy file name to clipboardExpand all lines: docs/resources/storage_integration.md
+167-2Lines changed: 167 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ description: |-
7
7
8
8
!> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled` field in the [provider configuration](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs#schema). Please always refer to the [Getting Help](https://github.com/snowflakedb/terraform-provider-snowflake?tab=readme-ov-file#getting-help) section in our Github repo to best determine how to get help for your questions.
9
9
10
+
-> **Note** Currently, `describe_output` field is not used in all the relevant fields (only `storage_aws_external_id` is supported). This will be addressed during the resource rework.
-`storage_aws_external_id` (String) The external ID that Snowflake will use when assuming the AWS role.
56
59
-`storage_aws_object_acl` (String) "bucket-owner-full-control" Enables support for AWS access control lists (ACLs) to grant the bucket owner full control.
57
60
-`storage_aws_role_arn` (String) (Default: ``)
58
61
-`storage_blocked_locations` (List of String) Explicitly prohibits external stages that use the integration from referencing one or more storage locations.
-`azure_consent_url` (String, Sensitive) The consent URL that is used to create an Azure Snowflake service principle inside your tenant.
65
68
-`azure_multi_tenant_app_name` (String) This is the name of the Snowflake client application created for your account.
66
69
-`created_on` (String) Date and time when the storage integration was created.
70
+
-`describe_output` (List of Object) Outputs the result of `DESCRIBE STORAGE INTEGRATION` for the given storage integration. (see [below for nested schema](#nestedatt--describe_output))
67
71
-`fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
68
72
-`id` (String) The ID of this resource.
69
-
-`storage_aws_external_id` (String) The external ID that Snowflake will use when assuming the AWS role.
70
73
-`storage_aws_iam_user_arn` (String) The Snowflake user that will attempt to assume the AWS role.
71
74
-`storage_gcp_service_account` (String) This is the name of the Snowflake Google Service Account created for your account.
72
75
@@ -80,6 +83,168 @@ Optional:
80
83
-`read` (String)
81
84
-`update` (String)
82
85
86
+
87
+
<aid="nestedatt--describe_output"></a>
88
+
### Nested Schema for `describe_output`
89
+
90
+
Read-Only:
91
+
92
+
-`azure_consent_url` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--azure_consent_url))
93
+
-`azure_multi_tenant_app_name` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--azure_multi_tenant_app_name))
94
+
-`comment` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--comment))
95
+
-`enabled` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--enabled))
96
+
-`storage_allowed_locations` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--storage_allowed_locations))
97
+
-`storage_aws_external_id` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--storage_aws_external_id))
98
+
-`storage_aws_iam_user_arn` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--storage_aws_iam_user_arn))
99
+
-`storage_aws_object_acl` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--storage_aws_object_acl))
100
+
-`storage_aws_role_arn` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--storage_aws_role_arn))
101
+
-`storage_blocked_locations` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--storage_blocked_locations))
102
+
-`storage_gcp_service_account` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--storage_gcp_service_account))
103
+
-`storage_provider` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--storage_provider))
104
+
-`use_privatelink_endpoint` (List of Object) (see [below for nested schema](#nestedobjatt--describe_output--use_privatelink_endpoint))
0 commit comments