test: regression guard for IPv6 strings mishandled by !terraform.state#2156
Draft
test: regression guard for IPv6 strings mishandled by !terraform.state#2156
!terraform.state#2156Conversation
…2155) Co-authored-by: osterman <52489+osterman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix handling of IPv6 strings in terraform.state
test: Add IPv6 string preservation regression tests for Mar 9, 2026
!terraform.state
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
… comments Co-authored-by: osterman <52489+osterman@users.noreply.github.com>
Copilot
AI
changed the title
test: Add IPv6 string preservation regression tests for
test: regression guard for IPv6 strings mishandled by Mar 11, 2026
!terraform.state!terraform.state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IPv6 addresses ending in
::(e.g.,2041:0000:140F::875B::) were silently converted to{"2041:0000:140F::875B:": null}interraform.tfvars.json, causing Terraform to reject the value because the variable was declared asstring. The bug was present through v1.204.0 and fixed in v1.206.0 (PR #2059) as a side-effect of ARN colon-handling — but IPv6 had no test coverage.Changes
pkg/utils/yq_utils.go— updated comments onisScalarString,isMisinterpretedScalar, andkeyMatchesOriginalWithColonto explicitly name IPv6 alongside ARNs and reference the fix version (v1.206.0 / PR fix: YAML strings ending with colons parsed incorrectly #2059)pkg/utils/yq_utils_test.go— added IPv6 cases toTestIsScalarString,TestIsMisinterpretedScalar, andTestEvaluateYqExpression_ARNWithTrailingColons; newTestEvaluateYqExpression_IPv6Scenarioexercises individual values, maps of addresses, and nested extractioninternal/exec/yaml_func_terraform_state_yq_defaults_test.go— newTestTerraformState_IPv6StringPreservedexercises the full!terraform.statepipeline via mock for::,2001:db8::,2041:0000:140F::875B::,::1, and2001:db8::1internal/exec/yaml_func_terraform_state_test.go+ fixtures — integration subtest"IPv6 address string preservation"usingcomponent-ipv6-source→component-ipv6-consumer; addedipv6var/output to the mock Terraform componentWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.bitbucket.org/tmp/go-build1991828671/b001/utils.test /tmp/go-build1991828671/b001/utils.test -test.paniconexit0 -test.count=1 -test.timeout=2m0s /tmp/go-build1991828671/b1274/vet.cfg 6793371/b1186/ve-errorsas .cfg ux-amd64/pkg/tool/linux_amd64/vet /bubbles@v1.0.0//home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.linux-amd64/pkg/too/tmp/go-build1991828671/b1240/vet.cfg(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.