0

我一直致力于将项目从 terraform on prem 迁移到 TFE。所以,我能够成功迁移到 0.12.31(从 0.11),然后迁移到 TFE,然后迁移到 0.15.5。但是,在为我的一个新工作区迁移状态时,我收到以下错误:

│ 错误:查找工作区时出错│ │ 工作区读取失败:工作区值无效

当我尝试迁移我的状态并使用此处提到的所有步骤时,就会发生这种情况。

对我来说,它曾经在 0.12.31 版本上将状态从本地迁移到 TFE 时无缝工作,但似乎是 0.15.5 的一些问题。有没有其他人遇到过类似的问题?

重现步骤 :

  1. 将您的 terraform 状态文件保存在本地。
  2. 在 TFE 上创建一个工作区(我有多个工作区,所以使用前缀逻辑来选择工作区)
  3. 删除现有的 .terraform 文件夹(如果有)
  4. 选择 terraform 版本为 0.15.5
  5. 运行terraform init它应该给你这个错误

p.s. if you'll remove the state file and run terraform init it runs successfully

4

0 回答 0