Snowflake Terraform 提供程序

HashiCorp Terraform (https://www.terraform.io/) is an open-source Infrastructure as Code (IaC) tool that allows you to dynamically build, change, and version infrastructure resources. You use the Terraform language (https://developer.hashicorp.com/terraform/language) to create configuration files that describe the configuration you want. Terraform compares your configuration to the current state and then generates a plan to create new resources or update and delete existing resources. The plan runs as a directed acyclic graph (DAG), which allows Terraform to understand and handle dependencies between resources.

The Snowflake Terraform provider (https://registry.terraform.io/providers/snowflakedb/snowflake/latest) enables you to establish a consistent workflow to manage Snowflake resources like warehouses, databases, schemas, tables, roles, grants, and more.

After you install Terraform (https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli#install-terraform), see the following resources to get started using the Snowflake provider.

ResourceDescription
Snowflake provider documentation (https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs)Guides and reference documentation in the Terraform Registry (https://registry.terraform.io/) for the Snowflake provider. Documentation includes the resource blocks (https://developer.hashicorp.com/terraform/language/resources/syntax) that describe objects in Snowflake (for example, snowflake_database) and the data sources (https://developer.hashicorp.com/terraform/language/data-sources) that you can use to name and dynamically fetch configuration state from Snowflake objects (for example, snowflake_users).
terraform-provider-snowflake (https://github.com/snowflakedb/terraform-provider-snowflake)

在该 GitHub 项目中,您可以执行以下操作:

Terraforming Snowflake (https://quickstarts.snowflake.com/guide/terraforming_snowflake/#0)This Quickstart tutorial from Snowflake Labs guides you through creating a Terraform project in GitHub that uses the Snowflake provider to create a demo database and warehouse.

版本控制和预览功能

Snowflake Terraform 提供程序遵循语义版本控制。主要版本发布包括重大更改。我们会提前在 GitHub 宣布这些消息。次要版本发布有时可能包含意料之外的更改,这具体取决于配置或环境。我们在某些用户可能偶尔遇到的一次性不便与这些更新为整个社区带来的总体益处之间进行了权衡。

新功能和修复

  • 我们会在最新的次要版本中引入新功能和修复。这是因为开发过程资源密集且需要进行大量的回归测试。
  • 如果发现安全漏洞,我们会根据具体情况考虑将关键修复回溯到早期版本。
  • We assess BCRs introduced by underlying Snowflake features for impacts to the provider. The migration guide (https://github.com/snowflakedb/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md) provides information about how to manage potential breaking changes. We prioritize BCR fixes in each latest version release of the provider and recommend updating your version of the provider regularly.

预览版功能

每次发布时,部分资源和数据源会被标记为“预览版功能”。

  • 请将这些功能视为提供程序的预览功能,无论它们在 Snowflake 中的状态如何。
  • Preview features are disabled by default. You must add the relevant feature name to the preview_features_enabled field in the provider configuration. The GitHub repository always contains a list of preview features.
  • 每项预览功能将在未来版本中重新设计并标记为稳定功能。请注意,即使提供程序的主版本号未变,预览功能也可能会带来重大更改。
  • 预览功能与其他 Snowflake 预览功能类似,未获得官方 Snowflake 支持。但是,产品和工程团队可以提供帮助。

官方支持的版本

  • Snowflake offers official support only for the latest version. When a new version is released, it immediately becomes the officially supported version. You can submit a case for official support of a Terraform provider issue using the processes described in Contacting Snowflake Support. This support channel is limited to issues directly related to the Snowflake Terraform provider. For third-party issues, please contact the associated third-party provider support team.
  • Snowflake 的官方支持从版本 2.0.0 开始,仅支持该版本及之后的版本。所有其他版本(包括主版本号低于 2.0.0 的版本)均不在官方支持范围内。
  • Although the latest version of the provider is the only officially supported version, we make a best effort to support resolution of issues with earlier versions. After assessing the issue, Snowflake Support may at its discretion require an update to the latest version to support the troubleshooting process. Upgrading to the latest version will be the most likely resolution to issues.