netascode / terraform-meraki-nac-meraki

Apache License 2.0
2 stars 2 forks source link

Error with multiple resources #7

Open christianbur opened 1 day ago

christianbur commented 1 day ago

Hi, I have tested the meraki module, although I know that it is not yet published. During the test I noticed that the following resources always cause a change, but only the network_id variable is visible in the log, all other variables are missing, so the update always runs into an error. All local helper variables of the resources are structured the same scheme, but I could not find the error.

resource "meraki_network_settings" "net_settings" {
resource "meraki_network_snmp" "net_snmp" {
resource "meraki_switch_mtu" "net_networks_switch_mtu" {
resource "meraki_switch_routing_multicast" "net_networks_switch_routing_multicast" {
resource "meraki_switch_routing_ospf" "net_networks_switch_routing_ospf" {
resource "meraki_switch_settings" "net_networks_switch_settings" {
resource "meraki_wireless_settings" "net_networks_wireless_settings" {

When creating the ssids, the id changed with every tf apply, so I had to add the number via config.

resource "meraki_wireless_ssid" "net_networks_wireless_ssids" {
  for_each   = { for i, v in local.networks_networks_wireless_ssids : i => v }
  network_id = each.value.network_id
-  #number = each.key
+ number  = try(each.value.data.number)

A few more questions:

I will continue testing (switches, accesspoints), and hope for a release soon.

My test config: config.yml.txt defaults.yml.txt

jon-humphries commented 13 hours ago

Hi Christian,

We are actively developing these modules which work along side our custom TF provider.

We originally based our development around the cisco-open/meraki provider but recently switched to our customised Cisco CX Provider CiscoDevNet/meraki to work around some nuances specific to our solution which is not currently compatible with the existing provider. However we expect this to change in the future.

Could you confirm if you are using the cisco-open provider or the newly published CX Provider ?

For reference currently for our initial release we will be supporting the following provider only.

required_providers { meraki = { source = "CiscoDevNet/meraki" version = "0.1.0" }

christianbur commented 6 hours ago

I switched to the TF provider CiscoDevNet/meraki last week, I have already created 70 locations with the TF Meraki module, but I had to comment out the mentioned resource and adapt the resource for the ssid.

one more question is the defaults.yaml correct? something is wrong with “domains:”

password_expiration_days                            = try(org.login_security.password_expiration_days, local.defaults.meraki.organizations.login_security.password_expiration_days, null)

defaults:
  meraki:
      domains:
        - name: EMEA
          organizations:
            - name: Dev
              snmp:
                  v2c_enabled: false
                  v3_enabled: true
              login_security:
                  password_expiration_days: 30