@@ -47,86 +47,33 @@ limitations under the License.
47
47
*/
48
48
49
49
# commands to run this tf file : terraform init && terraform apply --auto-approve
50
-
51
- # To get the resource_group_id you can use the powerflex_resource_group data source as shown below:
52
-
53
50
# Get all Resource Group details present in the PowerFlex
54
- data "powerflex_resource_group" "example1" {
55
- }
56
-
57
- # Get Resource Group details using the Name of the Resource Group
58
- data "powerflex_resource_group" "example3" {
59
- resource_group_names = ["Name_1", "Name_2"]
60
- }
61
-
62
- # Get all compliance report details for the given resource group
63
- data "powerflex_compliance_report_resource_group" "complianceReport" {
64
- resource_group_id = "ID"
51
+ data "powerflex_compliance_report_resource_group" "example1" {
65
52
}
66
53
67
- # Get compliance report details for the given resource group filtered by given ipaddresses
68
- data "powerflex_compliance_report_resource_group" "complianceReport" {
69
- resource_group_id = "ID"
70
- # this datasource supports multiple filters like ip_addresses, host_names, service_tags, resource_ids, compliant
71
- # and gives an intersection of the results
72
- filter {
73
- ip_addresses = ["10.xxx.xxx.xx", "10.xxx.xxx.xx"]
74
- }
75
- }
76
-
77
- # Get compliance report details for the given resource group filtered by resource ids and compliant status
78
- data "powerflex_compliance_report_resource_group" "complianceReport" {
79
- resource_group_id = "ID"
80
- # this datasource supports multiple filters like ip_addresses, host_names, service_tags, resource_ids, compliant
81
- # and gives an intersection of the results
82
- filter {
83
- resource_ids = ["resourceid1", "resourceid2"]
84
- compliant = true
85
- }
86
- }
87
-
88
- # Get compliance report details for the given resource group filtered by compliant resources
89
- data "powerflex_compliance_report_resource_group" "complianceReport" {
90
- resource_group_id = "ID"
91
- # this datasource supports multiple filters like ip_addresses, host_names, service_tags, resource_ids, compliant
92
- # and gives an intersection of the results
93
- filter {
94
- compliant = true
95
- }
96
- }
97
-
98
- # Get compliance report details for the given resource group filtered by hostnames
99
- data "powerflex_compliance_report_resource_group" "complianceReport" {
100
- resource_group_id = "ID"
101
- # this datasource supports multiple filters like ip_addresses, host_names, service_tags, resource_ids, compliant
102
- # and gives an intersection of the results
103
- filter {
104
- host_names = ["hostname1", "hostname2"]
105
- }
106
- }
107
-
108
- # Get compliance report details for the given resource group filtered by service tags
109
- data "powerflex_compliance_report_resource_group" "complianceReport" {
110
- resource_group_id = "ID"
111
- # this datasource supports multiple filters like ip_addresses, host_names, service_tags, resource_ids, compliant
112
- # and gives an intersection of the results
113
- filter {
114
- service_tags = ["servicetag1", "servicetag2"]
115
- }
116
- }
117
-
118
- # Get compliance report details for the given resource group filtered by resource ids
119
- data "powerflex_compliance_report_resource_group" "complianceReport" {
120
- resource_group_id = "ID"
121
- # this datasource supports multiple filters like ip_addresses, host_names, service_tags, resource_ids, compliant
122
- # and gives an intersection of the results
123
- filter {
124
- resource_ids = ["resourceid1", "resourceid2"]
125
- }
126
- }
54
+ # this datasource supports multiple filters like ip_address, host_name, service_tag, compliant,etc.
55
+ # Note: If both filters are used simultaneously, the results will include any records that match either of the filters.
56
+ # data "powerflex_compliance_report_resource_group" "complianceReport" {
57
+ # filter {
58
+ # firmware_repository_name = ["name1", "name2"]
59
+ # device_type = ["devicetype1", "devicetype2"]
60
+ # model = ["model1", "model2"]
61
+ # resource_ids = ["resourceid1", "resourceid2"]
62
+ # service_tag = ["servicetag1", "servicetag2"]
63
+ # compliant = true
64
+ # embedded_report = true
65
+ # can_update = true
66
+ # available = true
67
+ # device_state = ["devicestate1", "devicestate2"]
68
+ # managed_state = ["managedstate1", "managedstate2"]
69
+ # host_name = ["hostname1", "hostname2"]
70
+ # id = ["id1", "id2"]
71
+ # ip_address = ["ip1", "ip2"]
72
+ # }
73
+ # }
127
74
128
75
output "result" {
129
- value = data.powerflex_compliance_report_resource_group.complianceReport
76
+ value = data.powerflex_compliance_report_resource_group.example1
130
77
}
131
78
```
132
79
@@ -135,10 +82,6 @@ After the successful execution of above said block, we can see the output by exe
135
82
<!-- schema generated by tfplugindocs -->
136
83
## Schema
137
84
138
- ### Required
139
-
140
- - ` resource_group_id ` (String) Unique id Of resource group for which you want to get the compliance report. Conflicts with resource_group_name
141
-
142
85
### Optional
143
86
144
87
- ` filter ` (Block, Optional) (see [ below for nested schema] ( #nestedblock--filter ) )
@@ -153,11 +96,19 @@ After the successful execution of above said block, we can see the output by exe
153
96
154
97
Optional:
155
98
156
- - ` compliant ` (Boolean) Compliant status for resources.
157
- - ` host_names ` (Set of String) List of host names for resources.
158
- - ` ip_addresses ` (Set of String) List of Ip Address for resources.
159
- - ` resource_ids ` (Set of String) List of resource ids.
160
- - ` service_tags ` (Set of String) List of service tags for resources.
99
+ - ` available ` (Boolean) Value for available
100
+ - ` can_update ` (Boolean) Value for can_update
101
+ - ` compliant ` (Boolean) Value for compliant
102
+ - ` device_state ` (Set of String) List of device_state
103
+ - ` device_type ` (Set of String) List of device_type
104
+ - ` embedded_report ` (Boolean) Value for embedded_report
105
+ - ` firmware_repository_name ` (Set of String) List of firmware_repository_name
106
+ - ` host_name ` (Set of String) List of host_name
107
+ - ` id ` (Set of String) List of id
108
+ - ` ip_address ` (Set of String) List of ip_address
109
+ - ` managed_state ` (Set of String) List of managed_state
110
+ - ` model ` (Set of String) List of model
111
+ - ` service_tag ` (Set of String) List of service_tag
161
112
162
113
163
114
<a id =" nestedatt--compliance_reports " ></a >
0 commit comments