alicloud_max_compute_quota_plan
Provides a Max Compute Quota Plan resource.
For information about Max Compute Quota Plan and how to use it, see What is Quota Plan.
-> NOTE: Available since v1.242.0.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
provider "alicloud" {
region = "cn-hangzhou"
}
variable "elastic_reserved_cu" {
default = "50"
}
resource "alicloud_max_compute_quota_plan" "default" {
nickname = "os_terrform_p"
quota {
parameter {
elastic_reserved_cu = var.elastic_reserved_cu
}
sub_quota_info_list {
nick_name = "sub_quota"
parameter {
min_cu = "0"
max_cu = "20"
elastic_reserved_cu = var.elastic_reserved_cu
}
}
sub_quota_info_list {
nick_name = "os_terrform"
parameter {
min_cu = "50"
max_cu = "50"
elastic_reserved_cu = "0"
}
}
}
plan_name = "quota_plan"
}
Argument Reference
The following arguments are supported:
is_effective
- (Optional) Whether to take effect immediately. “Valid values: true”
.-> NOTE: when other quota plans in the same quota group take effect, the effective quota group will become invalid. That is, IsEffective will become false. The effective quota plan cannot be deleted.nickname
- (Required, ForceNew) Quota Nameplan_name
- (Required, ForceNew) The Quota plan name. Start with a letter, containing letters, numbers, and underscores (_). It is no more than 64 characters long.quota
- (Optional, ForceNew, List) Quota property Seequota
below.
quota
The quota supports the following:
parameter
- (Optional, ForceNew, List) The parameters of level-1 quota. Seeparameter
below.sub_quota_info_list
- (Optional, ForceNew, Set) Secondary Quota list
-> NOTE: need to list all secondary Quota
See sub_quota_info_list
below.
quota-parameter
The quota-parameter supports the following:
elastic_reserved_cu
- (Required, Int) The value of elastic Reserved CUs.
quota-sub_quota_info_list
The quota-sub_quota_info_list supports the following:
nick_name
- (Required, ForceNew) The nickname of the level-2 quota.parameter
- (Optional, List) Level 2 Quota CU configuration Seeparameter
below.
quota-sub_quota_info_list-parameter
The quota-sub_quota_info_list-parameter supports the following:
elastic_reserved_cu
- (Required, Int) The value of elastic Reserved CUs.
-> NOTE: The total number of elastically reserved CUs in all the level-2 quotas is equal to the number of elastically reserved CUs in the level-1 quota..
max_cu
- (Required, Int) The value of maxCU in Reserved CUs.
-> NOTE: The value of maxCU must be less than or equal to the value of maxCU in the level-1 quota that you purchased.
min_cu
- (Required, Int) The value of minCU in Reserved CUs.
-> NOTE: -- The total value of minCU in all the level-2 quotas is equal to the value of minCU in the level-1 quota. -- The value of minCU must be less than or equal to the value of maxCU in the level-2 quota and less than or equal to the value of minCU in the level-1 quota that you purchased.
Attributes Reference
The following attributes are exported:
id
- The ID of the resource supplied above.The value is formulated as<nickname>:<plan_name>
.quota
- Quota propertyparameter
- The parameters of level-1 quota.max_cu
- The value of maxCU in Reserved CUs.min_cu
- The value of minCU in Reserved CUs.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Quota Plan.delete
- (Defaults to 5 mins) Used when delete the Quota Plan.update
- (Defaults to 5 mins) Used when update the Quota Plan.
Import
Max Compute Quota Plan can be imported using the id, e.g.
$ terraform import alicloud_max_compute_quota_plan.example <nickname>:<plan_name>