CICD Pipeline Terraform Failed to query available provider packages

Hi, I am using Terraform in my GitLab CICD pipeline. I have been testing the pipeline for weeks and it has been working fine, till recently I keep hitting the same error.

This is a snippet from my main.tf

provider "alicloud" {
    assume_role{
      role_arn = "${var.ALICLOUD_ASSUME_ROLE_ARN}"
      session_name = "${var.ALICLOUD_ASSUME_ROLE_SESSION_NAME}"
    }
}

terraform {
  backend "oss" {
  }
  required_providers {
    alicloud = {
    }
  }
}

Below is the trace log and error that I get

[INFO]  Terraform version: 1.2.6
[DEBUG] using github.com/hashicorp/go-tfe v1.0.0
[DEBUG] using github.com/hashicorp/hcl/v2 v2.12.0
[DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
[DEBUG] using github.com/zclconf/go-cty v1.10.0
[INFO]  Go runtime version: go1.18.1
[INFO]  CLI args: []string{"terraform", "init", "-backend-config=environments/dev/backend.config"}
[DEBUG] Attempting to open CLI config file: /root/.terraformrc
[DEBUG] File doesn't exist, but doesn't need to. Ignoring.
[DEBUG] ignoring non-existing provider search directory terraform.d/plugins
[DEBUG] ignoring non-existing provider search directory /root/.terraform.d/plugins
[DEBUG] ignoring non-existing provider search directory /root/.local/share/terraform/plugins
[DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
[DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
[INFO]  CLI command args: []string{"init", "-backend-config=environments/dev/backend.config"}
Initializing the backend...
[DEBUG] New state was assigned lineage "d7c140c4-eeb1-75d8-46c2-806b3e8df062"
[DEBUG] checking for provisioner in "."
[DEBUG] checking for provisioner in "/usr/bin"
[DEBUG] Instantiate OSS client using endpoint: "https://oss-cn-shanghai.aliyuncs.com"
[DEBUG] New state was assigned lineage "60aebecb-c00b-9f6c-c927-f1285f5e4b1e"
Successfully configured the backend "oss"! Terraform will automatically
use this backend unless the backend configuration changes.
[DEBUG] checking for provisioner in "."
[DEBUG] checking for provisioner in "/usr/bin"
[DEBUG] Current workspace name: default. All workspaces:[]string{"default"}

And the error

Initializing provider plugins...
- Finding latest version of hashicorp/alicloud...
2022-09-14T09:38:34.327Z [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
╷
│ Error: Failed to query available provider packages
│ 
│ Could not retrieve the list of available versions for provider
│ hashicorp/alicloud: could not connect to registry.terraform.io: Failed to
│ request discovery document: Get
│ "https://registry.terraform.io/.well-known/terraform.json": net/http:
│ request canceled while waiting for connection (Client.Timeout exceeded
│ while awaiting headers)
╵
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

I have checked the firewall, and believe the outbound traffic to registry.terraform.io is allowed.
Appreciate if anyone can provide some pointers on how to troubleshoot the issue.
Thanks in advance.