title | linkTitle | page_title | subcategory | description |
---|---|---|---|---|
powerflex_compliance_report_resource_group data source |
powerflex_compliance_report_resource_group |
powerflex_compliance_report_resource_group Data Source - powerflex |
Resource and Credential Management |
This datasource is used to query the compliance report for Resource Group from PowerFlex array. |
This datasource is used to query the compliance report for Resource Group from PowerFlex array.
/*
Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://mozilla.org/MPL/2.0/
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
# commands to run this tf file : terraform init && terraform apply --auto-approve
# Get all Resource Group details present in the PowerFlex
data "powerflex_compliance_report_resource_group" "example1" {
}
# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_compliance_report_resource_group" "compliance_report_resource_group_filter_regex" {
# filter{
# name = ["^System_.*$"]
# model = ["^Powerflex.*$"]
# }
# }
# output "complianceReportResourceGroupFilterRegexResult"{
# value = data.powerflex_compliance_report_resource_group.compliance_report_resource_group_filter_regex.compliance_reports
# }
# this datasource supports multiple filters like ip_address, host_name, service_tag, compliant,etc.
# Note: If both filters are used simultaneously, the results will include any records that match either of the filters.
# data "powerflex_compliance_report_resource_group" "complianceReport" {
# filter {
# firmware_repository_name = ["name1", "name2"]
# device_type = ["devicetype1", "devicetype2"]
# model = ["model1", "model2"]
# service_tag = ["servicetag1", "servicetag2"]
# compliant = true
# embedded_report = true
# can_update = true
# available = true
# device_state = ["devicestate1", "devicestate2"]
# managed_state = ["managedstate1", "managedstate2"]
# host_name = ["hostname1", "hostname2"]
# id = ["id1", "id2"]
# ip_address = ["ip1", "ip2"]
# }
# }
output "result" {
value = data.powerflex_compliance_report_resource_group.example1.compliance_reports
}
After the successful execution of above said block, we can see the output by executing terraform output
command. Also, we can fetch information via the variable: data.powerflex_compliance_report_resource_group.datasource_block_name.attribute_name
where datasource_block_name is the name of the data source block and attribute_name is the attribute which user wants to fetch.
filter
(Block, Optional) (see below for nested schema)
compliance_reports
(Attributes List) List of compliance report. (see below for nested schema)id
(String) Unique identifier Of The compliance report Datasource.
Optional:
available
(Boolean) Value for availablecan_update
(Boolean) Value for can_updatecompliant
(Boolean) Value for compliantdevice_state
(Set of String) List of device_statedevice_type
(Set of String) List of device_typeembedded_report
(Boolean) Value for embedded_reportfirmware_repository_name
(Set of String) List of firmware_repository_namehost_name
(Set of String) List of host_nameid
(Set of String) List of idip_address
(Set of String) List of ip_addressmanaged_state
(Set of String) List of managed_statemodel
(Set of String) List of modelservice_tag
(Set of String) List of service_tag
Read-Only:
available
(Boolean) The availability status of the device.can_update
(Boolean) The update capability of the resource group.compliant
(Boolean) The compliance status of the resource.device_state
(String) The state of the device.device_type
(String) The type of the device.embedded_report
(Boolean) The presence of an embedded report.firmware_compliance_report_components
(Attributes List) The list of firmware compliance report components. (see below for nested schema)firmware_repository_name
(String) The name of the firmware repository.host_name
(String) The hostname of the resource group.id
(String) The unique identifier of the resource group.ip_address
(String) The IP address of the resource.managed_state
(String) The managed state of the device.model
(String) The model of the device.service_tag
(String) The service tag of the resource.
Read-Only:
compliant
(Boolean) The compliance status of the component.current_version
(Attributes) The current version of the component. (see below for nested schema)id
(String) The unique identifier of the component.name
(String) The name of the component.operating_system
(String) The operating system of the component.os_compatible
(Boolean)rpm
(Boolean)software
(Boolean)target_version
(Attributes) The target version of the component. (see below for nested schema)vendor
(String) The vendor of the component.
Read-Only:
firmware_last_update
(String) The last update time of the firmware.firmware_level
(String) The level of the firmware.firmware_name
(String) The name of the firmware.firmware_type
(String) The type of the firmware.firmware_version
(String) The version of the firmware.id
(String) The unique identifier of the version.
Read-Only:
firmware_last_update
(String) The last update time of the firmware.firmware_level
(String) The level of the firmware.firmware_name
(String) The name of the firmware.firmware_type
(String) The type of the firmware.firmware_version
(String) The version of the firmware.id
(String) The unique identifier of the version.