-
Notifications
You must be signed in to change notification settings - Fork 165
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
feat(cfw): add resource CFW alarm configuration #6246
Conversation
58dd36b
to
f6d904b
Compare
854c589
to
2068665
Compare
/lgtm |
docs/resources/cfw_alarm.md
Outdated
Manages a CFW alarm resource within HuaweiCloud. | ||
--- | ||
|
||
# huaweicloud_cfw_alarm |
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.
# huaweicloud_cfw_alarm | |
# huaweicloud_cfw_alarm_config |
_, err = GetAlarm(deleteAlarmClient, fwInstanceID, alarmType) | ||
if err != nil { | ||
return common.CheckDeletedDiag(d, err, "error retrieving CFW alarm") | ||
} |
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.
when delete the resource, terraform will call Read func first, so we don't need to check it here
_, err = GetAlarm(deleteAlarmClient, fwInstanceID, alarmType) | |
if err != nil { | |
return common.CheckDeletedDiag(d, err, "error retrieving CFW alarm") | |
} |
docs/resources/cfw_alarm.md
Outdated
+ If `alarm_type` is **1**, the value of `severity` can be **0**, **1**, or **2**. | ||
+ If `alarm_type` is **2**, the value of `severity` must be **3**. |
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.
waht 0, 1, 2, 3 indicate?
Type: schema.TypeString, | ||
Required: true, | ||
Description: `Specifies the alarm URN.`, | ||
}, |
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.
missing parameter
"enable_force_new": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false),
Description: utils.SchemaDesc("", utils.SchemaDescInput{Internal: true}),
},
2068665
to
c2db626
Compare
c2db626
to
9e82298
Compare
9e82298
to
2d54739
Compare
2d54739
to
057a1b2
Compare
/approve |
/lgtm |
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.
This PR has been approved by: @Jason-Zhang9309
/approve
What this PR does / why we need it:
add resource CFW alarm
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
Documentation updated.
Schema updated.
CheckDeleted.
a. During query operation (Read Context)
aa. Resource not found
ab. Related resources (parent resources) not found
b. During delete/disassociate/unbind operation (Delete Context)
ba. Resource not found
bb. Related resources (parent resources) not found