page_title | subcategory | description |
---|---|---|
morpheus_tag_policy Resource - terraform-provider-morpheus |
Provides a Morpheus tag policy resource |
Provides a Morpheus tag policy resource
Creating the policy with a global scope:
resource "morpheus_tag_policy" "tf_example_tag_policy_global" {
name = "tf_example_tag_policy_global"
description = "terraform example global tag policy"
enabled = true
strict_enforcement = true
tag_key = "cost_center"
option_list_id = 23
scope = "global"
}
Creating the policy with a cloud scope:
resource "morpheus_tag_policy" "tf_example_tag_policy_cloud" {
name = "tf_example_tag_policy_cloud"
description = "terraform example cloud tag policy"
enabled = true
strict_enforcement = true
tag_key = "cost_center"
option_list_id = 23
scope = "cloud"
cloud_id = 1
}
Creating the policy with a group scope:
resource "morpheus_tag_policy" "tf_example_tag_policy_group" {
name = "tf_example_tag_policy_group"
description = "terraform example group tag policy"
enabled = true
strict_enforcement = true
tag_key = "cost_center"
tag_value = "true"
option_list_id = 2
scope = "group"
group_id = 1
}
Creating the policy with a user scope:
resource "morpheus_tag_policy" "tf_example_tag_policy_user" {
name = "tf_example_tag_policy_user"
description = "terraform example user tag policy"
enabled = true
strict_enforcement = true
tag_key = "cost_center"
tag_value = "true"
option_list_id = 2
scope = "user"
user_id = 1
}
name
(String) The name of the tag policyscope
(String) The filter or scope that the policy is applied to (global, group, cloud, user)tag_key
(String) The key of the tag to enforce
cloud_id
(Number) The id of the cloud associated with the cloud scoped filterdescription
(String) The description of the tag policyenabled
(Boolean) Whether the policy is enabledgroup_id
(Number) The id of the group associated with the group scoped filteroption_list_id
(Number) The id of the option list associated with the policystrict_enforcement
(Boolean) Whether users will be able to provision new workloads if they violate the tag policytag_value
(String) The value of the tag to enforcetenant_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 tag policy
Import is supported using the following syntax:
terraform import morpheus_tag_policy.tf_example_tag_policy