pulumi/pkg
Pat Gavlin c173258b37 [cli/import] Minimize logical name changes
The trickiest job we do while parsing the import file is name
disambiguation.

The name of an import serves as both the logical name of the imported
resource (e.g. "foo" in `new aws.s3.Bucket("foo")`) and as the name of
the resource's definition (e.g. `foo_1` in
`const foo_1 = new aws.s3.Bucket("foo")`). The logical name of the
resource need only be unique within its qualified type--that is, two
resources may have the same logical name if they are of different types
or have different ancestors--but the name of the resource's definition
must always be unique.

Other systems that serve as input for import (notably Terraform) also
have this sort of peculiar type-based namespacing. We often see
overlapping names when importing from these systems. In order to make
`pulumi import` cooperate nicely with `pulumi convert`, we need the
logical names of the imported resource to agree with the logical name of
the corresponding converted resource.

To address this:
- We only change the logical name of a resource if not doing so would
  cause it to conflict with another resource (i.e. because they end up
  with the same URN)
- We change the definition name of a resource if not doing so would
  cause its definition in the generated source to conflict with another
  resource
2023-11-30 09:51:19 -08:00
..
authhelpers Add tests for gcpauth pkg (#13926) 2023-09-13 11:27:03 +00:00
backend [esc] Add a command to create an ESC env from stack config (#14634) 2023-11-22 20:57:02 +00:00
cmd/pulumi [cli/import] Minimize logical name changes 2023-11-30 09:51:19 -08:00
codegen [schema] Fixes marshalling the "plain" flag from object or resource properties (#14648) 2023-11-27 11:05:03 +00:00
display Move sdk/go/common/display to /pkg/display (#13954) 2023-09-18 11:01:28 +00:00
engine Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
graph Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
importer GenerateHCL2Definition should respect logical names (#14639) 2023-11-22 17:43:30 +00:00
operations Allow anything in resource names (#14107) 2023-11-20 08:59:00 +00:00
resource Allow anything in resource names (#14107) 2023-11-20 08:59:00 +00:00
secrets Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
testing/integration Switch to use env.Env in filestate (#14044) 2023-10-18 10:52:54 +00:00
util Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
version duplicate version to ensure linking is properly handled 2020-03-19 12:49:34 -07:00
workspace Actually disable plugin acquisition (#14134) 2023-10-14 08:32:43 +00:00
README.md export codegen tests for internal use (#8928) 2022-02-07 12:10:04 +01:00
go.mod [cli/import] Minimize logical name changes 2023-11-30 09:51:19 -08:00
go.sum [esc] Add commands for managing stack environments (#14628) 2023-11-22 05:04:14 +00:00

README.md

pulumi/pkg

While pulumi/sdk maintains strict backwards compatibility guarantees, code under pkg/ is handled more informally: while breaking changes are still discouraged they may happen when they make sense.