Terraform在升级Azure Synapse的Spark版本时发生错误。

huangapple go评论61阅读模式
英文:

Error in Terraform while upgrading Spark version of Azure Synapse

问题

我在尝试将 Azure Synapse 环境的 Spark 版本从 3.2 升级到 3.3 时收到以下错误。此错误是通过 terraform apply 获得的:

│ Error: expected spark_version to be one of [2.4 3.1 3.2], got 3.3
│   with azurerm_synapse_spark_pool.dlake_spark_pool,
│   on synapse.tf line 153, in resource "azurerm_synapse_spark_pool" "dlake_spark_pool":
│  153:   spark_version        = 3.3

这很奇怪,因为有关 Synapse Spark 池的文档表明应该可以进行升级。具体而言,以下行:

spark_version - (Optional) The Apache Spark version. Possible values are 2.4, 3.1, 3.2 and 3.3. Defaults to 2.4.

发生了什么,为什么我无法升级 Spark 版本,即使文档说可以呢?

英文:

I'm receiving the following error when trying to upgrade the spark version of our Azure Synapse environment from 3.2 to 3.3. This error is obtained through terraform apply:

    Starting: Terraform Apply
    ==============================================================================
    Task         : Bash
    Description  : Run a Bash script on macOS, Linux, or Windows
    Version      : 3.214.0
    Author       : Microsoft Corporation
    Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
    ==============================================================================
    Generating script.
    ========================== Starting Command Output ===========================
    /usr/bin/bash /home/vsts/work/_temp/xxxxxx.sh
    ╷
    │ Error: expected spark_version to be one of [2.4 3.1 3.2], got 3.3
    │ 

│   with azurerm_synapse_spark_pool.dlake_spark_pool,
│   on synapse.tf line 153, in resource "azurerm_synapse_spark_pool" "dlake_spark_pool":
│  153:   spark_version        = 3.3
│ 
╵
##[error]Bash exited with code '1'.
Finishing: Terraform Apply

Which is very strange, because the documentation about the synapse spark pool says that it should be possible to upgrade. Specifically, the following line:

> spark_version - (Optional) The Apache Spark version. Possible values are 2.4 , 3.1 , 3.2 and 3.3. Defaults to 2.4.

What is happening, and why can't I upgrade my spark version even though docs say it's possible?

答案1

得分: 2

使用 任何 额外的库介于您和实际API之间,都会增加它们不同步的风险。很可能在这里就是这种情况。

幸运的是,terraform 确实对提供者进行了更新,并支持该版本,但很可能您使用的是旧版本的 azurem 提供者。请检查例如 3.23.0 版档案 ,该版本可能值不包括 3.3 ,而只限于 3.2。

因此,您需要检查您使用的提供者版本并升级到支持您感兴趣功能的版本,或者升级到当前最新版本 / 3.55.0。

英文:

With any additional library you have between you and the actual API you risk them getting out of sync with each other. Very possible that that is / was the case here.

Luckily terraform did have an update to the provider and supports that version but most likely you use an old version of the azurem provider. Check e.g. the docs for 3.23.0 where the possible values do not include 3.3 but stop at 3.2
Therefore you need to check the provider version you use and upgrade it to a version that does support the features you are interested in, or just upgrade to the current latest / 3.55.0

huangapple
  • 本文由 发表于 2023年5月10日 14:42:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/76215551.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定