Skip to content

Changing project database password fails #90

@adamstoffel

Description

@adamstoffel

Bug report

  • [x ] I confirm this is a bug with Supabase, not with my own application.
  • [x ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When rotating a password automatically with Terraform (e.g. the below), the supabase terraform provider fails:

resource "time_rotating" "supabase_password_rotation" {
  rotation_days = 90
}

resource "random_password" "supabase_password" {
  length           = 48
  special          = true
  override_special = "_"
}

resource "supabase_project" "my_project" {
  organization_id   = var.supabase_organization_id
  name              = var.project_name
  database_password = random_password.supabase_password.result
  region            = "us-west-1"
  instance_size     = "micro"
}

Terraform error:

╷
│ Error: Client Error
│ 
│   with supabase_project.my_project,
│   on supabase.tf line 19, in resource "supabase_project" "my_project":
│   19: resource "supabase_project" "my_project" {
│ 
│ Update is not supported for project resource: <supabase project ref redacted>
╵
Operation failed: failed running terraform apply (exit 1)
Error: Process completed with exit code 1.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Create terraform file with the above configuration (change rotation to a few sec or minutes)

Expected behavior

Terraform should successfully change the DB password

System information

Terraform HCP
Github actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions