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

cloud Databases Custom backup #553

Merged
merged 9 commits into from
Feb 8, 2024
Merged

cloud Databases Custom backup #553

merged 9 commits into from
Feb 8, 2024

Conversation

lpatte
Copy link
Contributor

@lpatte lpatte commented Feb 2, 2024

Description

Add field to let user define custom backup region, following the API.

Fixes asked feature on Discord

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Improvement (improve existing resource(s) or datasource(s))
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A: make testacc TESTARGS="-run TestAccCloudProjectDatabaseDataSource_basic"
  • Test B: make testacc TESTARGS="-run TestAccCloudProjectDatabase_basic"

Try locally with a resource

resource "ovh_cloud_project_database" "postgresql" {
  service_name = "xxxxxxxxxx"
  description = "postgresql-impolite-dirac"
  engine = "postgresql"
  version = "16"
  plan = "essential"
  flavor = "db1-7"
  nodes {
    region = "GRA"
  }
  backup_regions = ["GRA", "WAW"] # Default value is ["GRA", "SBG"]
  backup_time    = "02:00:00"  # Default value is "04:00:00"
}

Copy link
Contributor

@amstuta amstuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all CloudProjectDatabase tests are failing with error: OVHcloud API error (status code 400): Client::BadRequest: \"[backups.time] Given data () is not valid for type time. Expecting ISO 8601 data, such as \\\"15:04:05\\\"\"

@@ -108,6 +108,19 @@ func resourceCloudProjectDatabase() *schema.Resource {
},

//Optional/Computed
"backup_regions": {
Type: schema.TypeList,
Description: "List of region where backups are pushed. Not more than 1 regions for MongoDB. Not more than 2 regions for the other engines with one which is the same as the nodes[].region field",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Description: "List of region where backups are pushed. Not more than 1 regions for MongoDB. Not more than 2 regions for the other engines with one which is the same as the nodes[].region field",
Description: "List of region where backups are pushed. Not more than 1 regions for MongoDB. Not more than 2 regions for the other engines with one being the same as the nodes[].region field",

@amstuta amstuta merged commit 0d724ea into master Feb 8, 2024
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

Successfully merging this pull request may close these issues.

2 participants