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

ZIA DLP Engine Predefined Engine not found #216

Closed
tiwari3010 opened this issue Mar 27, 2023 · 3 comments · Fixed by #217
Closed

ZIA DLP Engine Predefined Engine not found #216

tiwari3010 opened this issue Mar 27, 2023 · 3 comments · Fixed by #217
Assignees
Labels
type/enhancement New feature or request

Comments

@tiwari3010
Copy link

tiwari3010 commented Mar 27, 2023

Not sure if this is bug, I am opening this as a question:

Affected Resource(s)
trying to create DLP policy using predefined engine (HIPAA or GBLA).

Use below code for getting the ID from name:

Terraform provider version:

terraform -version
Terraform v1.3.6
on darwin_amd64
+ provider registry.terraform.io/zscaler/zia v2.4.6
data "zia_dlp_engines" "predefinedEngineName"{
  name  = "GBLA"
}

Got error

module.zia_dlp_policies.data.zia_dlp_dictionaries.dlp_dictionaries[0]: Read complete after 3s [name=GET_SSN_KEYWORD]
╷
│ Error: no dlp engine found with name: GBLA
│ 
│   with module.zia_dlp_policies.data.zia_dlp_engines.predefinedEngineName,
│   on ../modules/data.tf line 20, in data "zia_dlp_engines" "predefinedEngineName":
│   20: data "zia_dlp_engines" "predefinedEngineName"{
│ 
╵

Expected Behavior
Terraform should be able to resolve predefined engine to ID to be used in policy.

Actual Behavior
Terraform is able to add custom created DLP Engines but not predefined engines.

When using the Actual ID, terraform is able to Add the engine to the policy.

@willguibr
Copy link
Member

Hi @tiwari3010 This functionally (Search By name) is not currently supported by the provider due to API limitations. We are exploring other options to allow for search methods; however, at the moment you can search based on ID.
The recommended way currently is to retrieve the IDs via Postman and use those attributes in your HCL in the following form:

data "zia_dlp_engines" "id" {
  id = 62
}

output "zia_dlp_engines" {
  value = data.zia_dlp_engines.id
}

@willguibr willguibr self-assigned this Mar 28, 2023
@willguibr willguibr added bug type/enhancement New feature or request labels Mar 28, 2023
@willguibr willguibr linked a pull request Mar 28, 2023 that will close this issue
@tiwari3010
Copy link
Author

tiwari3010 commented Mar 28, 2023 via email

@willguibr
Copy link
Member

Hi @tiwari3010 We've deployed a fix for the dlp predefined engine search and it will be available in the next minor release v2.5.1 in upcoming weeks.
As for API roadmap, I am not aware of it, so I'd recommend reaching out to your TAM or Accounting team so they can check with Product management and engineering in this matter. Once the methods are available, the implementation at the provider can be completed without problems.

Regards

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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants