-
Notifications
You must be signed in to change notification settings - Fork 1
/
data_source_nsxt_security_policy_rule.go
40 lines (33 loc) · 1.2 KB
/
data_source_nsxt_security_policy_rule.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/***************************************************************************
* ========================================================================
* Copyright 2022-2023 VMware, Inc. All rights reserved. VMware Confidential
* SPDX-License-Identifier: MPL-2.0
* ========================================================================
*/
// Auto generated code. DO NOT EDIT.
// nolint
package nsxt
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"log"
)
func dataSourceNsxtVpcSecurityPolicyRule() *schema.Resource {
additionalSchemaItems := map[string]*schema.Schema{} // Define any additional schema items specific to the data source
additionalSchemaItems["parent_path"] = &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
}
return &schema.Resource{
Read: dataSourceNsxtVpcSecurityPolicyRuleRead,
Schema: getDataSourceCommonSchema(additionalSchemaItems),
}
}
func dataSourceNsxtVpcSecurityPolicyRuleRead(d *schema.ResourceData, meta interface{}) error {
s := dataSourceNsxtVpcSecurityPolicyRule()
err := DatasourceRead(d, meta, "SecurityPolicyRule", s)
if err != nil {
log.Printf("[ERROR] in reading object %v\n", err)
}
return err
}