diff --git a/lib/datasource/terraform-module/base.ts b/lib/datasource/terraform-module/base.ts
index 688a9a429170af0941ad10b96e27af1389502342..45d23d6d282034d6705d670b2cdaf777e657ac04 100644
--- a/lib/datasource/terraform-module/base.ts
+++ b/lib/datasource/terraform-module/base.ts
@@ -1,4 +1,6 @@
+import { ExternalHostError } from '../../types/errors/external-host-error';
 import { cache } from '../../util/cache/package/decorator';
+import type { HttpError } from '../../util/http/types';
 import { ensureTrailingSlash } from '../../util/url';
 import { Datasource } from '../datasource';
 import type { ServiceDiscoveryResult } from './types';
@@ -26,4 +28,16 @@ export abstract class TerraformDatasource extends Datasource {
   private static getDiscoveryUrl(registryUrl: string): string {
     return `${ensureTrailingSlash(registryUrl)}.well-known/terraform.json`;
   }
+
+  override handleSpecificErrors(err: HttpError): void {
+    const failureCodes = ['EAI_AGAIN'];
+    // istanbul ignore if
+    if (failureCodes.includes(err.code)) {
+      throw new ExternalHostError(err);
+    }
+    // istanbul ignore if
+    if (err.response?.statusCode === 503) {
+      throw new ExternalHostError(err);
+    }
+  }
 }
diff --git a/lib/datasource/terraform-module/index.ts b/lib/datasource/terraform-module/index.ts
index 0c6d4a44da6496f1846b95b410036e40f3d5ae3c..f9bbbe2f174e323c6bff3692a53c91ac3c3a5442 100644
--- a/lib/datasource/terraform-module/index.ts
+++ b/lib/datasource/terraform-module/index.ts
@@ -1,7 +1,5 @@
 import { logger } from '../../logger';
-import { ExternalHostError } from '../../types/errors/external-host-error';
 import { cache } from '../../util/cache/package/decorator';
-import type { HttpError } from '../../util/http/types';
 import { regEx } from '../../util/regex';
 import * as hashicorpVersioning from '../../versioning/hashicorp';
 import type { GetReleasesConfig, ReleaseResult } from '../types';
@@ -83,14 +81,6 @@ export class TerraformModuleDatasource extends TerraformDatasource {
     return dep;
   }
 
-  override handleSpecificErrors(err: HttpError): void {
-    const failureCodes = ['EAI_AGAIN'];
-    // istanbul ignore if
-    if (failureCodes.includes(err.code)) {
-      throw new ExternalHostError(err);
-    }
-  }
-
   private static getRegistryRepository(
     lookupName: string,
     registryUrl: string