alicloud_schedulerx_app_group
更新时间:
Provides a Schedulerx App Group resource.
For information about Schedulerx App Group and how to use it, see What is App Group.
-> NOTE: Available since v1.240.0.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
provider "alicloud" {
region = "cn-hangzhou"
}
resource "alicloud_schedulerx_namespace" "CreateNameSpace" {
namespace_name = var.name
description = var.name
}
resource "alicloud_schedulerx_app_group" "default" {
max_jobs = "100"
monitor_contacts_json = jsonencode([{ "userName" : "name1", "userPhone" : "89756******" }, { "userName" : "name2", "ding" : "http://www.example.com" }])
delete_jobs = "false"
app_type = "1"
namespace_source = "schedulerx"
group_id = "example-appgroup-pop-autoexample"
namespace_name = "default"
description = var.name
monitor_config_json = jsonencode({ "sendChannel" : "sms,ding" })
app_version = "1"
app_name = "example-appgroup-pop-autoexample"
namespace = alicloud_schedulerx_namespace.CreateNameSpace.namespace_uid
enable_log = "false"
schedule_busy_workers = "false"
}
Argument Reference
The following arguments are supported:
app_name
- (Required, ForceNew) Application Nameapp_type
- (Optional, Int) Application type.- 1, general application.
- 2, k8s application.
app_version
- (Optional) Application Version, 1: Basic Edition, 2: Professional Editiondelete_jobs
- (Optional) Whether to delete the task in the application Group. The values are as follows:true
: Delete.false
: Do not delete.
description
- (Optional) Application Descriptionenable_log
- (Optional) Whether to enable the log.- true: On
- false: Close
group_id
- (Required, ForceNew) Application IDmax_concurrency
- (Optional, Int) The maximum number of instances running at the same time. The default value is 1, that is, the last trigger is not completed, and the next trigger will not be performed even at the running time.max_jobs
- (Optional, ForceNew, Int) Application Grouping Configurable Maximum Number of Tasksmonitor_config_json
- (Optional) Alarm configuration JSON field. For more information about this field, see **Request Parameters * *.monitor_contacts_json
- (Optional) Alarm contact JSON format.namespace
- (Required, ForceNew) The namespace ID, which is obtained on the namespace page of the console.namespace_name
- (Required) The namespace name.namespace_source
- (Optional) Not supported for the time being, no need to fill in.schedule_busy_workers
- (Optional) Whether to schedule a busy machine.
Attributes Reference
The following attributes are exported:
id
- The ID of the resource supplied above.The value is formulated as<namespace>:<group_id>
.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the App Group.delete
- (Defaults to 5 mins) Used when delete the App Group.update
- (Defaults to 5 mins) Used when update the App Group.
Import
Schedulerx App Group can be imported using the id, e.g.
$ terraform import alicloud_schedulerx_app_group.example <namespace>:<group_id>
该文章对您有帮助吗?