forked from Snowflake-Labs/terraform-provider-snowflake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from chanzuckerberg/main
merge
- Loading branch information
Showing
39 changed files
with
2,356 additions
and
35 deletions.
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.23.2 | ||
0.25.0 |
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,57 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "snowflake_api_integration Resource - terraform-provider-snowflake" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# snowflake_api_integration (Resource) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "snowflake_api_integration" "api_integration" { | ||
name = "aws_integration" | ||
api_provider = "aws_api_gateway" | ||
api_aws_role_arn = "arn:aws:iam::000000000001:/role/test" | ||
api_allowed_prefixes = ["https://123456.execute-api.us-west-2.amazonaws.com/prod/"] | ||
enabled = true | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **api_allowed_prefixes** (List of String) Explicitly limits external functions that use the integration to reference one or more HTTPS proxy service endpoints and resources within those proxies. | ||
- **api_provider** (String) Specifies the HTTPS proxy service type. | ||
- **name** (String) Specifies the name of the API integration. This name follows the rules for Object Identifiers. The name should be unique among api integrations in your account. | ||
|
||
### Optional | ||
|
||
- **api_aws_role_arn** (String) ARN of a cloud platform role. | ||
- **api_blocked_prefixes** (List of String) Lists the endpoints and resources in the HTTPS proxy service that are not allowed to be called from Snowflake. | ||
- **azure_ad_application_id** (String) The 'Application (client) id' of the Azure AD app for your remote service. | ||
- **azure_tenant_id** (String) Specifies the ID for your Office 365 tenant that all Azure API Management instances belong to. | ||
- **enabled** (Boolean) Specifies whether this API integration is enabled or disabled. If the API integration is disabled, any external function that relies on it will not work. | ||
- **id** (String) The ID of this resource. | ||
|
||
### Read-Only | ||
|
||
- **api_aws_external_id** (String) The external ID that Snowflake will use when assuming the AWS role. | ||
- **api_aws_iam_user_arn** (String) The Snowflake user that will attempt to assume the AWS role. | ||
- **azure_consent_url** (String) | ||
- **azure_multi_tenant_app_name** (String) | ||
- **created_on** (String) Date and time when the API integration was created. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import snowflake_api_integration.example name | ||
``` |
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,88 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "snowflake_external_function Resource - terraform-provider-snowflake" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# snowflake_external_function (Resource) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "snowflake_external_function" "test_ext_func" { | ||
name = "my_function" | ||
database = "my_test_db" | ||
schema = "my_test_schema" | ||
arg { | ||
name = "arg1" | ||
type = "varchar" | ||
} | ||
arg { | ||
name = "arg2" | ||
type = "varchar" | ||
} | ||
return_type = "varchar" | ||
return_behavior = "IMMUTABLE" | ||
api_integration = "api_integration_name" | ||
url_of_proxy_and_resource = "https://123456.execute-api.us-west-2.amazonaws.com/prod/test_func" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **api_integration** (String) The name of the API integration object that should be used to authenticate the call to the proxy service. | ||
- **database** (String) The database in which to create the external function. | ||
- **name** (String) Specifies the identifier for the external function. The identifier can contain the schema name and database name, as well as the function name. The function's signature (name and argument data types) must be unique within the schema. | ||
- **return_behavior** (String) Specifies the behavior of the function when returning results | ||
- **return_type** (String) Specifies the data type returned by the external function. | ||
- **schema** (String) The schema in which to create the external function. | ||
- **url_of_proxy_and_resource** (String) This is the invocation URL of the proxy service and resource through which Snowflake calls the remote service. | ||
|
||
### Optional | ||
|
||
- **arg** (Block List) Specifies the arguments/inputs for the external function. These should correspond to the arguments that the remote service expects. (see [below for nested schema](#nestedblock--arg)) | ||
- **comment** (String) A description of the external function. | ||
- **compression** (String) If specified, the JSON payload is compressed when sent from Snowflake to the proxy service, and when sent back from the proxy service to Snowflake. | ||
- **context_headers** (List of String) Binds Snowflake context function results to HTTP headers. | ||
- **header** (Block List) Allows users to specify key-value metadata that is sent with every request as HTTP headers. (see [below for nested schema](#nestedblock--header)) | ||
- **id** (String) The ID of this resource. | ||
- **max_batch_rows** (Number) This specifies the maximum number of rows in each batch sent to the proxy service. | ||
- **null_input_behavior** (String) Specifies the behavior of the external function when called with null inputs. | ||
- **return_null_allowed** (Boolean) Indicates whether the function can return NULL values or must return only NON-NULL values. | ||
|
||
### Read-Only | ||
|
||
- **created_on** (String) Date and time when the external function was created. | ||
|
||
<a id="nestedblock--arg"></a> | ||
### Nested Schema for `arg` | ||
|
||
Required: | ||
|
||
- **name** (String) Argument name | ||
- **type** (String) Argument type, e.g. VARCHAR | ||
|
||
|
||
<a id="nestedblock--header"></a> | ||
### Nested Schema for `header` | ||
|
||
Required: | ||
|
||
- **name** (String) Header name | ||
- **value** (String) Header value | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# format is database name | schema name | external function name | <list of function arg types, separated with '-'> | ||
terraform import snowflake_external_function.example 'dbName|schemaName|externalFunctionName|varchar-varchar-varchar' | ||
``` |
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,31 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "snowflake_masking_policy_grant Resource - terraform-provider-snowflake" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# snowflake_masking_policy_grant (Resource) | ||
|
||
|
||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **database_name** (String) The name of the database containing the masking policy on which to grant privileges. | ||
- **masking_policy_name** (String) The name of the masking policy on which to grant privileges immediately. | ||
- **schema_name** (String) The name of the schema containing the masking policy on which to grant privileges. | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
- **privilege** (String) The privilege to grant on the masking policy. | ||
- **roles** (Set of String) Grants privilege to these roles. | ||
- **with_grant_option** (Boolean) When this is set to true, allows the recipient role to grant the privileges to other roles. | ||
|
||
|
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
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 @@ | ||
terraform import snowflake_api_integration.example name |
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,7 @@ | ||
resource "snowflake_api_integration" "api_integration" { | ||
name = "aws_integration" | ||
api_provider = "aws_api_gateway" | ||
api_aws_role_arn = "arn:aws:iam::000000000001:/role/test" | ||
api_allowed_prefixes = ["https://123456.execute-api.us-west-2.amazonaws.com/prod/"] | ||
enabled = true | ||
} |
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,2 @@ | ||
# format is database name | schema name | external function name | <list of function arg types, separated with '-'> | ||
terraform import snowflake_external_function.example 'dbName|schemaName|externalFunctionName|varchar-varchar-varchar' |
17 changes: 17 additions & 0 deletions
17
examples/resources/snowflake_external_function/resource.tf
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,17 @@ | ||
resource "snowflake_external_function" "test_ext_func" { | ||
name = "my_function" | ||
database = "my_test_db" | ||
schema = "my_test_schema" | ||
arg { | ||
name = "arg1" | ||
type = "varchar" | ||
} | ||
arg { | ||
name = "arg2" | ||
type = "varchar" | ||
} | ||
return_type = "varchar" | ||
return_behavior = "IMMUTABLE" | ||
api_integration = "api_integration_name" | ||
url_of_proxy_and_resource = "https://123456.execute-api.us-west-2.amazonaws.com/prod/test_func" | ||
} |
8 changes: 4 additions & 4 deletions
8
examples/resources/snowflake_materialized_view_grant/resource.tf
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# format is database name | schema name | table name | ||
terraform import snowflake_table.example | ||
terraform import snowflake_table.example 'databaseName|schemaName|tableName' |
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
Oops, something went wrong.