Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update source and version for aws provider #4

Open
daz10000 opened this issue Jul 16, 2023 · 0 comments
Open

Update source and version for aws provider #4

daz10000 opened this issue Jul 16, 2023 · 0 comments

Comments

@daz10000
Copy link

daz10000 commented Jul 16, 2023

Thanks- this was hugely helpful. I did run into some confusing errors (not a terraform expert), which were finally resolved by updating the required providers section to this. Happy to send a PR if you're open to updating,

$ cat terraform.tf
terraform {
  required_version = "~> 1.2"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.8.0"
    }
  }
}

provider "aws" {
  access_key = var.aws_access_key
  secret_key = var.aws_secret_key
  region     = var.region
}

It was previously throwing an error during init

Initializing the backend...
Initializing modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 5.1.0 for vpc_main...
- vpc_main in .terraform/modules/vpc_main

Initializing provider plugins...
- Finding hashicorp/aws versions matching "~> 4.0, >= 5.0.0"...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given
│ constraints ~> 4.0, >= 5.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant