-
Notifications
You must be signed in to change notification settings - Fork 137
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
manage m3db default namespace #761
Conversation
d.Set("service_name", serviceName) | ||
|
||
results := make([]*schema.ResourceData, 1) | ||
results[0] = d | ||
return results, nil | ||
} | ||
|
||
func toMap(d *schema.ResourceData) map[string]interface{} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you rename this func to something like m3dbNamespaceToMap
or equivalent ? toMap
seems very generic while the function isn't.
We do some rework of our API for M3DB namespace because several issues. |
@lpatte the PR itself is ok for me, but could you also update the associated tests ? It seems that all m3db-related tests are failing because the required config is not available anymore:
|
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
Other fixes :
retention_block_size_duration
cannot be update, addForceNew
retention_period_duration
is notrequired
butoptional
andcomputed
if not setsnapshot_enabled
andwrites_to_commit_log_enabled
arecomputed
if not setsnapshot_enabled
andwrites_to_commit_log_enabled
default value is not the same for "default" namespace (false) and other namespace (true). Add some logic to check if the attribute is set or not and let OVH apis return us the computed value if not set instead of set it to "false" when unsetOVH_CLOUD_PROJECT_DATABASE_M3DB_FLAVOR_TEST
in m3db testType of change
Please delete options that are not relevant.
How Has This Been Tested?
Test Configuration: