Skip to content

Conversation

Zippo-Wang
Copy link
Collaborator

What this PR does / why we need it:
add new resource to restart nodes

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)
fixes #xxx

Special notes for your reviewer:

Release note:


PR Checklist

1.apply

1

2.plan

2

3.destroy

3

4.UT

4

@Zippo-Wang Zippo-Wang force-pushed the feat_instance_restart branch 4 times, most recently from 3a34f85 to 797f907 Compare August 25, 2025 03:45
* `region` - (Optional, String, ForceNew) Specifies the region in which to restart the RocketMQ instance.
If omitted, the provider-level region will be used. Changing this parameter will create a new resource.

* `instance_id` - (Required, String, NonUpdatable) Specifies the ID of the RocketMQ instance to be restarted.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* `instance_id` - (Required, String, NonUpdatable) Specifies the ID of the RocketMQ instance to be restarted.
* `instance_id` - (Required, String, NonUpdatable) Specifies the ID of the RocketMQ instance to which nodes belong.

Comment on lines 49 to 55
## Import

The RocketMQ instance restart resource cannot be imported.

## Timeouts

This resource does not support timeout configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## Import
The RocketMQ instance restart resource cannot be imported.
## Timeouts
This resource does not support timeout configuration.

Extra contents

Comment on lines 85 to 86
// Add nodes parameter to request body if specified
if nodesRaw := d.Get("nodes").([]interface{}); len(nodesRaw) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Add nodes parameter to request body if specified
if nodesRaw := d.Get("nodes").([]interface{}); len(nodesRaw) > 0 {

the behavior of parameter nodes is Required, these codes are unnecessary.

}
}

func resourceDmsRocketMQInstanceRestartCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
Copy link
Contributor

Choose a reason for hiding this comment

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

function name do not include DMSRocketMQ because of the package is already names rocketmq

@Zippo-Wang Zippo-Wang force-pushed the feat_instance_restart branch 5 times, most recently from 89c44b3 to 265ff09 Compare August 26, 2025 06:52
@Zippo-Wang Zippo-Wang force-pushed the feat_instance_restart branch from 265ff09 to 60bf7ff Compare August 26, 2025 08:14
@Lance52259
Copy link
Contributor

/approve
/lgtm

@github-ci-robot github-ci-robot added LGTM /lgtm approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 26, 2025
Copy link
Collaborator

@github-ci-robot github-ci-robot left a comment

Choose a reason for hiding this comment

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

This PR has been approved by: @Lance52259

/approve
/lgtm

@github-ci-robot github-ci-robot merged commit e326acf into huaweicloud:master Aug 26, 2025
12 checks passed
@Zippo-Wang Zippo-Wang deleted the feat_instance_restart branch August 27, 2025 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. feature LGTM /lgtm size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants