<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Terrafrom [BUG] - Resource &amp;quot;nxos_save_config&amp;quot; not workin in DevNet General Discussions</title>
    <link>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5261094#M2702</link>
    <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1608770"&gt;@krzysztofmaciejewskiit&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Most likely you are affected by a bug I've mentioned above and seems like BFD configuration on a interface eth1/10 crashes DME on a switch or ACL - based on the output you've provided.&lt;BR /&gt;&lt;BR /&gt;This bug is resolved in the next minor release of the nxos you have -&amp;gt; 10.2(4) &lt;A href="https://www.cisco.com/c/en/us/td/docs/dcn/nx-os/nexus9000/102x/release-notes/cisco-nexus-9000-nxos-release-notes-1024.html" target="_blank" rel="noopener"&gt;https://www.cisco.com/c/en/us/td/docs/dcn/nx-os/nexus9000/102x/release-notes/cisco-nexus-9000-nxos-release-notes-1024.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The workaround described under the bug entry is to reload ascii startup configuration -&amp;gt; "reload ascii" or to clear nxapi retries -&amp;gt; "clear nxapi retries". I wasn't able to reproduce that in my lab so I cannot say more about the impact.&lt;BR /&gt;&lt;BR /&gt;Please let me know if that helps.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Feb 2025 14:52:14 GMT</pubDate>
    <dc:creator>mfr-6</dc:creator>
    <dc:date>2025-02-16T14:52:14Z</dc:date>
    <item>
      <title>Terrafrom [BUG] - Resource "nxos_save_config" not working</title>
      <link>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5256630#M2695</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Version: 0.5.7&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I want to save the configuration of the device with Terraform.&lt;BR /&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztofmaciejewskiit_5-1738685476391.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/239087iC4E9214642C39C7B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krzysztofmaciejewskiit_5-1738685476391.png" alt="krzysztofmaciejewskiit_5-1738685476391.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Logs when creating the resource that should be responsible for this.&lt;BR /&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztofmaciejewskiit_6-1738685506500.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/239088i79CCBAF0CED7F476/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krzysztofmaciejewskiit_6-1738685506500.png" alt="krzysztofmaciejewskiit_6-1738685506500.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The result on the device, which suggests an unsaved configuration. After saving manually, WARNING does not appear.&lt;BR /&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztofmaciejewskiit_7-1738685529549.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/239089i606BEA35E6F2761C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krzysztofmaciejewskiit_7-1738685529549.png" alt="krzysztofmaciejewskiit_7-1738685529549.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, when I do this with the "nxos_rest" resource it saves after the second run of Terraform (it doesn't after the first - not sure why, but at least it works). The content of the resource "nxos_rest" "save" is literally a rewritten request by the API, which you can see in the debug.&lt;BR /&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztofmaciejewskiit_8-1738685552120.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/239090iF1CE4BF3AF63B079/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krzysztofmaciejewskiit_8-1738685552120.png" alt="krzysztofmaciejewskiit_8-1738685552120.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;API request:&lt;BR /&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztofmaciejewskiit_9-1738685578655.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/239091i5341421123166B61/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krzysztofmaciejewskiit_9-1738685578655.png" alt="krzysztofmaciejewskiit_9-1738685578655.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 16:49:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5256630#M2695</guid>
      <dc:creator>krzysztofmaciejewskiit</dc:creator>
      <dc:date>2025-02-04T16:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Terrafrom [BUG] - Resource "nxos_save_config" not workin</title>
      <link>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5257041#M2696</link>
      <description>&lt;P&gt;From the perspective of the switch, about running the"&lt;STRONG&gt;debug nxapi-server logs&lt;/STRONG&gt;" command, you can see that something interrupts the save.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztofmaciejewskiit_0-1738743852311.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/239307iED18CDCD44ADE10B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krzysztofmaciejewskiit_0-1738743852311.png" alt="krzysztofmaciejewskiit_0-1738743852311.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 08:24:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5257041#M2696</guid>
      <dc:creator>krzysztofmaciejewskiit</dc:creator>
      <dc:date>2025-02-05T08:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Terrafrom [BUG] - Resource "nxos_save_config" not workin</title>
      <link>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5261019#M2700</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1608770"&gt;@krzysztofmaciejewskiit&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure if this is an issue with TF/Provider itself. I just sent a POST request to sandbox nxos with a payload from the docs here -&amp;nbsp; and it works fine - configuration is saved.&lt;/P&gt;&lt;P&gt;Let's break that down:&lt;/P&gt;&lt;P&gt;First - i just modified the configuration and then verified if there is a prompt about unsaved configuration when attempting to reboot the switch.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Enter configuration commands, one per line. End with CNTL/Z.
nxos(config)# int eth1/12
nxos(config-if)# description before_tf_save
nxos(config-if)# end
nxos# reload
!!!WARNING! there is unsaved configuration!!!
This command will reboot the system. (y/n)? [n] n
nxos#&lt;/LI-CODE&gt;&lt;P&gt;There we go - we have unsaved configuration now.&lt;/P&gt;&lt;P&gt;To make it even more clear - I checked if startup config didn't contain new interface description:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;nxos# sh startup-config interface eth1/12

!Command: show startup-config interface Ethernet1/12
!Time: Sat Feb 15 11:00:48 2025
!Startup config saved at: Sat Feb 15 10:47:07 2025

version 10.3(3) Bios:version

interface Ethernet1/12
description www
shutdown

nxos#&lt;/LI-CODE&gt;&lt;P&gt;I created nxos_save_config resource and create a plan and apply - tf workflow executed flawlessly.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(main) expert@expert-cws:~/tf$ terraform plan

Terraform used the selected providers to generate the following execution plan.
Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

# nxos_save_config.cfg_saved will be created
+ resource "nxos_save_config" "cfg_saved" {
+ save = true
}

Plan: 1 to add, 0 to change, 0 to destroy.

───────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
(main) expert@expert-cws:~/tf$ terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

# nxos_save_config.cfg_saved will be created
+ resource "nxos_save_config" "cfg_saved" {
+ save = true
}

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.

Enter a value: yes

nxos_save_config.cfg_saved: Creating...
nxos_save_config.cfg_saved: Creation complete after 1s

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
(main) expert@expert-cws:~/tf$&lt;/LI-CODE&gt;&lt;P&gt;Coming back to nexus - i verified the startup config and as expected - the config was saved - now eth1/12 interface has new description.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;nxos# sh startup-config interface eth1/12

!Command: show startup-config interface Ethernet1/12
!Time: Sat Feb 15 11:01:40 2025
!Startup config saved at: Sat Feb 15 11:01:24 2025

version 10.3(3) Bios:version

interface Ethernet1/12
description before_tf_save
shutdown

nxos#&lt;/LI-CODE&gt;&lt;P&gt;Before excercise with TF - I sent POST request using curl with the payload from the NXAPI docs to double-check if it works on sandbox nxos and I confirmed it worked. I was thinking that there could be a bug in terraform nxos provider, but for me everything is fine.&lt;/P&gt;&lt;P&gt;Although - from the nxapi debug output - I see an issue with a particular error 0x4370002C.&lt;/P&gt;&lt;P&gt;Could you please have a look at output from the following commands?&lt;/P&gt;&lt;P&gt;show system error-id 0x4370002C&lt;BR /&gt;show nxapi retries&lt;/P&gt;&lt;P&gt;I suspect that a particular feature on your nexus that is enabled prevents you from saving the configuration properly via NXAPI. I got a similar issue with IOSXE where a particular configuration applied via RESTCONF couldn't be applied due to the wrong order (CLI prevented from doing so, but RESTCONF didn't). In my case - I tried to set hello timers on a interface level without having EIGRP AS created. hello timer command requires you to provide AS number. Configuration has been applied but DME crashed and I had to reload the router, well...&lt;/P&gt;&lt;P&gt;To sum it up - I don't think this is a TF Provider bug. Instead - have a look at your Nexus, i think this is the place where the root cause sits.&lt;/P&gt;&lt;P&gt;This looks like a bug - at least looks like it's similar to your case.&lt;BR /&gt;&lt;A href="https://bst.cisco.com/quickview/bug/CSCwa58073" target="_blank"&gt;https://bst.cisco.com/quickview/bug/CSCwa58073&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2025 09:32:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5261019#M2700</guid>
      <dc:creator>mfr-6</dc:creator>
      <dc:date>2025-02-16T09:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Terrafrom [BUG] - Resource "nxos_save_config" not workin</title>
      <link>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5261088#M2701</link>
      <description>&lt;P&gt;Hi Mateusz &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1668340"&gt;@mfr-6&lt;/a&gt;,&lt;BR /&gt;Thanks for your suggestions. I have attached the screenshot you requested below. The moment I type "&lt;STRONG&gt;show nxapi retries&lt;/STRONG&gt;" is when I run "&lt;STRONG&gt;terraform apply -auto-approve"&lt;/STRONG&gt;&amp;nbsp;and I want to catch that moment you see in the screenshot. What information does this give us?&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztofmaciejewskiit_3-1739714603804.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/239963i636C0C2A3B5D5D00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krzysztofmaciejewskiit_3-1739714603804.png" alt="krzysztofmaciejewskiit_3-1739714603804.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I am also uploading the software version below.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztofmaciejewskiit_4-1739714793865.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/239964i28E4675F5F31787A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krzysztofmaciejewskiit_4-1739714793865.png" alt="krzysztofmaciejewskiit_4-1739714793865.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2025 14:07:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5261088#M2701</guid>
      <dc:creator>krzysztofmaciejewskiit</dc:creator>
      <dc:date>2025-02-16T14:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Terrafrom [BUG] - Resource "nxos_save_config" not workin</title>
      <link>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5261094#M2702</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1608770"&gt;@krzysztofmaciejewskiit&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Most likely you are affected by a bug I've mentioned above and seems like BFD configuration on a interface eth1/10 crashes DME on a switch or ACL - based on the output you've provided.&lt;BR /&gt;&lt;BR /&gt;This bug is resolved in the next minor release of the nxos you have -&amp;gt; 10.2(4) &lt;A href="https://www.cisco.com/c/en/us/td/docs/dcn/nx-os/nexus9000/102x/release-notes/cisco-nexus-9000-nxos-release-notes-1024.html" target="_blank" rel="noopener"&gt;https://www.cisco.com/c/en/us/td/docs/dcn/nx-os/nexus9000/102x/release-notes/cisco-nexus-9000-nxos-release-notes-1024.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The workaround described under the bug entry is to reload ascii startup configuration -&amp;gt; "reload ascii" or to clear nxapi retries -&amp;gt; "clear nxapi retries". I wasn't able to reproduce that in my lab so I cannot say more about the impact.&lt;BR /&gt;&lt;BR /&gt;Please let me know if that helps.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2025 14:52:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-general-discussions/terrafrom-bug-resource-quot-nxos-save-config-quot-not-working/m-p/5261094#M2702</guid>
      <dc:creator>mfr-6</dc:creator>
      <dc:date>2025-02-16T14:52:14Z</dc:date>
    </item>
  </channel>
</rss>

