Terraform Crashes 0.2.13-alpha

NetEngJH
Here to help

Terraform Crashes 0.2.13-alpha

Does anyone else have experience of using the Meraki Terraform provider with the Meraki Dashboard and it frequently crashing?  I am using the latest version 0.2.13-alpha and configuring switches and ports.  Most of the time I have to run Terraform apply 4 or 5 times for all the switch ports to be configured on just 2 x 48 port switch stack.  If anyone knows of this issue or any workarounds I'd love to hear from you.

 

Stack trace from the terraform-provider-meraki_v0.2.13-alpha plugin:
fatal error: concurrent map writes
fatal error: concurrent map writes
Error: The terraform-provider-meraki_v0.2.13-alpha plugin crashed!

2 Replies 2
ConnorL
Meraki Employee
Meraki Employee

Hmm, I suspect this may be due to making concurrent changes to switchports within the same stack.

 

We "lock" a stack during a change via API to ensure that whatever changes are being made don't write over each other in a race condition, which can cause issues if you're running simulations batches that edit the same stack. Might be worth opening a Support ticket for this. 

NetEngJH
Here to help

Thanks for replying, I am definitely making concurrent changes to switchports with the same stack. For example:

resource "meraki_devices_switch_ports" "switch1" {
  for_each             = var.sw1_ports_map
  port_id               = each.value.port_id
  name                  = each.value.port_name
..
.....
 
So I don't have to create 48 individual switch port resources and use "depends_on" to iterate through 1 at a time.
Get notified when there are additional replies to this discussion.