Commit graph

60 commits

Author SHA1 Message Date
Komal
00f8966a9a
[codegen/nodejs] - Fix typescript enum issues (#5696)
Co-authored-by: Levi Blackstone <levi@pulumi.com>
2020-11-06 09:29:49 -08:00
Komal
e9dbada593
[codegen/dotnet] - Enums (#5551) 2020-11-06 09:01:03 -08:00
Levi Blackstone
5188ec4c9f
[codegen/schema] Add support for external schema refs (#5606) 2020-10-29 17:41:12 -06:00
Komal
ec9c02f578
Add tests for ts enums (#5605) 2020-10-22 10:53:29 -07:00
Levi Blackstone
99ba1ab943
[codegen/dotnet] Add support for ResourceType and isComponent (#5460) 2020-10-13 12:33:22 -06:00
Komal
af9f636eef
Split schema tests by language (#5540) 2020-10-10 13:47:23 -07:00
Komal
6c51e6ce1c
[codegen/nodejs] - Update enum generation (#5525) 2020-10-09 08:27:01 -07:00
Vivek Lakshmanan
08272ff49a
Merge pull request #5520 from pulumi/vl/dotnetProgramGen
Fix config params and default handling for .NET programgen
2020-10-08 00:30:11 -07:00
Komal
7039e67284
[codegen/nodejs] - Enums (#5472) 2020-10-07 18:13:10 -07:00
Vivek Lakshmanan
a0ee220243 Convert config params to outputs only if promise types are seen 2020-10-07 12:29:33 -07:00
Vivek Lakshmanan
f4235f27a1 Fix config params and default handling for .NET programgen
Fixes https://github.com/pulumi/pulumi-azure-nextgen/issues/42
2020-10-07 09:59:23 -07:00
Vivek Lakshmanan
e49ba01f8f PR comments 2020-10-06 16:13:49 -07:00
Vivek Lakshmanan
ea75755d88 Add test scaffolding for azure provider 2020-10-06 16:13:30 -07:00
Levi Blackstone
64602798b1
[codegen/python] Don't generate get methods for ComponentResources (#5459) 2020-09-30 10:16:25 -06:00
Komal
59b906eb76
Update nodejs gen-tests (#5477) 2020-09-29 16:00:03 -07:00
Levi Blackstone
9363f606b6
[codegen/schema] Add IsComponent to resource schema (#5395)
Add support for ComponentResources to the schema by
adding a new IsComponent field to the Resource spec.
2020-09-23 18:23:46 -06:00
Levi Blackstone
81580289a7
[codegen/python] Handle ResourceType (#5444) 2020-09-23 13:39:25 -06:00
Levi Blackstone
3ea59ebbb8
[codegen/schema]: Add ResourceType to support resource refs (#5325) 2020-09-22 11:09:27 -06:00
Komal
a334b60193
Only allow type-matching enum values (#5417)
* Only allow type-matching enum values

* More tests and fixes
2020-09-21 12:23:04 -07:00
Evan Boyle
c9d8549ae6
[Go Program Gen] Only generate a single literal when traversing a union type (#5154) 2020-08-11 11:43:56 -07:00
Komal
2f2e62e2e4
[codegen/python] - Normalize module names in program gen (#5128) 2020-08-07 09:30:07 -07:00
Mikhail Shilkov
0c9d1fdd0e
Fix C# program gen for Kubernetes examples (#5129) 2020-08-07 09:31:42 -06:00
Pat Gavlin
e5f44a7b0c
Use a package map where appropriate (#5127)
* Use a package map where appropriate

* Fix imports

* handle NoneType for literal value expressions in go program gen

* add operator tests for c#, python, and node

Co-authored-by: evanboyle <evan@pulumi.com>
2020-08-06 19:09:18 -07:00
Komal
ff219a2381
Use input/output classes in program gen (#5086) 2020-08-06 15:09:23 -07:00
Evan Boyle
fbf391fd4b
Merge pull request #5115 from pulumi/evan/fixKubeProgramGen
[Go Program Gen] Fix various Kubernetes issues
2020-08-05 17:30:23 -07:00
evanboyle
2f71fbbf2d traverse object and tuple cons expressions for imports 2020-08-05 15:23:36 -07:00
Komal
269b537e57
[codegen/python] - Fix python resource tokens (#5107) 2020-08-05 12:50:54 -07:00
evanboyle
8af3be1e3f account for import aliases in program expressions 2020-08-05 12:44:46 -07:00
evanboyle
e2e6db47f7 use import aliases in Go program gen 2020-08-05 11:42:38 -07:00
Evan Boyle
13ee9fd4c8
tests for kubernetes program generation (#5105) 2020-08-05 09:15:36 -07:00
Pat Gavlin
a8a20ecb4b
[codegen/*] Add support for explicit secrets. (#4927)
- Add a new builtin function, secret, that marks its input value as
  secret
- Add support for this function to the various code generators

Fixes #4924.
2020-06-30 11:35:24 -07:00
Evan Boyle
395a68e0f6
[Go program gen]: namespaceless resources (#4915) 2020-06-29 18:10:34 -07:00
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
Evan Boyle
91828b4310
[Go Program Gen] Improved handling for pulumi.Map types (#4914) 2020-06-29 15:29:41 -07:00
Evan Boyle
31770c3300
go program gen: prompt array conversion, unused range vars, id handling (#4884) 2020-06-24 11:07:26 -07:00
Evan Boyle
b302dbcbca
go program gen: lift expressions where prompt optionals are required (#4875) 2020-06-23 10:59:26 -07:00
evanboyle
2ba1fd608a go program gen All.Apply func rewriter 2020-06-18 17:17:51 -07:00
evanboyle
7f2a83ae5a Revert "go program gen All.Apply rewriter"
This reverts commit bdd240f522.
2020-06-18 16:57:55 -07:00
evanboyle
bdd240f522 go program gen All.Apply rewriter 2020-06-18 16:56:26 -07:00
Evan Boyle
8b8170252b
[Go Program Gen] multiline strings, get/lookup disambiguation, webserver example (#4850) 2020-06-18 13:34:22 -07:00
Evan Boyle
9cdddd2566
[Go Program Gen] Support for EKS example (#4831) 2020-06-17 17:19:39 -07:00
Evan Boyle
2d61852e4f
Go program gen: resource range, readDir, template strings, etc (#4818) 2020-06-15 23:00:02 -07:00
Evan Boyle
94cd67b564
[Go Program Gen] Improved type handling and invokes (#4749) 2020-06-05 18:52:00 -07:00
Evan Boyle
ea114b04ee
output generation for s3 logging example (#4681) 2020-05-26 07:07:54 -07:00
Evan Boyle
8dd329f57f
Go basic program gen (#4667) 2020-05-21 10:23:33 -07:00
Mikhail Shilkov
f66100ce28
Initial support for C# program gen (#4611)
Initial support for C# program gen
2020-05-19 10:18:38 +02:00
Evan Boyle
0d257bb32d
go gen_program shell + test + sample (#4630) 2020-05-14 08:43:12 -07:00
Pat Gavlin
255620ea1e
[codegen/nodejs] Await invokes in async contexts. (#4598)
If we are generating code into an async context (e.g. an async main),
await calls to invoke rather than leaving them as promises. This results
in more idiomatic code withing such contexts.
2020-05-11 10:21:56 -07:00
Pat Gavlin
fc00c16e31
[codegen/hcl2] Fix iterator apply rewrites. (#4589)
There are two expressions in HCL2 that are used to iterate over
collections:

- Splat expressions, e.g. `foo.*.bar`, and
- For expressions, e.g. `[for v in foo: v.bar]`

In both of these cases, the parts of the expression that are not the
collection being iterated behave like callbacks, and must be treated as
such by the apply rewriter.
2020-05-07 12:15:40 -07:00
Pat Gavlin
f23b98a7df
[codegen/nodejs] Fix #4563. (#4579)
Do not wrap non-output-typed arguments to `pulumi.all` in
`pulumi.output`. `pulumi.all` does this implicitly.

Fixes #4563.
2020-05-06 10:09:20 -07:00