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

Network/firewallPolicies has wrong ShortName #109

Open
ReneRebsdorf opened this issue Jul 10, 2024 · 2 comments
Open

Network/firewallPolicies has wrong ShortName #109

ReneRebsdorf opened this issue Jul 10, 2024 · 2 comments

Comments

@ReneRebsdorf
Copy link

Tool version
main branch

Describe the bug
Microsoft.Network/firewallPolicies short name should be 'afwp' instead of 'waf'

resourcetypes.json has:

  {
    "id": 223,
    "resource": "Network/firewallPolicies",
    "optional": "UnitDept",
    "exclude": "Org,Function",
    "property": "",
    "ShortName": "waf",
    "scope": "resource group",
    "lengthMin": "1",
    "lengthMax": "80",
    "validText": "Alphanumerics, underscores, periods, and hyphens. Start with alphanumeric. End alphanumeric or underscore.",
    "invalidText": "",
    "invalidCharacters": "",
    "invalidCharactersStart": "",
    "invalidCharactersEnd": "",
    "invalidCharactersConsecutive": "",
    "regx": "^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_\\.-]{0,78}[a-zA-Z0-9_])$",
    "staticValues": ""
  },

However as per https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations
their abbreviation should be 'afwp'

This is relevant where the short name is used for name generation either as a postfix or prefix

To Reproduce
N/A

Expected behavior
afwp is the short name for azure firewall policies

Screenshots
N/A

Installation Method
N/A

Additional context
N/A

@Floriszz
Copy link

The resource Provider Namespace, Microsoft.Network/firewallPolicies, is mentioned twice at Link above. So both are correct I guess.
Confusing it is, but both fall under Firewall Manager anyway.

@ReneRebsdorf
Copy link
Author

They are indeed but they are used for different resources, so they are correct under different contexts.

Since I assume there's no way to determine that context, the ShortName should probably be removed here, as it is misleading?
Maybe the regex should be updated to expect either 'waf' or 'afwp' in the name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants