Commit graph

4845 commits

Author SHA1 Message Date
Pat Gavlin cb8066d74a
[codegen/hcl2] Fix ForExpression.Evaluate. (#4701)
This expression was not evaluated correctly when producing a dictionary.
2020-05-26 09:05:35 -07:00
Pat Gavlin 05032d6850 [codegen/hcl2] Fix assignability from dynamic.
Types like output(T), promise(T), and union(T_0, ..., T_N) should be
assignable from dynamic if they contain an element type that is
assignable from dynamic.

This allows consumers to use the following code to check if some type
behaves like the dynamic type w.r.t. conversions:

```
if t.AssignableFrom(model.DynamicType) {
}
```

Fixes #4703.
2020-05-26 08:21:09 -07:00
Evan Boyle ea114b04ee
output generation for s3 logging example (#4681) 2020-05-26 07:07:54 -07:00
Tomas Jansson 1bdfd3dd41
Add F# operators for InputUnion (#4699) 2020-05-26 14:18:56 +02:00
Chris Smith f613b6917b
Download plugins from get.pulumi.com (#4692)
* Remove long-since deprecated --cloud-url flag

* Download plugins from get.pulumi.com

* Update CHANGELOG.md

* Use more straight forward TrimSuffix
2020-05-25 09:16:57 -07:00
Paul Stack 33db097176
Fixup broken bash check for npmshrink-wrap.json file 2020-05-25 14:36:20 +01:00
Justin Van Patten 6b0a845cc1
Support publishing Python policy packs (#4644)
Adds support for publishing Python policy packs to the service, and downloading/using such policy packs when applied to stacks in an organization.
2020-05-22 15:01:15 -07:00
Sean Holung c538db64c8
Anchoring properties (#4488) 2020-05-22 14:53:34 -07:00
Pat Gavlin 5330c97684
[codegen/hcl2/model] Remove type caches. (#4683) 2020-05-22 10:47:34 +01:00
Mikhail Shilkov 7e3b60b3d1
Fix C# (and a bit of Node.js) program gen based on errors from AWS samples (#4673) 2020-05-22 08:46:25 +02:00
Lee Zen 8bc3d0e906
Fix single-quote examples in command help (#4680) 2020-05-21 14:27:30 -07:00
Evan Boyle 8dd329f57f
Go basic program gen (#4667) 2020-05-21 10:23:33 -07:00
Zack Chase 0f17d7a21e
Merge pull request #4647 from pulumi/zchase/readme-youtube-video
Add YouTube video to README.md
2020-05-20 09:55:09 -07:00
Justin Van Patten af3d4b890d
Allow pulumi.export calls from unit tests (#4670)
The previous attempt to allow this didn't actually allow it, so this is
take two. As part of the previous attempt, I thought after tweaking the
test I had observed the test failing, and then succeeding after making
the product changes, but I must have been mistaken.

It turns out that our existing mocks tests weren't running at all
because of a missing `__init__.py` file. Once the missing `__init__.py`
is added, the tests run, but other tests ("test mode" tests) fail
because the code that creates the mocks and resources will run during
test discovery, and setting the mocks modifies global state.

To address the test issue, I've moved the mocks tests into their own
`test_with_mocks` package that can be run separately from other tests.

And addressed the original issue, by creating a root Stack resource if
one isn't already present when the mocks are set.
2020-05-20 09:54:40 -07:00
Lee Briggs bfe99021a1
Merge pull request #4643 from pulumi/feature/go-cloud-azurekeyvault-regions
Use patched azure gocloud library
2020-05-19 19:15:35 -07:00
Lee Briggs e2554e446f
Merge branch 'master' into feature/go-cloud-azurekeyvault-regions 2020-05-19 16:51:26 -07:00
Evan Boyle 20452b9cb5
fix dotnet error (#4668) 2020-05-19 12:06:24 -07:00
Lee Briggs afb9456aa8
Remove replace for gocloud.dev 2020-05-19 08:09:58 -07:00
Lee Briggs 362fc8d7f2
Merge branch 'master' into feature/go-cloud-azurekeyvault-regions 2020-05-19 08:07:09 -07:00
Mikhail Shilkov adfa8116fb
Introduce k8s compatibility mode to C# codegen (#4544)
Introduce k8s compatibility mode to C# codegen
2020-05-19 11:41:06 +02:00
Dan Hernandez a46731f36c
Include case when attempting to escape the . in a name. (#4513) 2020-05-19 10:11:58 +01: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
Pat Gavlin 088751a4a8
[codegen/hcl2] Refactor package schema loading. (#4661)
- Move the implementation of loadPackageSchema into a method on
  PackageCache
- Protect the cache with synchronization primitives to enable
  concurrency in downstream consumers
- Use jsoniter to deserialize schemas
2020-05-18 17:35:11 -07:00
Mikhail Shilkov 5b0c4e162d
Fix NRE in C# mocks and include the stack to result again (#4656)
Fix NRE in C# mocks and include the stack to result again
2020-05-18 17:18:12 +02:00
Lee Briggs 72766fd4e6
Use latest upstream of gocloud.dev 2020-05-18 07:43:41 -07:00
Lee Briggs 728d889bf8
Use patched azure gocloud library
Fixes #4642
2020-05-18 07:43:35 -07:00
Lee Briggs e045c2ac71
# This is a combination of 2 commits.
# This is the 1st commit message:

Use patched azure gocloud library

Fixes #4642

# The commit message #2 will be skipped:

# sync with pulumi-master branch
2020-05-18 07:43:20 -07:00
Praneet Loke 30b12cff49
[codegen/docs] Various Go-related fixes (#4646)
* Remove code that was hiding Go as a language option for k8s overlay resources. Mark input args type for Functions as optional in Go.

* Show a special note in the Go function's snippet when the function name does not match other languages.

* Make sure the draft PR stays assigned to the original author. Add some more comments.

* Remove logic to use the Go ModuleToPackage map to then lookup the relevant C# namespace. Make getLanguageModuleName a method of modContext since passing in a package is not needed anymore.
2020-05-15 17:33:56 -07:00
Mikhail Shilkov 5b410ec440
Resolve referenced packages for every TF program (#4636) 2020-05-15 19:18:07 +02:00
Zack Chase 26385a66ba Make youtube preview smaller 2020-05-15 09:52:23 -07:00
Sean Holung f5ed6190ba
Link Python and Go constructors (#4593) 2020-05-15 09:51:24 -07:00
Zack Chase 9bb5ae8e59 Move youtube video lower on page 2020-05-15 09:50:10 -07:00
Zack Chase 054652e3fb Remove iframe use linking strategy 2020-05-15 09:38:01 -07:00
Zack Chase 81c6049d06 Add youtube video to readme 2020-05-15 09:14:54 -07:00
Pat Gavlin e677c7d6dc
[sdk/go] Add support for untagged outputs. (#4640)
With these changes, a resource struct may tag a field with the empty
string. If such a field is present, any resource outputs that were not
unmarshalled into other fields will be unmarshalled into this field,
which must be a `MapOutput`.

Fixes #4629.
2020-05-14 14:43:20 -06:00
Pat Gavlin e9dd0e5e69
[codegen/schema] Path unescape type tokens in refs (#4641)
Some type tokens contain characters that are not valid in a single
URL path element (`/` in particular). These type tokens may be
path-escaped, and should be unescaped before they are interpreted.
2020-05-14 13:35:57 -07:00
Lee Briggs cae7743863
Add integration tests for gcp and azure (#4525) 2020-05-14 18:19:10 +01:00
Chris Smith 729f7a64c7
Only mount a directory with the test binary into the container (#4639) 2020-05-14 10:05:59 -07:00
Evan Boyle 0d257bb32d
go gen_program shell + test + sample (#4630) 2020-05-14 08:43:12 -07:00
Lee Briggs d01a84eee8
Prepare for v2.2.1 release 2020-05-13 20:52:44 -07:00
Lee Briggs f2a5883cb3
Merge pull request #4633 from pulumi/pgavlin/makeBrew
Add a brew target.
2020-05-13 20:48:24 -07:00
Lee Briggs 8c314ec39a
Add brew make targets to sdk makefiles 2020-05-13 20:42:01 -07:00
Pat Gavlin f50e2d8c1b Add a brew target.
This is necessary for the Homebrew build.
2020-05-13 20:27:15 -07:00
Pat Gavlin 8f0a002a26
Generate deprecation comments in Go. (#4631)
This is consistent with the convention for marking members as
deprecated: https://github.com/golang/go/wiki/Deprecated.
2020-05-13 17:12:59 -07:00
Lee Briggs a5c08a74fe
Prepare for v2.2.0 release 2020-05-13 13:49:00 -07:00
Paul Stack 490da8e4d7
Run npm ci if lock or shrinkwrap file found (#4622) 2020-05-13 19:32:36 +01:00
Pat Gavlin 99852bc18e
[codegen/nodejs] SDK generator fixes. (#4618)
- Add support for constant values in unions (e.g. `"foo" | "bar"`)
- Generate `Input<T | U>` instead of `Input<T> | Input<U>`
- Emit deprecation messages for resources
- Handle nil state inputs
- Allow packages to provide a README
- Remove sync invoke support

These changes are part of
https://github.com/pulumi/pulumi-terraform-bridge/issues/179, and
restore functional parity with the current `tfgen` generator.
2020-05-13 10:55:37 -07:00
Praneet Loke 54f5a0ac36
[codegen/docs] Use the C# namespaces override map for links. (#4616) 2020-05-13 09:32:40 -07:00
Paul Stack 0318ef1402
Pass yes as a parameter to the actions entrypoint (#4458) 2020-05-13 16:30:53 +01:00
Pat Gavlin 647b6627a2
[codegen/hcl2] Fix descent in RewriteConversions. (#4614)
Descend into anonymous function expressions, the operands to conditional
expressions, and the value in for expressions.
2020-05-13 08:25:26 -07:00