Skip to content

PSRule and extension resources #2179

Discussion options

You must be logged in to vote

@BenjaminEngeset With Microsoft.Insights/diagnosticSettings because it is an extension resource it is deployed in the scope of the parent resource.

For example:

@sys.description('Configure auditing for Key Vault.')
resource logs 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (!empty(workspaceId)) {
  name: 'service'
  scope: vault
  properties: {
    workspaceId: workspaceId
    logs: [
      {
        category: 'AuditEvent'
        enabled: true
      }
    ]
  }
}

So it's resulting resource Id is /subscriptions/nnn/resourceGroups/nnn/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.Insights/diagnosticSettings/service.

For in-flight we need to specifically extract …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@BenjaminEngeset
Comment options

@BernieWhite
Comment options

@BenjaminEngeset
Comment options

Answer selected by BenjaminEngeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants