Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLP Dictionary Clone error for Driver's License #360

Closed
tiwari3010 opened this issue Jul 18, 2024 · 1 comment · Fixed by #361
Closed

DLP Dictionary Clone error for Driver's License #360

tiwari3010 opened this issue Jul 18, 2024 · 1 comment · Fixed by #361
Assignees
Labels
type/enhancement New feature or request

Comments

@tiwari3010
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Affected Resource(s)

  • ZIA v2.91.4
  • Terraform v1.5.7

Terraform Configuration Files

Trying to clone Driver’s License (United States) dictionary using terraform.

resource "zia_dlp_dictionaries" "dlp_dictionaries" {
  name        = "${var.dlp_dictionaries_name}_predefined_dic_tf"
  description = "Terraform ${var.dlp_dictionaries_description}_predefined_prod_dic"
  dynamic "phrases" {
    for_each = var.dlp_phrases
    content {
      action = "PHRASE_COUNT_TYPE_ALL"
      phrase = phrases.value
    }
  }
  custom_phrase_match_type = "MATCH_ALL_CUSTOM_PHRASE_PATTERN_DICTIONARY"
  dictionary_type          = "PATTERNS_AND_PHRASES"
  dict_template_id         = var.dict_template_id
  confidence_threshold     = var.confidence_threshold
}
dlp_dictionaries_name        = "driver_license_us_high"
dlp_dictionaries_description = "Driver license Numbers for US Where Confidence Level is High"
dlp_phrases                  = []
dict_template_id             = "170"
confidence_threshold         = "CONFIDENCE_LEVEL_HIGH" # "CONFIDENCE_LEVEL_LOW", "CONFIDENCE_LEVEL_MEDIUM", "CONFIDENCE_LEVEL_HIGH"

Panic Output

zia_dlp_dictionaries.dlp_dictionaries: Creating...

│ Error: FAILED: POST, https://zsapi.zscalertwo.net/api/v1/dlpDictionaries, 400, 400 , {"message":"Atleast 1 hierarchical identifier should be selected for hierarchical dictionaries"}, api responded with code: 400

│ with zia_dlp_dictionaries.dlp_dictionaries,
│ on main.tf line 1, in resource "zia_dlp_dictionaries" "dlp_dictionaries":
│ 1: resource "zia_dlp_dictionaries" "dlp_dictionaries" {

Expected Behavior

The dictionary should be created as a clone for Driver's License.

Actual Behavior

Steps to Reproduce

  1. terraform apply

gives below error

 Error: FAILED: POST, https://zsapi.zscalertwo.net/api/v1/dlpDictionaries, 400, 400 , {"message":"Atleast 1 hierarchical identifier should be selected for hierarchical dictionaries"}, api responded with code: 400

Important Factoids

References

as per the documentation hierarchical identifiers needs to be passed


hierarchicalIdentifiers
array[string]
The list of identifiers selected within a DLP dictionary of hierarchical type. Each identifier represents a sub-dictionary that consists of specific patterns. To retrieve the list of identifiers that are available for selection within a specific hierarchical dictionary, send a GET request to /dlpDictionaries/{dictId}/predefinedIdentifiers.

To learn about hierarchical dictionaries, see [Configuring the URL Filtering Policy](https://help.zscaler.com/zia/understanding-predefined-dlp-dictionaries).

Note: This field is applicable to predefined hierarchical dictionaries, such as the Driver’s License (United States), Passport Number (European Union), and Credentials and Secrets dictionaries or their clones.
@willguibr willguibr self-assigned this Jul 18, 2024
@willguibr willguibr added the type/enhancement New feature or request label Jul 24, 2024
@willguibr
Copy link
Member

@tiwari3010 hierarchical_identifiers is a new attribute, and not yet supported in the provider. It will be included in the next release.
Thank you

@willguibr willguibr linked a pull request Jul 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
Status: 🚀 Shipped
Development

Successfully merging a pull request may close this issue.

2 participants