Error While terraform init command

Hi Team,
I am using terraform for first time. And When I am creating below code, I am getting error.

terraform {
required_providers {
aws = {
source = “hashicorp/aws”
version = “~> 4.0”
}
}
}

Configure the AWS Provider

provider “aws” {
region = “us-east-1”

Error - Initializing the backend…

Initializing provider plugins…

  • Finding hashicorp/aws versions matching “>= 3.0.0”…

    │ Error: Failed to query available provider packages

    │ Could not retrieve the list of available versions for provider hashicorp/aws: 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)

Can someone please assist me here?

That error is saying Terraform cannot access the Terraform registry. Are there outgoing Internet restrictions in place?

Thanks Stuart for your reply. But I am using Office laptop. May because of which I am getting error. But can you confirm whether my code is correct ?