Skip to content

Commit

Permalink
terragrunt configurations sometimes have no tf files, but do have ter…
Browse files Browse the repository at this point in the history
…raform lockfiles
  • Loading branch information
spilliams committed Mar 9, 2023
1 parent bca2cd2 commit 480678e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/modules/manager/terragrunt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -10,6 +11,7 @@ export const supportedDatasources = [
TerraformModuleDatasource.id,
];

export const supportsLockFileMaintenance = true;
export const defaultConfig = {
commitMessageTopic: 'Terragrunt dependency {{depName}}',
fileMatch: ['(^|/)terragrunt\\.hcl$'],
Expand Down
12 changes: 12 additions & 0 deletions lib/modules/manager/terragrunt/lockfile.ts
Original file line number Diff line number Diff line change
@@ -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<UpdateArtifactsResult[] | null> {
if (artifact.config.updateType !== 'lockFileMaintenance') {
return null;
}

return await updateTerraformArtifacts(artifact);
}

0 comments on commit 480678e

Please sign in to comment.