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

AddExclusionListToPolicy #1731

Merged

Conversation

BeckyHope19
Copy link
Contributor

Overview/Summary

The pull request being submitted is for a policy update to Deny vNet peering to other subscriptions, this update includes a new parameter to allow for vnets in other subscriptions.

This PR fixes/adds/changes/removes

  1. This change adds a parameter field to exclude certain vNets from being denied to peer with vNets in different subscriptions.

Breaking Changes

  1. N/A

Testing Evidence

I carried out tests in my test subscription with 4 vnets, 2 were in the same subscription and the other 2 were in another subscription. vNet 1 & 3 sit in Subscription 1 and vNet 2 & 4 sit in Subscription 2. Both subscription sit under the bex19 management group scope.

Here you will see the policy has been assigned to the bex19 management group scope, this is where the vnets also sit.
PolicyAssigned

You can then see the parameters I have passed in the policy for vNet 1 & 2 to be allowed to peer, you can see the subscription ID is different in the screenshot:
PolicyParameters

Here I am trying to create a peering between vNet 3 & 4, you will see it fails as neither of the vNets are in the allowed list and they are both in different subscriptions:
vnet 3-4 failed peering

Here I have created a peering between vNet 1 & 3, you will see it is successful as they are both in the same subscription:
vnet 1-3 successful peering

Here I have created a peering between vNet 2 & 4, you will see it is successful as they are both in the same subscription:
vnet 2-4 successful peering

Here I have created a peering between vNet 1 & 2, you will see it is successful as they are both in the allowed list:
vnet 1-2 successful peering

Here I am trying to create a peering between vNet 1 & 4, you will see it fails because only vNet 1 is in the allowed list and vNet 4 isn't, so it is only allowing the peering one way:
vnet 1-4 failed peering

The below URLs can be updated where the placeholders are, look for BeckysBranchALZ-07-08-24 & BeckysBranchALZ-07-08-24, 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)

@BeckyHope19 BeckyHope19 requested a review from a team as a code owner August 16, 2024 14:40
@BeckyHope19
Copy link
Contributor Author

@Springstone please fix this for me :-)

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 contribution. Couple of small things, and please can you also update "Whatsnew.md" in the wiki under the Policy Refresh section to include a short description on what you changed.
Once you've changed the policy version, please re-run the policy build script.

@Springstone Springstone reopened this Aug 19, 2024
@BeckyHope19
Copy link
Contributor Author

@Springstone - I have added the changes to the parameters as requested and updated the Whats New page and run the build command again.

@Springstone Springstone added the PR: Safe to test 🧪 PRs can run more advanced tests that may deploy or access environments label Aug 20, 2024
@Springstone Springstone reopened this Aug 20, 2024
@jtracey93 jtracey93 merged commit 21de55d into Azure:policy-refresh-q1fy25 Aug 27, 2024
2 of 4 checks passed
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.

3 participants