cisco-open / terraform-provider-meraki

A Terraform Provider for Cisco Meraki
Mozilla Public License 2.0
15 stars 6 forks source link

resources meraki_networks_group_policies update error #117

Closed Fran-E closed 1 month ago

Fran-E commented 1 month ago

Prerequisites

Describe the bug About resources meraki_networks_group_policies when we are using firewall_and_traffic_shaping.l3_firewall_rules there is always modify discoverd during the plan and the apply do error.

Expected behavior Possibility to update firewall_and_traffic_shaping.l3_firewall_rules in the resource meraki_networks_group_policies without error with a plan working.

Screenshots This is the error when we apply : │ Error: Failure when executing UpdateNetworkGroupPolicy │ │ with meraki_networks_group_policies.policynetatmo["ABBEVILLECB-MX"], │ on grouppolicy.tf line 1, in resource "meraki_networks_group_policies" "policynetatmo": │ 1: resource "meraki_networks_group_policies" "policynetatmo" { │ │ error with operation UpdateNetworkGroupPolicy ╵

Environment (please complete the following information):

fmunozmiranda commented 1 month ago

Could you please pass us the provider debug?

provider "meraki" {
  meraki_debug = "true"
}
export TF_LOG="DEBUG"
Fran-E commented 1 month ago

debug.txt

I think the interesting part is here :

2024-07-31T09:05:03.064+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: ~ RESPONSE ~ 2024-07-31T09:05:03.064+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: STATUS : 400 Bad Request 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: PROTO : HTTP/2.0 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: RECEIVED AT : 2024-07-31T09:05:03.0316399+02:00 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: TIME DURATION: 340.6106ms 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: HEADERS : 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: Cache-Control: no-cache, no-store, max-age=0, must-revalidate 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: Content-Type: application/json; charset=utf-8 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: Date: Wed, 31 Jul 2024 07:05:03 GMT 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: Expires: Fri, 01 Jan 1990 00:00:00 GMT 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: Pragma: no-cache 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: Strict-Transport-Security: max-age=31536000; includeSubDomains 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: X-Content-Type-Options: nosniff 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: X-Frame-Options: sameorigin 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: X-Request-Id: b261e2608935d9a0ea720c72aa917f21 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: X-Robots-Tag: none 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: X-Runtime: 0.193754 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: X-Xss-Protection: 1; mode=block 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: BODY : 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: { 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: "errors": [ 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: "Content Filtering settings are not supported for your network. Consider upgrading your devices to enable this feature." 2024-07-31T09:05:03.065+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: ] 2024-07-31T09:05:03.066+0200 [DEBUG] provider.terraform-provider-meraki_v0.2.9-alpha.exe: } 2024-07-31T09:05:03.065+0200 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot

We don't have full licenses on our MX devices and the API call is always sending "contentFiltering" argument, I don't have this in my TF file. I try to add
lifecycle { ignore_changes = [content_filtering] } But I have the same error.

Br,

fmunozmiranda commented 1 month ago

@Fran-E please try it with new version and update us.

Fran-E commented 1 month ago

I can confirm this is solve now. Thanks.