Skip to content

Conventions #2884

Answered by BernieWhite
sapritchard asked this question in Q&A
Apr 30, 2025 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @sapritchard, thanks for the question.

The config looks good excepting the indent on the convention key as it should be a peer of binding or rule; child of spec. Should be like:

---
# Synopsis: Module configuration for config.datacenter.Rules.
apiVersion: github.com/microsoft/PSRule/v1
kind: ModuleConfig
metadata:
  name: config.datacenter.Rules
spec:
  binding:
    targetName:
      - ResourceName
      - Host
    targetType:
      - ResourceType
  convention:
    include:
      - match.name.key
  rule:
    baseline: config.datacenter.Rules

See https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Conventions/#using-within-modules

If editing within VSCode, the exten…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sapritchard
Comment options

Answer selected by sapritchard
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