Azure:未从az cli中找到资源,但门户中存在资源

xesrikrc  于 2022-12-27  发布在  其他
关注(0)|答案(1)|浏览(164)

面对这个"ResourceNotFound"问题(JPG-1),但我可以在Azure门户中看到logicapp资源(JPG-2)

(ResourceNotFound) The Resource 'Microsoft.Web/sites/us-analytics-dev-dsvm-auto-deletion-logicapp-eastus2' under resource group 'us-analytics-dev-dsvm-auto-deletion-eastus2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Web/sites/us-analytics-dev-dsvm-auto-deletion-logicapp-eastus2' under resource group 'us-analytics-dev-dsvm-auto-deletion-eastus2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

注:
1.已将(us-analytics-dev)配置为cli中的默认订阅。
1.通过Terraform创建的Logicapp资源(代码如下:代码-1)

    • 代码-1**:(已编辑)
resource "azurerm_resource_group" "dsvm_auto_deletion_resource_group" {
  name     = "us-analytics-dev-dsvm-auto-deletion-logicapp-eastus2"
  location = "East US 2"
}

resource "azurerm_logic_app_workflow" "dsvm_auto_deletion_logicapp" {
  name                = "us-analytics-dev-dsvm-auto-deletion-logicapp-eastus2"
  location            = "East US 2"
  resource_group_name = "us-analytics-dev-dsvm-auto-deletion-eastus2"
}
sczxawaw

sczxawaw1#

首先注意,我注意到您的azurerm_resource_group资源名称与您的azurerm_logic_app_workflow资源名称相同,但我认为这只是一个打字错误:)
我尝试了与您相同的命令,但它对我不起作用,它一直返回空列表,我认为az logicapp命令有问题。
经过一番研究,我发现preview中有一个包可以替代使用,即逻辑工作流
只需输入以下命令并安装该软件包,它就应该可以工作,因此对于您的情况,它将类似于:

az logic workflow show -g us-analytics-dev-dsvm-auto-deletion-eastus2 --name us-analytics-dev-dsvm-auto-deletion-logicapp-eastus2

相关问题