alicloud_ecs_image_components
更新时间:
This data source provides the Ecs Image Components of the current Alibaba Cloud user.
-> NOTE: Available in v1.159.0+.
Example Usage
Basic Usage
data "alicloud_ecs_image_components" "ids" {
ids = ["example_id"]
}
output "ecs_image_component_id_1" {
value = data.alicloud_ecs_image_components.ids.components.0.id
}
data "alicloud_ecs_image_components" "nameRegex" {
name_regex = "^my-ImageComponent"
}
output "ecs_image_component_id_2" {
value = data.alicloud_ecs_image_components.nameRegex.components.0.id
}
Argument Reference
The following arguments are supported:
ids- (Optional, ForceNew, Computed) A list of Image Component IDs.image_component_name- (Optional, ForceNew) The name of the component.name_regex- (Optional, ForceNew) A regex string to filter results by Image Component name.output_file- (Optional) File name where to save data source results (after runningterraform plan).owner- (Optional, ForceNew) Mirror component type. Valid values:SELForALIYUN. Possible values:- SELF: The custom image component you created.
- ALIYUN: System components provided by Alibaba Cloud.
resource_group_id- (Optional, ForceNew) The ID of the resource group.tags- (Optional, ForceNew) A mapping of tags to assign to the resource.
Argument Reference
The following attributes are exported in addition to the arguments listed above:
names- A list of Image Component names.components- A list of Ecs Image Components. Each element contains the following attributes:component_type- The type of the image component.content- The content of the image component.create_time- The time when the image component was created.description- The description of the image component.id- The ID of the Image Component.image_component_id- The ID of the image component.image_component_name- The name of the image component.owner- The type of the image component.resource_group_id- The ID of the resource group.system_type- The operating system type supported by the image component.tags- List of label key-value pairs.tag_key- The key of the tag.tag_value- The value of the tag.
该文章对您有帮助吗?