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

Issue with URL Category import #239

Open
2 tasks done
snowman386 opened this issue Dec 23, 2024 · 1 comment
Open
2 tasks done

Issue with URL Category import #239

snowman386 opened this issue Dec 23, 2024 · 1 comment

Comments

@snowman386
Copy link

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

zscaler-terraformer version

zscaler-terraformer v1.3.5 Terraform version: Terraform v1.10.3 on (windows_amd64)

Expected outcome

Expect url categories to be exported from ZIA and imported to terraform

Actual outcome

Getting an error on the URL export stage:
time="2024-12-23T16:26:57-05:00" level=info msg="failed to format output: exit status 2\n\nError: Invalid block definition\n\n on <stdin> line 369:\n 369: These domains appear in the ZIA Firewall Insights\n 370: Also in the <learn.microsoft.com> \"Microsoft 365 URL and IP address ranges\".\n\nA block definition must have block content delimited by \"{\" and \"}\", starting\non the same line as the block header.\n\n\nError: Invalid block definition\n\n on <stdin> line 371:\n 371: Until this is added to One Click Services\n 372: resource \"zia_url_categories\" \"resource_zia_url_categories_CUSTOM_28\" {\n\nA block definition must have block content delimited by \"{\" and \"}\", starting\non the same line as the block header.\n\n" terraform import zia_url_categories.resource_zia_url_categories_CUSTOM_06 CUSTOM_06 time="2024-12-23T16:26:57-05:00" level=info msg="[ERROR] error while running import: exit status 1\nError: resource address \"zia_url_categories.resource_zia_url_categories_CUSTOM_06\" does not exist in the configuration.\n\nBefore importing this resource, please create its configuration in the root module. For example:\n\nresource \"zia_url_categories\" \"resource_zia_url_categories_CUSTOM_06\" {\n # (resource arguments)\n}\n\n" terraform import zia_url_categories.resource_zia_url_categories_CUSTOM_10 CUSTOM_10 time="2024-12-23T16:26:58-05:00" level=info msg="[ERROR] error while running import: exit status 1\nError: resource address \"zia_url_categories.resource_zia_url_categories_CUSTOM_10\" does not exist in the configuration.\n\nBefore importing this resource, please create its configuration in the root module. For example:\n\nresource \"zia_url_categories\" \"resource_zia_url_categories_CUSTOM_10\" {\n # (resource arguments)\n}\n\n"

Steps to reproduce

Run zscaler-terraformer import --resources="zia" --zia_username="#####" --zia_password="######" --zia_api_key="#####" --zia_cloud="zscalerten"

References

No response

@snowman386
Copy link
Author

OK I fired up the API and found this exact string in a URL category. I thought it was a warning from zscaler about the URL existing in a firewall rule. The customer had entered a multiline comment in this url category. Seems terraformer does not support the import of multiline comments in url categories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant