pulumi/pkg/codegen/hcl2
Pat Gavlin 69ba47cff2
[codegen/*] Add support for resource options. (#4925)
The PCL binder has supported resource options for some time, but these
options haven't been used or processed by the various code generators.
These options--particularly the parent and provider options0--are
critical for import codegen. These changes implement the basic set of
options, and add a note about fleshing out the rest as necessary.

One component of these changes is a new rewriter that rewrites property
references into property paths that are understood by the Pulumi engine.
This rewriter is used to preprocess the contents of the `ignoreChanges`
resource option.

These changes also hack around a weakness in the HCL2 type system:
In Go, references to resources should be typed as `hcl2.ResourceType`.
Unfortunately, this breaks the existing collection semantics associated
with resources. Because of this, the Go code generator does not have
enough information to know that it should generate a `[]pulumi.Resource`
for lists of resources. These changes hack around that limitation using
a Go-specific opaque type and some hardcoded comparisons in
`argumentTypeName`.

Fixes #4923.
2020-06-29 16:33:52 -07:00
..
model [codegen/hcl2] Fix assignability from dynamic. (#4704) 2020-05-26 09:05:42 -07:00
syntax [codegen/hcl2] Fix template control tokens. (#4584) 2020-05-07 09:12:00 -07:00
binder.go Resolve referenced packages for every TF program (#4636) 2020-05-15 19:18:07 +02:00
binder_nodes.go [codegen] Add support for caching package schemas. (#4534) 2020-04-30 13:22:24 -07:00
binder_resource.go [codegen/*] Add support for resource options. (#4925) 2020-06-29 16:33:52 -07:00
binder_schema.go Go basic program gen (#4667) 2020-05-21 10:23:33 -07:00
binder_schema_test.go [codegen/hcl2] Refactor package schema loading. (#4661) 2020-05-18 17:35:11 -07:00
binder_test.go [codegen] Add support for caching package schemas. (#4534) 2020-04-30 13:22:24 -07:00
component.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
config.go Codegen: collect imports from function calls. (#4445) 2020-04-21 10:24:42 -07:00
diagnostics.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
functions.go Fix the entries() signature 2020-05-01 13:10:56 -07:00
intrinsics.go [Go Program Gen] Improved type handling and invokes (#4749) 2020-06-05 18:52:00 -07:00
invoke.go [codegen/nodejs] Await invokes in async contexts. (#4598) 2020-05-11 10:21:56 -07:00
local.go Codegen: collect imports from function calls. (#4445) 2020-04-21 10:24:42 -07:00
output.go Codegen: collect imports from function calls. (#4445) 2020-04-21 10:24:42 -07:00
program.go Resolve referenced packages for every TF program (#4636) 2020-05-15 19:18:07 +02:00
resource.go [codegen/*] Add support for resource options. (#4925) 2020-06-29 16:33:52 -07:00
rewrite_apply.go [codegen/hcl2] Fix iterator apply rewrites. (#4589) 2020-05-07 12:15:40 -07:00
rewrite_apply_test.go [codegen/hcl2] Fix iterator apply rewrites. (#4589) 2020-05-07 12:15:40 -07:00
rewrite_convert.go [codegen/hcl2] Fixes for RewriteConversions. (#4743) 2020-06-02 12:00:35 -07:00
rewrite_convert_test.go [codegen/hcl2] Fixes for RewriteConversions. (#4743) 2020-06-02 12:00:35 -07:00
rewrite_properties.go [codegen/*] Add support for resource options. (#4925) 2020-06-29 16:33:52 -07:00
type.go Various codegen updates. (#4424) 2020-04-16 16:44:34 -07:00
utilities.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00