alicloud_resource_manager_resource_directory

更新时间:

Provides a Resource Manager Resource Directory resource. Resource Directory enables you to establish an organizational structure for the resources used by applications of your enterprise. You can plan, build, and manage the resources in a centralized manner by using only one resource directory.

For information about Resource Manager Resource Directory and how to use it, see What is Resource Manager Resource Directory.

-> NOTE: Available since v1.84.0.

-> NOTE: An account can only be used to enable a resource directory after it passes enterprise real-name verification. An account that only passed individual real-name verification cannot be used to enable a resource directory.

-> NOTE: Before you destroy the resource, make sure that the following requirements are met:

  • All member accounts must be removed from the resource directory.
  • All folders except the root folder must be deleted from the resource directory.

Example Usage

Basic Usage


data "alicloud_resource_manager_resource_directories" "default" {
}

resource "alicloud_resource_manager_resource_directory" "default" {
  count  = length(data.alicloud_resource_manager_resource_directories.default.directories) > 0 ? 0 : 1
  status = "Enabled"
}

Argument Reference

The following arguments are supported:

  • status - (Optional, Available since v1.120.0) The status of control policy. Valid values:Enabled and Disabled.
  • member_deletion_status - (Optional, Available since v1.201.0) Specifies whether to enable the member deletion feature. Valid values:Enabled and Disabled.

Attributes Reference

  • id - The ID of the resource directory.
  • root_folder_id - The ID of the root folder.
  • master_account_id - The ID of the master account.
  • master_account_name - The name of the master account.

-> NOTE: Available since v1.120.0.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • update - (Defaults to 6 mins) Used when update the control policy status.

Import

Resource Manager Resource Directory can be imported using the id, e.g.

$ terraform import alicloud_resource_manager_resource_directory.example rd-s3****