-
Notifications
You must be signed in to change notification settings - Fork 8
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
Sandbox rule order issue #405
Comments
You have to account for any pre-defined or pre-existing rule no managed via Terraform when setting your order numbers. Otherwise, Terraform will always attempt to reorder only the rules that in the desired state, while ignoring any existing rule. Also, rule 127 show in your configuration is named: Default BA Rule; however it's unclear if this rule is part of your HCL configuration. If it's not then we recommend to import this rule directly via terraform import, as it must be part of your HCL config, so that Terraform is aware of its pre-existence. If you have further questions, pleas raise a support case with Zscaler Support. Zscaler DevRel. |
Hi @willguibr |
How many rules do you have in total including the default? We should not have gaps between the rules you're creating and the default rule. |
There are 4 in the portal: 3 custom, 1 default. Trying to deploy a 4th custom. |
@willguibr I just commented out the new rule 4 for now so I can apply other settings. Let me know if you need me to gather any other debugs to figure out what is going on. |
There is a bug with the API behavior which returns the default rule with a fixed rule order of 127. Typically, default rules are supposed to be returned with a negative number i.e -1. We have raised the following BUG-208047 with out engineering team. Zscaler DevRel |
Hey @willguibr , Nothing life or death. We have survived without this tooling for a decade. Just trying to set up some pipelines from dev to prod and also have deployable templates for different customers. If we can't do sandbox rules right now, then we do them in the web console. We are still saving a lot of manual effort. Appreciate your support and help with the tools. Thanks |
Community Note
Terraform Version
Terraform v1.10.5
on windows_amd64
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/snowman386/5ee1949426de3165010aac872ec25ab9
Panic Output
Expected Behavior
Add a new rule 4 to the sandbox inspection policies
Actual Behavior
The debug shows it is trying to modify the default rule 127 instead of creating a new rule 4
Steps to Reproduce
terraform apply
Important Factoids
Imported ZIA config using terraformer. Trying to add an additional sandbox rule. Tried many different configurations of the new rule #4 but all show they are trying to modify rule 127 instead. Also tried setting default_rule which is described in the documentation, but I get an unexpected error with that.
References
The text was updated successfully, but these errors were encountered: