From 0d45e3d7cf6992b5c46664860025065738ad6e5e Mon Sep 17 00:00:00 2001 From: Andrea Testino Date: Sat, 8 Nov 2025 15:50:15 -0500 Subject: [PATCH 1/5] fix(logging): add version tag to persistent_url attribute The persistent_url attribute uses flash:/local_logging which causes test failures on IOS-XE 17.15.3 due to version-specific path normalization. When configured with flash:, 17.15.3 normalizes to bootflash: causing Terraform to detect drift. 17.12 preserves the flash: alias without normalization. Adding test_tags: [IOSXE1712] restricts testing to 17.12 where the example works without drift. --- gen/definitions/logging.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/gen/definitions/logging.yaml b/gen/definitions/logging.yaml index ebc8644d..8c045482 100644 --- a/gen/definitions/logging.yaml +++ b/gen/definitions/logging.yaml @@ -240,6 +240,7 @@ attributes: test_tags: [IOSXE1715] - yang_name: persistent/url example: flash:/local_logging + test_tags: [IOSXE1712] - yang_name: persistent/size example: 1000000 - yang_name: persistent/filesize From 220be3c62dfdb151891c6c877adcf29efe5724e0 Mon Sep 17 00:00:00 2001 From: Andrea Testino Date: Sat, 8 Nov 2025 15:50:21 -0500 Subject: [PATCH 2/5] test(logging): add version guard to persistent_url in data source test Wraps persistent_url test assertions and configuration with IOSXE1712 environment check to prevent the attribute from being tested on 17.15.3 where device path normalization causes drift. Generated by: make gen NAME="Logging" --- internal/provider/data_source_iosxe_logging_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/provider/data_source_iosxe_logging_test.go b/internal/provider/data_source_iosxe_logging_test.go index 65c6a099..bacd630e 100644 --- a/internal/provider/data_source_iosxe_logging_test.go +++ b/internal/provider/data_source_iosxe_logging_test.go @@ -73,7 +73,9 @@ func TestAccDataSourceIosxeLogging(t *testing.T) { if os.Getenv("IOSXE1715") != "" { checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_logging.test", "logging_count", "true")) } - checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_logging.test", "persistent_url", "flash:/local_logging")) + if os.Getenv("IOSXE1712") != "" { + checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_logging.test", "persistent_url", "flash:/local_logging")) + } checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_logging.test", "persistent_size", "1000000")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_logging.test", "persistent_filesize", "500000")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_logging.test", "rate_limit_all", "200")) @@ -202,7 +204,9 @@ func testAccDataSourceIosxeLoggingConfig() string { if os.Getenv("IOSXE1715") != "" { config += ` logging_count = true` + "\n" } - config += ` persistent_url = "flash:/local_logging"` + "\n" + if os.Getenv("IOSXE1712") != "" { + config += ` persistent_url = "flash:/local_logging"` + "\n" + } config += ` persistent_size = 1000000` + "\n" config += ` persistent_filesize = 500000` + "\n" config += ` rate_limit_all = 200` + "\n" From 5ebc5de671b16519f858135d58de3d42096fc27b Mon Sep 17 00:00:00 2001 From: Andrea Testino Date: Sat, 8 Nov 2025 15:50:27 -0500 Subject: [PATCH 3/5] test(logging): add version guard to persistent_url in resource test Wraps persistent_url test assertions and configuration with IOSXE1712 environment check to prevent the attribute from being tested on 17.15.3 where device path normalization causes drift. Generated by: make gen NAME="Logging" --- internal/provider/resource_iosxe_logging_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/provider/resource_iosxe_logging_test.go b/internal/provider/resource_iosxe_logging_test.go index 46e63a45..8796bcea 100644 --- a/internal/provider/resource_iosxe_logging_test.go +++ b/internal/provider/resource_iosxe_logging_test.go @@ -75,7 +75,9 @@ func TestAccIosxeLogging(t *testing.T) { if os.Getenv("IOSXE1715") != "" { checks = append(checks, resource.TestCheckResourceAttr("iosxe_logging.test", "logging_count", "true")) } - checks = append(checks, resource.TestCheckResourceAttr("iosxe_logging.test", "persistent_url", "flash:/local_logging")) + if os.Getenv("IOSXE1712") != "" { + checks = append(checks, resource.TestCheckResourceAttr("iosxe_logging.test", "persistent_url", "flash:/local_logging")) + } checks = append(checks, resource.TestCheckResourceAttr("iosxe_logging.test", "persistent_size", "1000000")) checks = append(checks, resource.TestCheckResourceAttr("iosxe_logging.test", "persistent_filesize", "500000")) checks = append(checks, resource.TestCheckResourceAttr("iosxe_logging.test", "rate_limit_all", "200")) @@ -237,7 +239,9 @@ func testAccIosxeLoggingConfig_all() string { if os.Getenv("IOSXE1715") != "" { config += ` logging_count = true` + "\n" } - config += ` persistent_url = "flash:/local_logging"` + "\n" + if os.Getenv("IOSXE1712") != "" { + config += ` persistent_url = "flash:/local_logging"` + "\n" + } config += ` persistent_size = 1000000` + "\n" config += ` persistent_filesize = 500000` + "\n" config += ` rate_limit_all = 200` + "\n" From 49b2e6bb77eda95cbaac8972a7c8c79e7b7695ea Mon Sep 17 00:00:00 2001 From: Andrea Testino Date: Sat, 8 Nov 2025 15:50:32 -0500 Subject: [PATCH 4/5] docs(logging): update example resource Updates example resource configuration. The persistent_url attribute is now restricted to IOS-XE 17.12 testing due to version-specific normalization. Generated by: make gen NAME="Logging" --- examples/resources/iosxe_logging/resource.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/resources/iosxe_logging/resource.tf b/examples/resources/iosxe_logging/resource.tf index ca67a5c0..5584a415 100644 --- a/examples/resources/iosxe_logging/resource.tf +++ b/examples/resources/iosxe_logging/resource.tf @@ -120,7 +120,6 @@ resource "iosxe_logging" "example" { ] } ] - persistent_url = "flash:/local_logging" persistent_size = 1000000 persistent_filesize = 500000 rate_limit_all = 200 From 0a9155586deb1a69cbda2dce1dab5e9d0b111af6 Mon Sep 17 00:00:00 2001 From: Andrea Testino Date: Sat, 8 Nov 2025 15:50:37 -0500 Subject: [PATCH 5/5] docs(logging): update resource documentation Updates generated documentation to reflect persistent_url testing restrictions. Generated by: make gen NAME="Logging" --- docs/resources/logging.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/resources/logging.md b/docs/resources/logging.md index f86811d1..c3175c4b 100644 --- a/docs/resources/logging.md +++ b/docs/resources/logging.md @@ -135,7 +135,6 @@ resource "iosxe_logging" "example" { ] } ] - persistent_url = "flash:/local_logging" persistent_size = 1000000 persistent_filesize = 500000 rate_limit_all = 200