cisco-open / terraform-provider-meraki

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

Errors when try to get an output or add a new `meraki_networks_wireless_ssids_firewall_l7_firewall_rules` resource #107

Closed tienphan181 closed 1 month ago

tienphan181 commented 1 month ago

Describe the bug I tried to get an output of one of our SSIDs Layer 7 firewalls rules but got the following error: ╷ │ Error: Resource NetworksWirelessSSIDsFirewallL7FirewallRules only have update context, not create. │ │ with meraki_networks_wireless_ssids_firewall_l7_firewall_rules.test-Terraform, │ on firewall-rules.tf line 16, in resource "meraki_networks_wireless_ssids_firewall_l7_firewall_rules" "test-Terraform": │ 16: resource "meraki_networks_wireless_ssids_firewall_l7_firewall_rules" "test-Terraform" { │ │ json: cannot unmarshal object into Go struct field │ ResponseWirelessGetNetworkWirelessSSIDFirewallL7FirewallRulesRules.rules.value │ of type stri I got the same error above when I tried to create a new resource as well.

I ran the same code with an SSID that has no Layer 7 rule and the code ran fine with no error: `Changes to Outputs:

Expected behavior To be able to output and create the SSID layer 7 rules

Environment (please complete the following information): Meraki Dashboard version: Terraform version: OpenTofu v1.7.2 Meraki provider version: 0.2.5-alpha OS Version: macOS 13.6.7

fmunozmiranda commented 1 month ago

Could you activate the provider debug and share it?

provider "meraki" {
  meraki_debug = "true"
}
export TF_LOG="DEBUG"

I test it and it works for me.

Please make sure Debug is enable, you must be able to see all API Requests.

tienphan181 commented 1 month ago

Hello,

Below is the logs with all API requests for layer 7.

Thank you! layer-7-error-logs.txt

fmunozmiranda commented 1 month ago

Try it again please with new version. See this too: https://github.com/cisco-open/terraform-provider-meraki/blob/main/examples/samples/resources/meraki_networks_wireless_ssids_firewall_l7_firewall_rules/resource.tf

fmunozmiranda commented 1 month ago

If we do not receive a response it will be closed in the next 24 hours.

tienphan181 commented 1 month ago

The new version fixed the issue. Thank you!