page_title | subcategory | description |
---|---|---|
morpheus_budget_policy Resource - terraform-provider-morpheus |
Provides a Morpheus budget policy resource |
Provides a Morpheus budget policy resource
Creating the policy with a global scope:
resource "morpheus_budget_policy" "tf_example_budget_policy_global" {
name = "tf_example_budget_policy_global"
description = "terraform example global budget policy"
enabled = true
max_price = "4000"
currency = "USD"
unit_of_time = "hour"
scope = "global"
}
Creating the policy with a cloud scope:
resource "morpheus_budget_policy" "tf_example_budget_policy_cloud" {
name = "tf_example_budget_policy_cloud"
description = "terraform example cloud budget policy"
enabled = true
max_price = "4000"
currency = "USD"
unit_of_time = "hour"
scope = "cloud"
cloud_id = 1
}
Creating the policy with a group scope:
resource "morpheus_budget_policy" "tf_example_budget_policy_group" {
name = "tf_example_budget_policy_group"
description = "terraform example group budget policy"
enabled = true
max_price = "4000"
currency = "USD"
unit_of_time = "hour"
scope = "group"
group_id = 1
}
Creating the policy with a role scope:
resource "morpheus_budget_policy" "tf_example_budget_policy_role" {
name = "tf_example_budget_policy_role"
description = "terraform example role budget policy"
enabled = true
max_price = "4000"
currency = "USD"
unit_of_time = "hour"
scope = "role"
role_id = 1
apply_each_user = true
}
Creating the policy with a user scope:
resource "morpheus_budget_policy" "tf_example_budget_policy_user" {
name = "tf_example_budget_policy_user"
description = "terraform example user budget policy"
enabled = true
max_price = "4000"
currency = "USD"
unit_of_time = "hour"
scope = "user"
user_id = 1
}
currency
(String) The budget currencymax_price
(String) The max budget pricename
(String) The name of the budget policyscope
(String) The filter or scope that the policy is applied to (global, group, cloud, user, role)unit_of_time
(String) The unit of time to measure the budget (hour or month)
apply_to_each_user
(Boolean) Whether to assign the policy at the individual user level to all users assigned the associated rolecloud_id
(Number) The id of the cloud associated with the cloud scoped filterdescription
(String) The description of the budget policyenabled
(Boolean) Whether the policy is enabledgroup_id
(Number) The id of the group associated with the group scoped filterrole_id
(Number) The id of the role associated with the role scoped filtertenant_ids
(List of Number) A list of tenant IDs to assign the policy touser_id
(Number) The id of the user associated with the user scoped filter
id
(String) The ID of the budget policy
Import is supported using the following syntax:
terraform import morpheus_budget_policy.tf_example_budget_policy 1