Closed zbuchheit closed 1 month ago
@fmunozmiranda I see this was mentioned being fixed in the 0.2.6 but I am not seeing a commit where the behavior was changed. Could you confirm this issue was addressed in the 0.2.6 release?
Could you help us sharing the provider DEBUG?
sure I will provide additional context.
The logs show the following when doing an apply
with the above code
2024-07-16T14:55:04.269-0700 [DEBUG] meraki_networks_vlan_profiles.vlan_profiles: applying the planned Create change
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: 2024/07/16 14:55:04
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: ==============================================================================
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: ~~~ REQUEST ~~~
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: GET /api/v1/networks/redacted/vlanProfiles/Default HTTP/1.1
...
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: BODY :
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: ***** NO CONTENT *****
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: ------------------------------------------------------------------------------
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: ~~~ RESPONSE ~~~
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: STATUS : 200 OK
...
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: BODY :
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: {
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: "name": "Default Profile",
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: "iname": "Default",
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: "vlanNames": [
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: {
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: "name": "default",
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: "vlanId": "1"
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: }
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: ],
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: "vlanGroups": [],
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: "isDefault": true
2024-07-16T14:55:04.437-0700 [DEBUG] provider.terraform-provider-meraki_v0.2.7-alpha: }
It then saves the vlan_profile into the state.
@zbuchheit please try it again with new version.
this appears to be fixed. Thanks
Prerequisites
Describe the bug
When attemping to create a
meraki_networks_vlan_profiles
resource/edit the default vlan profile resource, it will fail to actually enact a change despite reporting a success on the create.Expected behavior
I would likely expect a
resource already exists
error and with an import required. The default profile is created automatically so it is a bit of a one-off resource that I could see an argument made for doing aPUT
on the create in the even the resource is the default profile. This also makes it tricky to handle the delete as you likely can't/wouldn't delete this resource and would just revert the changes back to default.Screenshots
Please provide an screenshot of the successful API call with cuRL, Postman, etc.
Environment (please complete the following information):
Additional context
I assume this is likely from this recent code changes where it changes from
UpdateNetworkVLANProfile
toCreateNetworkVLANProfile
on the create which would explain the behavior we saw before which would allow changes on the default vlan profiles, but other vlan profile resource creations would fail. This is the opposite behavior I am seeing now.Also worth noting, if you create the resource on the Default profile where it doesn't actually make a change, you can refresh, then trigger an update, to which the resource will actually update as expected.
Code Example