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

Using resource group as scope #746

Closed
EdersonSC opened this issue Sep 16, 2024 · 2 comments
Closed

Using resource group as scope #746

EdersonSC opened this issue Sep 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@EdersonSC
Copy link

Describe the bug

470 / 5.000
in my global.settings.jsonc file, I have two pacs:
A dev one that I point to an RG, and a QA one that I point to a subscription,

When I Plan with the DEV environment selected I get an error:

35 | throw "Invalid deploymentRootScope: $deploymentRootScope"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Invalid deploymentRootScope:
| /subscriptions/XXXXXX-484a-4803-a635-XXXXXXXXXXXX/resourceGroups/police-test

To Reproduce
To reproduce, simply run a policy implementation in an RG, the global-settings.jsonc with the information:
{
"pacSelector": "DEV",
"cloud": "AzureCloud",
"tenantId": "XXXXXXXXX-4cef-b4da-7XXXXXXXXXXX",
"deploymentRootScope": "/subscriptions/XXXXXX-484a-4803-a635-XXXXXXXXXXX/resourceGroups/police-test",
"desiredState": {
"excludedPolicyDefinitions": [],
"excludedScopes": [],
"strategy": "ownedOnly",
"excludedPolicySetDefinitions": [],
"excludedPolicyAssignments": [],
"keepDfcSecurityAssignments": false
},
"globalNotScopes": [],
"managedIdentityLocation": "eastus"
},

Expected behavior
The expectation is that he would move past the planning phase and do the planning only to apply the policy to the RG..

Screenshots
If applicable, add screenshots to help explain your problem.

EPAC Version
10.5.8

@EdersonSC EdersonSC added the bug Something isn't working label Sep 16, 2024
@anwather
Copy link
Collaborator

EPAC doesn't support having the deploymentRootScope set to a resource group. Create another subscription and deploy your dev policies to that or for dev testing you can deploy assignments to the resource group. If you want to test changes to a policy in a development way - you would need to duplicate the definitions (essentially creating versions) if you are unable to use a different subscription as the dev deployment scope.

@EdersonSC
Copy link
Author

Thanks for your support ! now I understood .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants