Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meraki.networks.ApplianceVlans not updating reservedIpRanges correctly #100

Closed
zbuchheit opened this issue Jul 8, 2024 · 5 comments · Fixed by #110 or #114
Closed

meraki.networks.ApplianceVlans not updating reservedIpRanges correctly #100

zbuchheit opened this issue Jul 8, 2024 · 5 comments · Fixed by #110 or #114
Assignees
Labels
awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@zbuchheit
Copy link
Collaborator

Describe what happened

When attempting to update reservedIpRanges on meraki.networks.ApplianceVlans, only the first object in the array is getting added to the resource. The equivalent works in TF upstream.

Sample program

  1. Create the resource with the reservedIpRanges commented out
  2. Uncomment the reservedIpRanges
  3. pulumi up
  4. Query the api and notice only the first entry was added to the resource
const vlans = new meraki.networks.ApplianceVlans(
  "vlans",
  {
    networkId: network.id,
    applianceIp: "192.168.2.1",
    vlanId: "2",
    subnet: "192.168.2.0/24",
    name: "guest",
    dhcpHandling: "Do not respond to DHCP requests",
    dnsNameservers: "upstream_dns",
    dhcpLeaseTime: "1 day",
    dhcpBootOptionsEnabled: false,
    // reservedIpRanges: [
    //   { comment: "range1", start: "192.168.2.2", end: "192.168.2.3" }, 
    //   { comment: "range2", start: "192.168.2.4", end: "192.168.2.5" },
    //   { comment: "range3", start: "192.168.2.6", end: "192.168.2.7" },
    // ],
  },
  { dependsOn: [vlanSettings] }
);

Log output

N/A

Affected Resource(s)

meraki.networks.ApplianceVlans

Output of pulumi about

CLI          
Version      3.121.0
Go Version   go1.22.4
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  meraki  0.2.5
language  nodejs  unknown

Host     
OS       darwin
Version  14.2.1
Arch     arm64

This project is written in nodejs: executable='/Users/zbuchheit/.nvm/versions/node/v18.17.1/bin/node' version='v18.17.1'

Current Stack: zbuchheit-pulumi-corp/pulumi-meraki-troubleshooting/dev

TYPE                                                           URN
pulumi:pulumi:Stack                                            urn:pulumi:dev::pulumi-meraki-troubleshooting::pulumi:pulumi:Stack::pulumi-meraki-troubleshooting-dev
pulumi:providers:meraki                                        urn:pulumi:dev::pulumi-meraki-troubleshooting::pulumi:providers:meraki::default_0_2_5_github_/api.github.com/pulumi/pulumi-meraki
meraki:networks/base:base                                      urn:pulumi:dev::pulumi-meraki-troubleshooting::meraki:networks/base:base::base-network
meraki:networks/applianceVlansSettings:ApplianceVlansSettings  urn:pulumi:dev::pulumi-meraki-troubleshooting::meraki:networks/applianceVlansSettings:ApplianceVlansSettings::vlan-settings
meraki:networks/applianceVlans:ApplianceVlans                  urn:pulumi:dev::pulumi-meraki-troubleshooting::meraki:networks/applianceVlans:ApplianceVlans::vlans


Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/zbuchheit-pulumi-corp
User           zbuchheit-pulumi-corp
Organizations  zbuchheit-pulumi-corp
Token type     personal

Dependencies:
NAME            VERSION
typescript      5.5.3
@pulumi/pulumi  3.122.0
@types/node     18.19.39

Pulumi locates its logs in /var/folders/lh/l71cdh810xb33t0jc7qmt5_80000gn/T/ by default

Additional context

There is a known limitation where you cannot create an ApplianceVlans resource with reservedIpRanges set during a create. It will just ignore the values for reservedIpRanges.

It should, however, detect the changes on the resource for those fields during an update. In TF, it will add all three fields in my example during the update, but in Pulumi it only adds the first object in the reservedIpRanges array.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@zbuchheit zbuchheit added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jul 8, 2024
@VenelinMartinov
Copy link
Contributor

Thanks for another great repro @zbuchheit. I've tried it and have confirmed the issue.

Curl command for getting the info from the meraki API: curl -X GET "https://api.meraki.com/api/v1/networks/<NETWORK_ID>/appliance/vlans" \ -H "X-Cisco-Meraki-API-Key: <KEY>" | json_pp -json_opt pretty,canonical

This is the same underlying issue as with #97: pulumi/pulumi-terraform-bridge#2170

https://github.com/cisco-open/terraform-provider-meraki/blob/7b3e63a22f6706c110957609ef608e81956b7166/internal/provider/resource_meraki_networks_appliance_vlans.go#L349

The upstream schema has the parameter as a Set of objects with all of its properties marked as Optional + Computed.

Unfortunately, I don't have a resolution to the bridge issue yet.

@VenelinMartinov VenelinMartinov added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. and removed needs-triage Needs attention from the triage team labels Jul 12, 2024
@zbuchheit
Copy link
Collaborator Author

I am still seeing this behavior "but in Pulumi it only adds the first object in the reservedIpRanges array." in v0.2.6

@VenelinMartinov
Copy link
Contributor

Keeping open until we verify the issue is resolved.

@VenelinMartinov VenelinMartinov removed the resolution/fixed This issue was fixed label Jul 15, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #114 and shipped in release v0.2.7.

@zbuchheit
Copy link
Collaborator Author

confirming this behavior I have seen has been fixed we can close

@VenelinMartinov VenelinMartinov added the resolution/fixed This issue was fixed label Jul 16, 2024
@mjeffryes mjeffryes added this to the 0.107 milestone Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants