-
Notifications
You must be signed in to change notification settings - Fork 117
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 importing full json WAF policy with v1.19.0 - resource bigip_waf_policy #858
Comments
Hi, Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1289. |
Hi @amolari, The issue is not reproductible in our lab. |
Hi @pgouband
|
Hi @amolari, A fix will be included in our next release. |
@RavinderReddyF5 @pgouband I have a basic policy (full json export) which the only setting set (from Fondamental template) is the Application language, set to "iso-8859-1".
Everything's fine until I modify my json file (simple change such as description). The TF apply is successful but the policy is not updated. There is an issue for non-utf8 policies (I've seen it on the UI) and I've just opened F5 support case 00491134. But the point is that the TF apply doesn't detect the error and return a successful status. TF apply should return an error not a change applied successfully. |
Hi, Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1349. |
Hi @amolari, A WAF policy can't be replaced when the application language is different so the behavior is by design. |
hi @amolari please open new issue if still problem seen |
Environment
Summary
I could import the same WAF policy json successfully on v1.18.0
When running the same code with 1.19.0 I have an error during the apply.
I do see the policy being imported on the BIG-IP, though.
Steps To Reproduce
Steps to reproduce the behavior:
1.
resource "bigip_waf_policy" "test_for_TF_l" {
name = "test_for_TF_l"
template_name = "POLICY_TEMPLATE_BLANK"
policy_import_json = file("./Common_test_for_TF_l.json")
}
The file Common_test_for_TF_l.json is a full-json policy.
Expected Behavior
WAF policy import successful, without any TF error
Actual Behavior
2023-08-30T10:54:00.018+0200 [DEBUG] provider.terraform-provider-bigip_v1.19.0: Import policy:{Filename:test_for_TF_l.json FullPath:/Common/test_for_TF_l Policy:{FullPath:/Common/test_for_TF_l}}: timestamp=2023-08-30T10:54:00.018+0200
2023-08-30T10:54:00.033+0200 [INFO] provider.terraform-provider-bigip_v1.19.0: AWAF Import policy TaskID :WPGdpF7_i-ePYQM54FUShg: timestamp=2023-08-30T10:54:00.033+0200
bigip_waf_policy.test_for_TF_l: Still creating... [10s elapsed]
2023-08-30T10:54:10.066+0200 [ERROR] provider.terraform-provider-bigip_v1.19.0: Response contains error diagnostic: diagnostic_detail= diagnostic_severity=ERROR tf_provider_addr=provider tf_resource_type=bigip_waf_policy tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/diag/diagnostics.go:55 diagnostic_summary="error retrieving waf policy : [ERROR] WafPolicy: test_for_TF_l on partition Common not found" tf_proto_version=5.3 tf_req_id=478fca96-cc0a-c39c-3be2-482e31709a4e @module=sdk.proto timestamp=2023-08-30T10:54:10.065+0200
2023-08-30T10:54:10.069+0200 [ERROR] vertex "bigip_waf_policy.test_for_TF_l" error: error retrieving waf policy : [ERROR] WafPolicy: test_for_TF_l on partition Common not found
╷
│ Error: error retrieving waf policy : [ERROR] WafPolicy: test_for_TF_l on partition Common not found
│
│ with bigip_waf_policy.test_for_TF_l,
│ on waf_policy_import.tf line 1, in resource "bigip_waf_policy" "test_for_TF_l":
│ 1: resource "bigip_waf_policy" "test_for_TF_l" {
│
╵
2023-08-30T10:54:10.081+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-08-30T10:54:10.085+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/f5networks/bigip/1.19.0/linux_amd64/terraform-provider-bigip_v1.19.0 pid=7644
2023-08-30T10:54:10.085+0200 [DEBUG] provider: plugin exited
The text was updated successfully, but these errors were encountered: