Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias request: Microsoft.Network/networkInterfaces/ipConfigurations[*].subnet.routeTable.id #889

Open
krowlandson opened this issue Jan 17, 2022 · 0 comments
Labels
alias-request Requests for new alias creation (either modifiable or not)

Comments

@krowlandson
Copy link

Details of the scenario you tried and the problem that is occurring

Need to create policy preventing attachment of network interfaces to a subnet which hasn't been secured with a route table (UDR). This currently fails with an error as the alias does not exist.

Verbose logs showing the problem

n/a

Suggested solution to the issue

Register the alias Microsoft.Network/networkInterfaces/ipConfigurations[*].subnet.routeTable.id to support creating a policy definition such as the following:

{
  "mode": "All",
  "policyRule": {
    "if": {
      "allOf": [
        {
          "field": "type",
          "equals": "Microsoft.Network/networkInterfaces"
        },
        {
          "field": "Microsoft.Network/networkInterfaces/ipConfigurations[*].subnet.name",
          "notIn": "[parameters('excludedSubnets')]"
        },
        {
          "field": "Microsoft.Network/networkInterfaces/ipConfigurations[*].subnet.routeTable.id",
          "exists": "false"
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]"
    }
  },
  "parameters": {
    "effect": {
      "type": "String",
      "metadata": {
        "displayName": "Effect",
        "description": "Enable or disable the execution of the policy"
      },
      "allowedValues": [
        "Audit",
        "Deny",
        "Disabled"
      ],
      "defaultValue": "Deny"
    },
    "excludedSubnets": {
      "type": "Array",
      "metadata": {
        "displayName": "Excluded Subnets",
        "description": "Array of subnet names that are excluded from this policy"
      },
      "defaultValue": [
        "GatewaySubnet",
        "AzureFirewallSubnet",
        "AzureFirewallManagementSubnet"
      ]
    }
  }
}

If policy is Guest Configuration - details about target node

n/a

@nehakulkarni123 nehakulkarni123 added the alias-request Requests for new alias creation (either modifiable or not) label Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alias-request Requests for new alias creation (either modifiable or not)
Projects
None yet
Development

No branches or pull requests

2 participants