You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
Confirmation
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
The text was updated successfully, but these errors were encountered: