使用ARM模板将应用程序安全组分配给网络接口卡 [英] Assigning Application Security Group to Network Interface Card with ARM template

查看:56
本文介绍了使用ARM模板将应用程序安全组分配给网络接口卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们部署了应用程序安全组,并通过ARM模板部署了虚拟机。现在我尝试通过arm模板将此应用程序安全组分配给现有虚拟机的网络接口卡。以下是代码

We have application security groups deployed and virtual machines deployed through ARM template. Now i am trying to assign this application security group to the network interface card of an existing virtual machine through arm template. Below is the code

" ipConfigurations":[

          {

            "name":"ipconfig1","
            "properties":{

              "applicationSecurityGroups":[

                {

                  " id":" [variables('asgId')]"

                }¥b $ b              ],
              "子网":{

                " id":" [variables('SubnetRef')。Imagesubnetref]"

              },b $ b              " privateIPAllocationMethod":" Dynamic"



            }¥b $ b          }¥b $ b        ],

"ipConfigurations": [
          {
            "name": "ipconfig1",
            "properties": {
              "applicationSecurityGroups": [
                {
                  "id": "[variables('asgId')]"
                }
              ],
              "subnet": {
                "id": "[variables('SubnetRef').Imagesubnetref]"
              },
              "privateIPAllocationMethod": "Dynamic"

            }
          }
        ],

当我运行arm模板时,我无法分配给nic,它会将错误消息作为InvalidResourceReference抛出.asg我们在此模板中使用的无法引用网络接口卡。

When i run the arm template i am not able to assign to the nic and it throws the error message as InvalidResourceReference.The asg we used in this template is not able to refer the network interface card.

 " code":" InvalidResourceReference",$
  " message" ;:\"Resources/subscriptions/2xyze/resourceGroups/XYZ-DR-GEN-01/providers /Microsoft.Network/applicationSecurityGroups/xyz-rdp-asg-001,sources/ subscription / xyz / resourceGroups / xyz -DR-GEN-01 / providers / Microsoft.Network / networkInterfaces / xyz-dr-img-nic-002
未找到。请确保引用的资源存在,并且两个资源都在同一个区域。",

 "code": "InvalidResourceReference",
  "message": "Resource /subscriptions/2xyze/resourceGroups/XYZ-DR-GEN-01/providers /Microsoft.Network/applicationSecurityGroups/xyz-rdp-asg-001 referenced by resource/subscriptions/xyz/resourceGroups/xyz-DR-GEN-01/providers/Microsoft.Network/networkInterfaces/xyz-dr-img-nic-002 was not found. Please make sure that the referenced resource exists, and that both resources are in the same - region.",

可以请一些人请指导我。

Can some one please guide me on this.

推荐答案

嗨Surender, 

Hi Surender, 

如错误中所述,您是否可以确保NIC和ASG位于同一区域?

As stated in the error, can you make sure both the NIC and the ASG are in the same region ?

问候, 

Msrini


这篇关于使用ARM模板将应用程序安全组分配给网络接口卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆