Skip to content

Instantly share code, notes, and snippets.

@bushong1
Last active May 27, 2025 14:47
Show Gist options
  • Save bushong1/2dd02c15046abb38e88701b4e3f996a2 to your computer and use it in GitHub Desktop.
Save bushong1/2dd02c15046abb38e88701b4e3f996a2 to your computer and use it in GitHub Desktop.
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"mergeConfidence:all-badges",
"github>defenseunicorns/uds-common//config/renovate.json5",
":semanticCommits",
":semanticPrefixFixDepsChoreOthers",
"group:all",
"replacements:all",
"workarounds:all"
],
"branchConcurrentLimit": 0,
"prConcurrentLimit": 0,
"prHourlyLimit": 0,
"ignorePaths": ["vendored/**"], //ignore vendored dependencies
"packageRules": [
{
"groupName": "Extra Support Dependencies",
"labels": [
"support-deps"
],
"commitMessageTopic": "support-deps: {{depName}}",
"matchPackageNames": [
"*"
],
"schedule": ["before 10am on the 1st day of the month"],
},
{
"matchFileNames": [
".github/**"
],
"matchDatasources": [
"github-actions"
],
"pinDigests": true,
},
{
"groupName": "core dependencies",
"commitMessageTopic": "core dependencies: {{depName}}",
"matchDatasources": [
"terraform-version",
"terraform-provider",
"terraform-module"
],
"schedule": ["before 10am on monday"],
},
{
"groupName": "core dependencies",
"commitMessageTopic": "core dependencies: {{depName}}",
"matchPackageNames": [
"/defense[-_]?unicorns/"
],
"schedule": ["before 10am on monday"],
},
{
// https://github.com/renovatebot/renovate/issues/30500
"description": [
"Disable updates for Terraform binary until OpenTofu is fully supported"
],
"matchPackageNames": [
"hashicorp/terraform",
"terraform"
],
"enabled": false
},
{
// Rename spacelift package to spacelift-io/spacelift to workaround a deficiency in terraform-docs
"matchPackageNames": [
"spacelift"
],
"overridePackageName": "spacelift-io/spacelift",
"matchDatasources": [
"terraform-provider"
]
},
{
// Disable renovate for local terraform modules to avoid issues with terraform-docs
"matchPackageNames": [
"/^\\.\\.?\\/.*/",
],
"enabled": false,
"matchDatasources": [
"terraform-module"
]
},
{
"matchPackageNames": [
"ghcr.io/defenseunicorns/packages/private/uds/core"
],
"sourceUrl": "https://github.com/defenseunicorns/uds-core",
}
],
"customManagers": [
{
// Update terraform-docs generated README files for providers
"customType": "regex",
"fileMatch": [
"README.md"
],
"matchStrings": [
// Test: https://regex101.com/r/kz6XCg/1
"\\| <a name=\"(requirement|provider)_(?<depName>.+?)\"></a> \\[.*\\]\\(#[^\\)]+\\) \\| (?<currentValue>.+?) \\|",
// Test: https://regex101.com/r/vC7Jz3/2
// Exclude versions beginning with `l` to avoid matching `latest`
"https:\\/\\/registry\\.terraform\\.io\\/providers\\/hashicorp/(?<depName>.+?)/(?<currentValue>[^l].+?)/docs/",
],
"versioningTemplate": "hashicorp",
"datasourceTemplate": "terraform-provider",
"depTypeTemplate": "required_provider",
"extractVersionTemplate": "^(?<version>.*)$"
},
{
// Update terraform-docs generated README files for modules
"customType": "regex",
"fileMatch": [
"README.md"
],
"matchStrings": [
// https://regex101.com/r/2xLZLZ/9
"\\| <a name=\"module_.*\"></a> \\[.*\\]\\(#[^\\)]+\\) \\| (((git::)?(?<githubDepUrl>(https:\\/\\/)?github\.com\\/(?<githubRepoName>.+?)(\.git)?)(?<githubSubmodulePath>\\/\\/.*)?)|((?<registryDepName>.+?)(?<registrySubmodulePath>\\/\\/.*)?)) \\| (?<currentValue>.+?) \\|",
],
"versioningTemplate": "{{#if githubDepUrl}}semver-coerced{{else}}hashicorp{{/if}}",
"depTypeTemplate": "module",
"datasourceTemplate": "{{#if githubDepUrl}}github-tags{{else}}terraform-module{{/if}}",
"depNameTemplate": "{{#if githubRepoName}}{{{githubRepoName}}}{{else}}{{{registryDepName}}}{{/if}}",
"extractVersionTemplate": "^(?<version>.*)$"
},
// Matches specified datasources where an equals separates the version on the following line as in most tofu/hcl
{
"customType": "regex",
"fileMatch": [
".*\\.to?fu?$"
],
"matchStrings": [
// Test: https://regex101.com/r/F5ZYad/1
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( extractVersion=(?<extractVersion>.*?))?( registryUrl=(?<registryUrl>.*?))?\\s+.*?\\s+=\\s+['\"]?(?<currentValue>[v0-9].*?)['\"]?(\\s|$)",
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}",
"extractVersionTemplate": "{{#if extractVersion}}{{{extractVersion}}}{{else}}^(?<version>.*)${{/if}}"
},
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment