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

Cannot use existing at scope: tenant() for built-in policies #2741

Closed
alex-frankel opened this issue May 19, 2021 · 2 comments
Closed

Cannot use existing at scope: tenant() for built-in policies #2741

alex-frankel opened this issue May 19, 2021 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@alex-frankel
Copy link
Collaborator

alex-frankel commented May 19, 2021

Bicep version
Bicep CLI version 0.3.539 (c8b397d)

Describe the bug
I cannot get a reference to a built-in policy definition

To Reproduce

resource policydef 'Microsoft.Authorization/policyDefinitions@2020-09-01' existing = {
  scope: tenant()
  name: '10ee2ea2-fb4d-45b8-a7e9-a2e770044cd9'
}

Gives me the error:

Scope "tenant" is not valid for this resource type. Permitted scopes: "managementGroup", "subscription".

goal is to pass policydef.id to a policy assignment

@ghost ghost added the Needs: Triage 🔍 label May 19, 2021
@alex-frankel
Copy link
Collaborator Author

Related to:
#2504 (comment)

@stephaniezyen
Copy link
Contributor

stephaniezyen commented Apr 22, 2022

#1398 Duplicate

Repository owner moved this from Todo to Done in Bicep Apr 22, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

3 participants