从模块导入azure中的Terraform服务



我已经在Azure中手动创建了一个服务,需要将其导入到我的配置的状态文件中。但是,运行terraform import命令时出现语法错误。

terraform import -var-file="../../input/env/ssa/terraform-ssa-SSASTORAGE.json" 'module.management.azurerm_storage_account.main["ssaautomation"]' /subscriptions/xxxxxxxxxxxxxxxxxxx/resourceGroups/SSASTORAGE/providers/Microsoft.Storage/storageAccounts/ssaautomation

错误:

The import command expects two arguments.

在我看来,我在powershell中运行带有两个参数的命令
我以前执行过这个命令,没有任何问题-有人知道我为什么会出现以下错误吗?

注意:代码中模块部分的单括号是由于我在powershell中运行。请参阅此链接。

出现一些语法错误:

我的代码:

'module.management.azurerm_storage_account.main["ssaautomation"]'

"\-需要切换位置

修复:

'module.management.azurerm_storage_account.main["ssaautomation"]'

相关内容

最新更新