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

fix kafka + add kafka_schema_registry attribute #623

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

lpatte
Copy link
Contributor

@lpatte lpatte commented Apr 19, 2024

Description

  • Fix an issue on Kafka update and/or create (when kafka_rest_api or advanced_configuration set).
    • Kafka update API does not have backups field, this is a corner case of the resource ovh_cloud_project_database
  • Add kafka_schema_registry attribute, following API

Fixe an issue reported directly to me.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (improve existing resource(s) or datasource(s))
  • Documentation update

opts.Backups = CloudProjectDatabaseBackups{
Regions: regions,
Time: d.Get("backup_time").(string),
if engine != "kafka" && (len(regions) != 0 || time != "") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

not the same check as in CloudProjectDatabaseCreateOpts.fromResource ? (no engine != "kafka" there)

Copy link
Contributor Author

@lpatte lpatte Apr 22, 2024

Choose a reason for hiding this comment

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

backups field is ignored for a lot of engine in API (because the engine has not backup or backup not configurable) in POST and PUT, Kafka is the only engine where the schema of the PUT do not has backups fields. So this engine != "kafka" will ignore backups attribute for Kafka when update, no need to add this in CloudProjectDatabaseCreateOpts.fromResource because our API already ignore this field

@amstuta amstuta merged commit 0c2b254 into master Apr 22, 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