我正在尝试在 Azure 中创建新的 VM,并收到验证错误“网络接口不应具有公共 IP”。我只是尝试创建一个 Ubuntu Server 18.04 LTS,并选择所有默认选项。如果我在这里做错了什么,请告诉我。
错误详情:
{“code”:“InvalidTemplateDeployment”,“message”:“由于违反政策,模板部署失败。 请参阅详细信息以了解更多信息。","details":[{“code”:“RequestDisallowedByPolicy”,“target”:“ubuntuvm62”,“message”:“资源‘ubuntuvm62’被政策禁止。 (代码:RequestDisallowedByPolicy)”,“additionalInfo”:[{“type”:“PolicyViolation”,“info”:{“policyDefinitionDisplayName”:“网络接口不应具有公共IPs”,“evaluationDetails”:{“evaluatedExpressions”:[{“result”:“True”,“expressionKind”:“字段”,“表达式”:“类型”,“路径”:“类型”,“expressionValue”:“Microsoft.Network / networkInterfaces”,“targetValue”:“Microsoft.Network / networkInterfaces”,“operator”:“Equals”},{“result”:“False”,“expressionKind”:“字段”,“表达式”:“Microsoft.Network / networkInterfaces / ipconfigurations [].publicIpAddress.id","路径":"properties.ipConfigurations[].properties.publicIpAddress.id","expressionValue":"/subscriptions/8f2bfae4-37f5-44fe-94b5-6e16ff8040f4/resourceGroups/ubunturesourcegroup/providers/Microsoft.Network/publicIpAddresses/ubuntuvm-ip","targetValue":"*","operator":"NotLike"}]},"policyDefinitionId":"/providers/Microsoft.Authorization/policyDefinitions/83a86a26-fd1f-447c-b59d-e51f44264114","policy DefinitionName“:”83a86a26-fd1f-447c-b59d-e51f44264114“,”policyDefinitionEffect“:”拒绝“,”policyAssignmentId“:”/providers/Microsoft.Management/managementGroups/258ac4e4-146a-411e-9dc8-79a9e12fd6da/providers/Microsoft.Authorization/policyAssignments/b8ff9a106bbe41f7be986f29“,”policyAssignmentName“:”b8ff9a106bbe41f7be986f29“,”policyAssignmentDisplayName“:”网络接口不应具有公共 IP","policyAssignmentScope":"/providers/Microsoft.Management/managementGroups/258ac4e4-146a-411e-9dc8-79a9e12fd6da","policyAssignmentParameters":{}}}],"policyDetails":[{"isInitiative":false,"assignmentId":"/providers/Microsoft.Management/managementGroups/258ac4e4-146a-411e-9dc8-79a9e12fd6da/providers/Microsoft.Authorization/policyAssignments/b8ff9a106bbe41f7be986f29","assignmentName":"网络接口不应具有公共IP”,“viewDetailsUri”:“https://portal.azure.com#blade/Microsoft_Azure_Policy/EditAssignmentBladeV2/assignmentId/%2Fproviders%2FMicrosoft.Management%2FmanagementGroups%2F258ac4e4-146a-411e-9dc8-79a9e12fd6da%2Fproviders%2FMicrosoft.Authorization%2FpolicyAssignments%2Fb8ff9a106bbe41f7be986f29”}]}]}
答案1
拥有您的订阅的某人创建了不允许使用公共 IP 地址的策略。
“由于违反政策,模板部署失败。”