Random_password - Invalid resource type

Hello,

I’m trying to use for the first time this component but when I execute the plan I get this message:

Error: Invalid resource type
│
│   on rds.tf line 51, in resource "random_password" "password":
│   51: resource "random_password" "password" {
│
│ The provider hashicorp/tls does not support resource type "random_password".

Currently the provider is configured as:

    random = {
      source  = "hashicorp/tls"
      version = "3.1.0"
    }

I tried to upgrade to different versions but I always get the same error.

What am I doing wrong?

I don’t think that it matters but here is the rds.tf

resource "random_password" "password" {
  length           = 16
  special          = true
  override_special = "!#$%&*()-_=+[]{}:?"
}

resource "aws_db_instance" "main" {
[other values]
  password                        = random_password.password.result

Thank you in advance

You probably meant to require the module hashicorp/random instead of hashicorp/tls. And its latest version is 3.4.3 as you can see here.

1 Like

That was it, thanks man!

I gave for granted the the initial configuration it was provided was correct… but obviously it wasn’t :slight_smile:

1 Like