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

New generic policy for PaaS resources private endpoint to override Private DNS zone. #1618

Merged
merged 32 commits into from
May 7, 2024

Conversation

Ravivarman13
Copy link
Contributor

@Ravivarman13 Ravivarman13 commented Apr 12, 2024

Overview/Summary

Policy Refresh Q3 Fy24

This PR fixes/adds/changes/removes

1.Added 2 new custom policy definitions
2.Policy 1: Deploy-Private DNS zone ID-PaaS-PE, this policy will DINE-configure private DNS zone group to override the DNS resolution for PaaS services private endpoint, added services which supports private DNS but doesn't have built in policy exist
3.Policy 2: Deploy-Private DNS zone-PaaS-PE-Generic, this policy will DINE-configure private DNS zone group to override the DNS resolution for PaaS services private endpoint, it is generic for the services which supports private DNS but doesn't have built in policy exist and also for the new services which supports private DNS in future

Breaking Changes

  1. None

Testing Evidence

Please provide any testing evidence to show that your Pull Request works/fixes as described and planned (include screenshots, if appropriate).

Testing URLs

The below URLs can be updated where the placeholders are, look for Ravivarman13 & main, to allow you to test your portal deployment experience.

Please also replace the curly brackets on the placeholders {}

Azure Public

Deploy To Azure

As part of this Pull Request I have

  • Checked for duplicate Pull Requests
  • Associated it with relevant issues, for tracking and closure.
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Performed testing and provided evidence.
  • Ensured contribution guidance is followed.
  • Updated relevant and associated documentation.
  • Updated the "What's New?" wiki page (located: /docs/wiki/whats-new.md)

New generic policy for PaaS resources private endpoint to override Private DNS zone.
Configure private DNS zone group to override the DNS resolution for PaaS services private endpoint, allowed values defined.
@Springstone Springstone added the Area: Policy 📝 Issues / PR's related to Policy label Apr 22, 2024
@Springstone Springstone added this to the policy-refresh-fy24-q3 milestone Apr 22, 2024
@Springstone Springstone changed the base branch from main to policy-refresh-q3fy24 April 22, 2024 12:04
Copy link
Member

@Springstone Springstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great effort, some minor fixes needed.
Please also add an entry in What's New for what it is you're adding in this pull request. Using the Policy Refresh Q3 Fy24 section, add a bullet describing the policies you're adding.

@Springstone
Copy link
Member

@rozkurt can you please also review this PR.

@Springstone Springstone requested a review from rozkurt April 22, 2024 12:53
…ed values.json to Deploy-Private DNS zone ID-PaaS-PE.json

Policy name shortened
Version edited
Category edited
Indents fixed
…to Deploy-Private DNS zone-PaaS-PE-Generic.json

Policy name edited
Version edited
Category edited
Fixed indents
Updated on addition of new custom policy
  - Added new custom policy "Deploy-Private DNS zone ID-PaaS-PE" 
  - Added new custom policy "Deploy-Private DNS zone-PaaS-PE-Generic"
Copy link
Member

@Springstone Springstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GREAT effort, really appreciate your contribution. Some more changes, mostly around ALZ specifics like escaping parameters :). Please also add these new policies to the polices.bicep for full testing.

…rivate-DNS-zone-ID-PaaS-PE.json

Fixed Policy name and addressed escaping parameters.
…loy-Private-DNS-zone-PaaS-PE-Generic.json

Policy name edited
Addressed escaping parameters
Removed space from policy name
Added below 2 Policy Definition resources to load
Deploy-Private-DNS-zone-ID-PaaS-PE.json
Deploy-Private-DNS-zone-PaaS-PE-Generic.json
Display name space issue fixed
@Springstone Springstone added the PR: Safe to test 🧪 PRs can run more advanced tests that may deploy or access environments label Apr 25, 2024
@Springstone Springstone reopened this Apr 25, 2024
@Ravivarman13 Ravivarman13 requested a review from a team as a code owner April 25, 2024 06:43
docs/wiki/Whats-new.md Outdated Show resolved Hide resolved
Deleted the info on Deploy-Private-DNS-Group ID policy as only generic policy "Deploy-Private-DNS-Generic" will serve the purpose
Deleted the info on Deploy-Private-DNS-Group ID policy as only generic policy "Deploy-Private-DNS-Generic" will serve the purpose
…-Private-DNS-GroupID.json

Deleted the policy as generic policy suffice the ask
@Springstone Springstone requested a review from jtracey93 May 6, 2024 13:00
@jtracey93 jtracey93 merged commit e2264bf into Azure:policy-refresh-q3fy24 May 7, 2024
3 of 4 checks passed
@kamilzzz
Copy link

kamilzzz commented Jun 4, 2024

I know this has been already merged but what do you think about potential improvement in terms of adding additional parameter to be able to specify evaluationDelay (https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effect-deploy-if-not-exists#:~:text=evaluationDelay)?

Similar feature-request requested for Azure built-in policies but without any response - Azure/azure-policy#1050

@eehret
Copy link

eehret commented Jul 19, 2024

I would love to use this, but am not even able to create the policy definition. This is what happens when I try to create it using Azure PowerShell:

The policy 'Deploy-Private-DNS-Generic' has defined parameters 'effect,privateDnsZoneId,resourceType,groupId,evaluationDelay' which are not used in the policy rule. Please either remove these parameters from the definition or ensure that they are used in the
     | policy rule.

I assume I must be doing something wrong, and that the policy content in the .json file isn't intended to be imported as-is....

EDIT: Yes it was probably me. When I copy the content from here instead, it seems to import just fine: https://www.azadvertizer.com/azpolicyadvertizer/Deploy-Private-DNS-Generic.html. Sorry for the noise, and thanks for the work on this policy, looks very useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Policy 📝 Issues / PR's related to Policy PR: Safe to test 🧪 PRs can run more advanced tests that may deploy or access environments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants