Skip to content

packageRules for Terraform modules monorepo #29879

Discussion options

You must be logged in to vote

Found a working solution using regex customManager. ALso need a packageRule to disable terraform manager for this path (but leave Manager enabled to get Provider updates).

  "customManagers": [
    {
      "customType": "regex",
      "datasourceTemplate": "github-tags",
      "depNameTemplate": "myuser/terraform-modules/{{depName}}",
      "fileMatch": ["^ami\.tf$"],
      "matchStrings": [
        "ref=(?<depName>(.*))-(?<currentValue>.*)\""
      ],
      "versioningTemplate": "semver",
    },
],
  "packageRules": [
    {
      "matchDepPrefixes": ["github.com/myuser/terraform-modules"],
      "matchManagers": ["terraform"],
      "enabled": false,
    },
]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pdcemulator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant