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

feature(Cloud Databases): Group scaling #3699

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

alexhemard
Copy link
Collaborator

@alexhemard alexhemard commented Mar 30, 2022

Add support for scaling database resources by group ID See: https://cloud.ibm.com/apidocs/cloud-databases-api/cloud-databases-api-v5#setdeploymentscalinggroup

  • Adds a TypeSet group that specifies resource scaling values per group

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:

$ make testacc TESTARGS='-run=TestAccIBMDatabaseInstance'
...
--- PASS: TestAccIBMDatabaseInstanceMongodbBasic (1289.33s)
--- PASS: TestAccIBMDatabaseInstancePostgresBasic (2474.62s)
--- PASS: TestAccIBMDatabaseInstancePostgresGroup (2479.23s)
--- PASS: TestAccIBMDatabaseInstancePostgresNode (1988.01s)
--- PASS: TestAccIBMDatabaseInstance_Cassandra_Group (6696.65s)
--- PASS: TestAccIBMDatabaseInstance_Cassandra_Node (6569.76s)
--- PASS: TestAccIBMDatabaseInstance_Elasticsearch_Basic (1145.72s)
--- PASS: TestAccIBMDatabaseInstance_Elasticsearch_Group (1209.88s)
--- PASS: TestAccIBMDatabaseInstance_Elasticsearch_Node (2707.04s)
--- PASS: TestAccIBMDatabaseInstance_Etcd_Basic (935.39s)
--- PASS: TestAccIBMDatabaseInstance_Rabbitmq_Basic (963.79s)
--- PASS: TestAccIBMDatabaseInstance_Redis_Basic (866.89s)
...

@alexhemard alexhemard force-pushed the icd-scaling branch 6 times, most recently from 069ef21 to 465c050 Compare April 5, 2022 23:29
@alexhemard alexhemard force-pushed the icd-scaling branch 2 times, most recently from 0fbb873 to ca25ea9 Compare April 7, 2022 19:55
@@ -424,6 +435,71 @@ func ResourceIBMDatabaseInstance() *schema.Resource {
},
},
},
"group": {
Type: schema.TypeSet,
Optional: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Once we provisioned we should set in Read Method ? Can we Read and set back ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

For group do we have MaxItems limit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Once we provisioned we should set in Read Method ? Can we Read and set back ?

The groups attribute will be updated with the new values after Read. The group attribute should be used for setting values of the scaling request.

For group do we have MaxItems limit?

Like the groups attribute, there is no MaxItems limit, but group_ids must be valid and unique. This is validated in the CustomizeDiff function

ibm/service/database/resource_ibm_database.go Show resolved Hide resolved
@hkantare hkantare merged commit a5502aa into IBM-Cloud:master Apr 14, 2022
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