diff --git a/lib/modules/manager/terragrunt/index.ts b/lib/modules/manager/terragrunt/index.ts index 78eb46b346c2d8..0219b459a7137f 100644 --- a/lib/modules/manager/terragrunt/index.ts +++ b/lib/modules/manager/terragrunt/index.ts @@ -2,6 +2,7 @@ import { GitTagsDatasource } from '../../datasource/git-tags'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import { TerraformModuleDatasource } from '../../datasource/terraform-module'; +export { updateArtifacts } from './lockfile'; export { extractPackageFile } from './extract'; export const supportedDatasources = [ @@ -10,6 +11,7 @@ export const supportedDatasources = [ TerraformModuleDatasource.id, ]; +export const supportsLockFileMaintenance = true; export const defaultConfig = { commitMessageTopic: 'Terragrunt dependency {{depName}}', fileMatch: ['(^|/)terragrunt\\.hcl$'], diff --git a/lib/modules/manager/terragrunt/lockfile.ts b/lib/modules/manager/terragrunt/lockfile.ts new file mode 100644 index 00000000000000..0a920623129adc --- /dev/null +++ b/lib/modules/manager/terragrunt/lockfile.ts @@ -0,0 +1,12 @@ +import { updateArtifacts as updateTerraformArtifacts } from '../terraform/lockfile/index'; +import type { UpdateArtifact, UpdateArtifactsResult } from '../types'; + +export async function updateArtifacts( + artifact: UpdateArtifact +): Promise { + if (artifact.config.updateType !== 'lockFileMaintenance') { + return null; + } + + return await updateTerraformArtifacts(artifact); +}