# "Missing required argument" while updating provider configurations for v0.13

**URL:** <https://discuss.hashicorp.com/t/missing-required-argument-while-updating-provider-configurations-for-v0-13/17235>\
**Category:** Terraform\
**Created:** [August 6, 2020, 5:23pm UTC](https://discuss.hashicorp.com/t/missing-required-argument-while-updating-provider-configurations-for-v0-13/17235 "2020-08-06T17:23:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joenuts1](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/joenuts1/32/10255_2.png) [@joenuts1](https://discuss.hashicorp.com/u/joenuts1)\
**Post date:** [August 6, 2020, 5:23pm UTC](https://discuss.hashicorp.com/t/missing-required-argument-while-updating-provider-configurations-for-v0-13/17235/1 "2020-08-06T17:23:32Z")

</div>

I’m having trouble getting terraform to recognize region value/argument following upgrade to 0.13.0-rc1.

Pretty simple setup, one module created, with dependencies on aws and template provider. Upgrade process detected existing providers and created the necessary requred\_provider section with references to “hashicorp/aws” and “hashicorp/template”, which were then  
manually renamed to “[registry.terraform.io/-/aws](http://registry.terraform.io/-/aws)” and “[registry.terraform.io/-/template](http://registry.terraform.io/-/template)” to reflect definitions in the existing state.

Subsequent plans now error out.

```
$ terraform plan -out update.plan
Error: Missing required argument
The argument "region" is required, but was not set.

```

I suspect with the new changes, the region values defined in the provider are now ignored. Or possibly the region AND profile section, as when setting local AWS\_DEFAULT\_REGION=“us-west-2”, error changes to security token included in the request is invalid (which makes me thing profile value is now ignored).

```
-- versions.tf --
terraform {
  required_providers {
    aws = {
# source = "hashicorp/aws"
      source = "registry.terraform.io/-/aws"
      version = "2.70.0"
    }
    template = {
# source = "hashicorp/template"
      source = "registry.terraform.io/-/template"
      version = "2.1.2"
    }
  }
  required_version = ">= 0.13"
}

-- data.tf --
provider "aws" {
  profile = "prod"
  region = "us-west-2"
  version = "2.70.0"
}

provider "template" {
  version = "2.1.2"
}
```

---

<div class="post-metadata">

**Author:** ![apparentlymart](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/apparentlymart/32/702_2.png) [@apparentlymart](https://discuss.hashicorp.com/u/apparentlymart)\
**Post date:** [November 5, 2020, 6:15pm UTC](https://discuss.hashicorp.com/t/missing-required-argument-while-updating-provider-configurations-for-v0-13/17235/2 "2020-11-05T18:15:59Z")

</div>

Hi @joenuts1!

I split this off from the v0.13.0 beta program topic because nobody was monitoring that topic anymore and so I didn’t see this until today. Sorry about that.

I hope you found an answer some other way in the meantime, but in case not (and in case someone with a similar problem finds this topic) I’ll answer it.

* * *

Those `-/aws` and `-/template` providers are placeholders representing un-qualified provider references in your existing state which Terraform is tracking so that it can (usually) auto-migrate them during the next `terraform apply`. So with that said, it’s not expected to use those legacy addresses in your configuration: instead, you should use the new name `hashicorp/aws` or `hashicorp/template`, which `terraform apply` should then use as the fully-qualified provider to migrate _to_.

Another option, if you want to be explicit about it, is to directly migrate those existing references in the state. This will still create a new state snapshot, like `terraform apply` would, but it won’t change anything _except_ the provider references in the state:

```auto
terraform state replace-provider 'registry.terraform.io/-/aws' 'registry.terraform.io/hashicorp/aws'
terraform state replace-provider 'registry.terraform.io/-/template' 'registry.terraform.io/hashicorp/template'

```

The intended final state is that you have no “legacy” provider references at all, because both your configuration and your state will refer to the fully-qualified ones.

The way this failed for you is interesting and different than how others have experienced it, but I think it still has the a similar root cause: something else in your configuration probably caused Terraform to determine that you _also_ need `hashicorp/aws`, but there’s no configuration block for _that_ provider in your configuration and so validation for it failed. Once everything is consistently using `hashicorp/aws` that problem should, I think, go away.
