pulumi/CHANGELOG_PENDING.md
Justin Van Patten 414ef7e9d0
[programgen/go] Don't change imported resource names (#8353)
When importing a resource in Go, we change resource names with hyphens to snake_case. This happens because we introduced a change that converts the resource name to a valid Go identifier so it can be used as a local variable. But we were also using this converted name as the string resource name, which causes problems with import: the imported resource in the state file has the original resource name, but the generated program uses the converted name, causing Pulumi to delete and recreate the resource when adopting the generated import code.

This change fixes the issue by maintaining the original resource name, and only using the converted name for variables.
2021-11-04 09:28:48 -07:00

146 B

Improvements

Bug Fixes

  • [programgen/go] - Don't change imported resource names. #8353