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

[BUG] m3db backup_time can not be set #751

Open
markush81 opened this issue Oct 15, 2024 · 1 comment
Open

[BUG] m3db backup_time can not be set #751

markush81 opened this issue Oct 15, 2024 · 1 comment

Comments

@markush81
Copy link

markush81 commented Oct 15, 2024

Describe the bug

Setting backup_time for m3db fails

│ Error: calling Post /cloud/project/ef39d2fc88aa4227ba3e4f71abb11d57/database/m3db with params &{Backups:0x140005b6960 Description:default Disk:{Type: Size:160} IPRestrictions:[{Description:Internal ovh0 IP:10.20.0.0/16}] MaintenanceTime:00:00:00 NetworkId:f7d953f0-4ec0-4306-bfce-2f6aa1b7ae3c NodesPattern:{Flavor:db1-7 Number:1 Region:DE} Plan:essential SubnetId:0221cad6-9ed1-4937-939e-41660235fba3 Version:1.5}:
│ 	 "OVHcloud API error (status code 400): Client::BadRequest::BackupTimeNotAvailable: \"backup time definition is not available for engine m3db\" (X-OVH-Query-Id: EU.ext-2.670e4aac.2420636.934c90bd42a47f8f64d1278c4d5e3abd)"
│ 
│   with ovh_cloud_project_database.m3db["default"],
│   on m3db.tf line 1, in resource "ovh_cloud_project_database" "m3db":
│    1: resource "ovh_cloud_project_database" "m3db" {

Terraform Version

Terraform v1.9.3
on darwin_arm64
+ provider registry.terraform.io/ovh/ovh v0.51.0

Your version of Terraform is out of date! The latest version
is 1.9.7. You can update by downloading from https://www.terraform.io/downloads.html

OVH Terraform Provider Version

+ provider registry.terraform.io/ovh/ovh v0.51.0

Affected Resource(s)

Please list the resources as a list, for example:

  • ovh_cloud_project_database

Terraform Configuration Files

  + resource "ovh_cloud_project_database" "m3db" {
      + advanced_configuration = (known after apply)
      + backup_regions         = [
          + "DE",
          + "GRA",
        ]
      + backup_time            = "05:00:00"
      + created_at             = (known after apply)
      + description            = "default"
      + disk_size              = 160
      + disk_type              = (known after apply)
      + endpoints              = (known after apply)
      + engine                 = "m3db"
      + flavor                 = "db1-7"
      + id                     = (known after apply)
      + maintenance_time       = "00:00:00"
      + network_type           = (known after apply)
      + plan                   = "essential"
      + service_name           = "..."
      + status                 = (known after apply)
      + version                = "1.5"

      + ip_restrictions {
          + description = "Internal ovh0"
          + ip          = "..."
          + status      = (known after apply)
        }

      + nodes {
          + network_id = "..."
          + region     = "DE"
          + subnet_id  = "..."
        }
    }

Expected Behavior

Backup Time can be set.

Actual Behavior

│ Error: calling Post /cloud/project/ef39d2fc88aa4227ba3e4f71abb11d57/database/m3db with params &{Backups:0x140005b6960 Description:default Disk:{Type: Size:160} IPRestrictions:[{Description:Internal ovh0 IP:10.20.0.0/16}] MaintenanceTime:00:00:00 NetworkId:f7d953f0-4ec0-4306-bfce-2f6aa1b7ae3c NodesPattern:{Flavor:db1-7 Number:1 Region:DE} Plan:essential SubnetId:0221cad6-9ed1-4937-939e-41660235fba3 Version:1.5}:
│ 	 "OVHcloud API error (status code 400): Client::BadRequest::BackupTimeNotAvailable: \"backup time definition is not available for engine m3db\" (X-OVH-Query-Id: EU.ext-2.670e4aac.2420636.934c90bd42a47f8f64d1278c4d5e3abd)"
│ 
│   with ovh_cloud_project_database.m3db["default"],
│   on m3db.tf line 1, in resource "ovh_cloud_project_database" "m3db":
│    1: resource "ovh_cloud_project_database" "m3db" {

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
@amstuta
Copy link
Contributor

amstuta commented Oct 16, 2024

Hello @markush81, this limitation comes from the API where backup_time cannot be set on some engines. We'll fix the documentation with the list of these engines, and add a check in the schema so that the error is returned without having to call the API.

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

2 participants