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

Remove deprecated scaling attributes #4481

Merged
merged 7 commits into from
Oct 25, 2023

Conversation

omaraibrahim
Copy link
Collaborator

@omaraibrahim omaraibrahim commented Apr 5, 2023

Flat list scaling attributes are deprecated and should no longer be used per the following PRs:

This PR is to remove the attributes for good. Please refer to the docs here: https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/database#sample-database-instance-by-using-group-attributes for the current scaling attributes.

Many scaling attributes have been deprecated in favor of groups scaling. This PR is to officially remove them and update the tests.

For more details please about deprecated attributes see the following blog post: https://www.ibm.com/cloud/blog/announcements/new-features-and-rearchitecturing-of-ibm-cloud-databasess-terraform-provider

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

--- PASS: TestAccIBMEDBDatabaseInstanceBasic (2477.42s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database	2478.526s
...
--- PASS: TestAccIBMDatabaseInstancePostgresBasic (1340.07s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database	1341.194s
--- PASS: TestAccIBMDatabaseInstanceMongodbBasic (1335.59s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database	1336.688s
--- PASS: TestAccIBMDatabaseInstance_Redis_Basic (606.92s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database	608.043s
--- PASS: TestAccIBMDatabaseInstance_Rabbitmq_Basic (954.02s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database	955.137s
--- PASS: TestAccIBMMysqlDatabaseInstanceBasic (3631.32s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database	3632.396s
--- PASS: TestAccIBMDatabaseDataSource_basic (581.60s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database	586.346s

@omaraibrahim omaraibrahim changed the title Deprecate scaling attributes Remove deprecated scaling attributes Apr 10, 2023
@omaraibrahim omaraibrahim marked this pull request as ready for review July 17, 2023 15:01
service == "databases-for-cassandra" ||
service == "databases-for-enterprisedb" {
if planPhase {
groupDefaults, err := getDatabaseServiceDefaults(service, meta)
Copy link
Collaborator

Choose a reason for hiding this comment

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

getDatabaseServiceDefaults function appears unused and should be removed

func resourceIBMDatabaseInstanceDiff(_ context.Context, diff *schema.ResourceDiff, meta interface{}) (err error) {
err = flex.ResourceTagsCustomizeDiff(diff)
if err != nil {
return err
}

service := diff.Get("service").(string)
planPhase := diff.Get("plan_validation").(bool)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should also deprecate/remove plan_validation from the schema since it is no longer used

@alexhemard
Copy link
Collaborator

LGTM

@obai-1 obai-1 merged commit c66b863 into IBM-Cloud:master Oct 25, 2023
2 checks passed
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.

3 participants