Quantcast
Channel: Terraform - HashiCorp Discuss
Viewing all articles
Browse latest Browse all 11426

Hashicorp/aws / Error: Invalid version constraint (A string value is required for aws.)

$
0
0

Given the following super basic config :

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 3.48.0"
    }
  }
}

provider "aws" {
  region  = "eu-west-3"
}

resource "aws_instance" "app_server" {
  ami           = "ami-08d70e59c07c61a3a"
  instance_type = "t2.micro"
}

I’m getting the following error :

Error: Invalid version constraint

  on backend.tf line 3, in terraform:
   3:     aws = {
   4:       source  = "hashicorp/aws"
   5:       version = "~> 3.0"
   6:     }

A string value is required for aws.

terraform -v outputs the following :

Terraform v1.0.2

on darwin_amd64

+ provider registry.terraform.io/hashicorp/aws v3.48.0

It migh be obvious, but i’m as i’m following the most basic tutorials on terraform for this given topic, I’m clueless about how to go further

Thanks a lot if anyone could help

Best

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 11426

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>