terraform-provider-ovh icon indicating copy to clipboard operation
terraform-provider-ovh copied to clipboard

manage m3db default namespace

Open lpatte opened this issue 4 months ago • 1 comments

Description

M3DB is created with a "default" namespace that can be updated. Like we already do for "avnadmin" user, I add a special case when we create a ovh_cloud_project_database_m3db_namespace with the name "default" to map the existing namespace instead of trying to create a new namespace. With This change, the user can manage the "default" namespace like other and remove the resource will not delete it just unmap it.

Fixes #752

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Test Configuration:

  • Existing HCL configuration you used:
resource "ovh_cloud_project_database" "m3db" {
    service_name = "XXXXXXXXX"
    engine       = "m3db"
    version      = "1.5"
    plan         = "essential"
    nodes {
        region     = "GRA"
    }
    flavor = "db1-7"
}

resource "ovh_cloud_project_database_m3db_namespace" "namespace" {
  service_name              = ovh_cloud_project_database.m3db.service_name
  cluster_id                = ovh_cloud_project_database.m3db.id
  name                      = "testns"
  resolution                = "P2D"
  retention_period_duration = "PT48H"
}

resource "ovh_cloud_project_database_m3db_namespace" "defaultns" {
  service_name              = ovh_cloud_project_database.m3db.service_name
  cluster_id                = ovh_cloud_project_database.m3db.id
  name                      = "default"
  resolution                = "PT1H"
  retention_period_duration = "P5D"

lpatte avatar Oct 22 '24 14:10 lpatte