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

CAF.Name.PublicIP logic needs tweaking #98

Open
Gordonby opened this issue Apr 11, 2022 · 1 comment
Open

CAF.Name.PublicIP logic needs tweaking #98

Gordonby opened this issue Apr 11, 2022 · 1 comment
Assignees
Labels
bug Something isn't working upstream An issue for upstream tracking of PSRule repositories
Milestone

Comments

@Gordonby
Copy link

Description of the issue

I don't believe the logic or message around public ip's is correct. (Happy to be wrong through).

My template fails with;

-> pip-agw-byo : Microsoft.Network/publicIPAddresses [3/4]

    [PASS] Azure.PublicIP.Name
    [PASS] Azure.PublicIP.AvailabilityZone
    [PASS] Azure.PublicIP.StandardSKU
    [FAIL] CAF.Name.PublicIP
    | Template: bicep/main.bicep:991:5
    | Parameter: .github/workflows_dep/AksDeploy-ByoVnet.parameters.json:1:0

    | RECOMMEND:
    | Consider creating public IPs with a standard name. Additionally consider using
    | Azure Policy to only permit creation using a standard naming convention.

    | REASON:
    | - The parameter 'prefix' is null.

    | HELP:
    | - https://github.com/microsoft/PSRule.Rules.CAF/blob/main/docs/rules/en/CAF.Name.PublicIP.md

Error: pip-agw-byo failed CAF.Name.PublicIP. Public IP address names should use a standard prefix.
  1. The parameter 'prefix' is null - I don't see prefix in the RP schema.
  2. Hoping it doesn't mean publicIPPrefix as that has another purpose, not naming.
  3. This PublicIP address is created with the name pip-agw-byo - which should already be CAF compliant.
@BernieWhite BernieWhite added the bug Something isn't working label Apr 12, 2022
@BernieWhite BernieWhite self-assigned this Apr 12, 2022
@BernieWhite
Copy link
Member

@Gordonby Thanks for reporting this issue. Yes. Looks like a bug. Double-checking your linked GitHub action results it does not appear that you are overriding the CAF_PublicIPPrefix configuration option so it should just work.

@BernieWhite BernieWhite added this to the v0.4.0 milestone Apr 12, 2022
@BernieWhite BernieWhite added the upstream An issue for upstream tracking of PSRule repositories label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream An issue for upstream tracking of PSRule repositories
Projects
None yet
Development

No branches or pull requests

2 participants