Skip to content

Commit

Permalink
Merge pull request #1225 from vmware/fix-sp-read
Browse files Browse the repository at this point in the history
Fix read in separate security policy rule resource
  • Loading branch information
annakhm authored Jun 6, 2024
2 parents b9a7d1f + 924fa89 commit 316cd64
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nsxt/policy_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,11 @@ func getPathListFromSchema(d *schema.ResourceData, schemaAttrName string) []stri
}

func setPathListInSchema(d *schema.ResourceData, attrName string, pathList []string) {
if !(len(pathList) == 1 && pathList[0] == "ANY") {
d.Set(attrName, pathList)
if len(pathList) == 1 && pathList[0] == "ANY" {
d.Set(attrName, nil)
return
}
d.Set(attrName, pathList)
}

func getDomainFromResourcePath(rPath string) string {
Expand Down

0 comments on commit 316cd64

Please sign in to comment.