Commit graph

779 commits

Author SHA1 Message Date
Paul Stack 36db22d488
Ensure secret provider variables are cleaned up when changing secret providers (#5545)
Fixes: #5509

When changing from a passphrase provider to a cloud secrets provider,
the encryptionsalt is not required, so we should ensure this is removed
2020-10-10 19:04:07 +01:00
Pat Gavlin 249140242e
Add support for provider-side preview. (#5443)
These changes add support for provider-side previews of create and
update operations, which allows resource providers to supply output
property values for resources that are being created or updated during a
preview.

If a plugin supports provider-side preview, its create/update methods
will be invoked during previews with the `preview` property set to true.
It is the responsibility of the provider to fill in any output
properties that are known before returning. It is a best practice for
providers to only fill in property values that are guaranteed to be
identical if the preview were instead an update (i.e. only those output
properties whose values can be conclusively determined without
actually performing the create/update operation should be populated).
Providers that support previews must accept unknown values in their
create and update methods.

If a plugin does not support provider-side preview, the inputs to a
create or update operation will be propagated to the outputs as they are
today.

Fixes #4992.
2020-10-09 13:13:55 -07:00
evanboyle bf68108193 changelog 2020-10-08 12:19:01 -07:00
Mikhail Shilkov 879066a60b
Execute self-contained .NET binary (#5519)
* Execute self-contained .NET binary
* Skip dotnet lookup for self-contained binaries
2020-10-07 11:46:24 +02:00
Justin Van Patten df75f0ed95
Support remote components in .NET (#5485) 2020-10-06 10:19:22 -07:00
Luke Hoban 32f13fabfa Merge branch 'fix_gzip_compression' of https://github.com/birdypme/pulumi into birdypme-fix_gzip_compression 2020-10-05 13:52:23 -07:00
Joe Duffy 12e5e46c73
Handle blank project names in 'new' (#5504)
The logic for validating prompted values in 'new' wasn't quite right,
leading to the possibility of creating Pulumi.yaml files with blank
project names.

This manifests in various ways and I've hit it a number of times
over the past few months because of the way we handle project/stack
name conflicts in 'new' -- which itself is a bit annoying too:

https://github.com/pulumi/pulumi/blob/master/pkg/cmd/pulumi/new.go#L206-L207

Because we substitue a default value of "", and because the prompting
logic assumed default values are always valid, we would skip validation
and therefore accept a blank Pulumi.yaml file.

This generates an invalid project which causes errors elsewhere, such as

    error: failed to load Pulumi project located at ".../Pulumi.yaml":
        project is missing a 'name' attribute

I hit this all the time with our getting started guide because I've
gone through it so many times and have leftover stacks from prior
run-throughs. I wouldn't be surprised if a lot of people hit this.

The solution here validates all values, including the default.

Note also that we failed to validate the value used by 'new --yes'
which meant you could bypass all validation by passing --yes, leading
to similar outcomes.

I've added a couple new tests for these cases. There is a risk we
depend on illegal default values somewhere which will now be rejected,
but that would seem strange, and assuming the tests pass, I would
assume that's not true. Let me know if that's wrong.

Fixes pulumi/pulumi#3255.
2020-10-05 13:40:24 -07:00
Mikhail Shilkov 3a2d7356a2
Quit if a static passphrase is invalid (#5507) 2020-10-05 14:57:48 +01:00
Mike Metral 08c8848375 feat(autoapi): expose EnvVars LocalWorkspaceOption to set in ctor 2020-10-02 09:01:28 -07:00
Julien Champseix 408d3cf219
Merge branch 'master' into fix_gzip_compression 2020-10-02 09:41:21 +02:00
stack72 b901292228 Prepare for v2.11.2 release 2020-10-01 23:09:23 +01:00
Justin Van Patten 97c006b5ce
[sdk/python] Fix secret regression (#5496)
A recent change to output deserialization resulted in secrets being returned unwrapped. This change addresses the regression, ensuring any unwrapped secret values are rewrapped before being returned.
2020-10-01 14:57:51 -07:00
Julien Champseix f2b75b1e5f Merge branch 'master' into fix_gzip_compression 2020-10-01 09:22:12 +02:00
Lee Briggs cedab0003b
Prepare for v2.11.1 release 2020-09-30 17:13:03 -07:00
Justin Van Patten 9bcf02e7ed
Support remote components in Python (#5375) 2020-09-30 14:09:20 -07:00
Julien Champseix 15bb586fa3 updated CHANGELOG 2020-09-30 23:06:13 +02:00
Lee Briggs d4263acbcf
Prepare for v2.11.0 release 2020-09-30 11:00:47 -07:00
Mikhail Shilkov 5e3c14c8be
[dotnet] Allow resources to define outputs of Output<object> (#5465) 2020-09-28 18:00:02 +02:00
jetvova b4c2a3521c
Fixed issue #5014 (Missing Pulumi console tags on Windows) (#5406)
Co-authored-by: Paul Stack <public@paulstack.co.uk>
2020-09-25 15:04:18 +01:00
Pat Gavlin 3278b6bf91
Simplify types more precisely. (#5440)
Instead of simplifying any module that ends with `/<name>`, only simplify
types where `<name>` matches the type name portion after camel-casing.
This continues to simplify tfbridge types like `aws:s3/bucket:Bucket`,
but would not simplify a type like `aws:s3:Bucket`.
2020-09-22 10:34:16 -07:00
Justin Van Patten 971a8bbacf Prepare for v2.10.2 2020-09-21 11:51:56 -07:00
Justin Van Patten 5794a3f482
[sdk/python] Cast numbers intended to be integers to int (#5419)
We recently made a change to the Python codegen to emit `int` type annotations, instead of `float`, for properties that are typed as `schema.IntType`.

But the number values that come back from protobuf structs are always floats (like JSON), so we need to cast the values intended to be integers to `int`.
2020-09-19 21:09:53 -07:00
Sean Holung c6dcb67677
Add pulumi console command (#5368) 2020-09-18 12:47:18 -07:00
Levi Blackstone ab70dd3d64
[sdk/go] Add missing Version field to invokeOptions (#5401) 2020-09-17 12:21:50 -06:00
stack72 a7abb37b70 Prepare for v2.10.1 release 2020-09-16 16:02:33 +01:00
Evan Boyle 0e3666cc36
Automation API - add recovery APIs (cancel/export/import) (#5369) 2020-09-15 14:20:58 -07:00
Mike Metral 4e6ea760db feat(autoapi): add GetPermalink for operation result 2020-09-15 10:49:02 -07:00
Evan Boyle c23ca46382
Automation API - add the ability to stream progress updates during up/refresh/destroy (#5367) 2020-09-14 18:56:04 -07:00
Evan Boyle c05ac500da
[Automation API] remove stack name validation and fqsn enforcement (#5337) 2020-09-14 17:45:07 -07:00
Pat Gavlin 855f1fd1cd
Revise host mode. (#5317)
* Revise host mode.

The current implementation of host mode uses a `pulumi host` command and
an ad-hoc communication protocol between the engine and client to
connect a language host after the host has begun listening. The most
significant disadvantages of this approach are the communication
protocol (which currently requires the use of stdout), the host-specific
command, and the difficulty of accommodating the typical program-bound
lifetime for an update.

These changes reimplement host mode by adding engine support for
connecting to an existing language runtime service rather than launching
a plugin. This capability is provided via an engine-specific language
runtime, `client`, which accepts the address of the existing languge
runtime service as a runtime option. The CLI exposes this runtime via
the `--client` flag to the `up` and `preview` commands, which similarly
accepts the address of an existing language runtime service as an
argument. These changes also adjust the automation API to consume the
new host mode implementation.
2020-09-14 17:40:17 -07:00
Paul Stack aafe84d823
Add support for cloning private repos as part of automation API (#5333) 2020-09-14 20:24:57 +01:00
Gili Tzabari 0504780346
Update CHANGELOG.md (#5342)
Fixed typo
2020-09-14 18:29:07 +01:00
Paul Stack 9a46dad7d0
Add the ability to set the passphrase secrets provider to read from a passphrase file (#5327)
* Addthe ability to set the passphrase secrets provider to read from a passphrase file

* Feedback about removing newlines
2020-09-11 22:25:47 +01:00
Mikhail Shilkov f0386bec8d
Prevent concurrency issues when completing tasks (#5324)
* Prevent concurrency issues when completing tasks
2020-09-11 14:34:43 +02:00
stack72 848a98d511 Prepare for v2.10.0 release 2020-09-10 19:30:56 +01:00
Paul Stack 9a74064d2b
Allow passing a non-default secrets provider to AutomationAPI (#5320) 2020-09-10 19:25:47 +01:00
Mike Metral 49152e6331 feat(autoapi): add Upsert methods for stacks 2020-09-10 09:49:49 -07:00
Mike Metral 51c235352c feat(autoapi): add IsSelectStack404Error and IsCreateStack409Error 2020-09-09 17:13:50 -07:00
Justin Van Patten d0ba9fbdcd
[sdk/python] Add support for Sequence (#5282)
We currently emit array types as `List[T]` for Python, but `List[T]` is invariant, which causes type checkers like mypy to produce errors when values like `["foo", "bar"]` are passed as args typed as `List[pulumi.Input[str]]` (since `Input[str]` is an alias for `Union[T, Awaitable[T], Output[T]]`. To address this, we should move to using [`Sequence[T]`](https://docs.python.org/3/library/typing.html#typing.Sequence) which is covariant, and does not have this problem.

We actually already do this for `Dict` vs. `Mapping`, emitting map types as `Mapping[str, T]` rather than `Dict[str, T]` because `Mapping[str, T]` is covariant for the value. This change makes us consistent for array types.

These are the SDK changes necessary to support `Sequence[T]`.
2020-09-08 22:22:35 -07:00
evanboyle 6cc095be07 changelog 2020-09-08 17:31:44 -07:00
Pat Gavlin 2585b86aa4
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.

Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.

The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.

These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).

An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.

This is the core of #2430.
2020-09-07 19:33:55 -07:00
Mike Metral 46da25492e feat(autoapi): add workspace scoped envvars to LocalWorkspace and Stack 2020-09-03 09:57:23 -07:00
Mike Metral dec6a6a49a refactor(autoapi-gitrepo): use Workspace in SetupFn callback 2020-09-02 19:15:40 -07:00
stack72 c5c6f7c780 Prepare for v2.9.2 release 2020-08-31 17:15:42 +01:00
Justin Van Patten d13b840b43
Update changelog (#5261) 2020-08-31 08:58:43 -07:00
Evan Boyle 09964d2031
Merge branch 'master' into evan/auto 2020-08-28 19:11:14 -07:00
Justin Van Patten 69fbd70330
Python: Ignore internal properties when unmarshaling (#5251) 2020-08-28 18:26:16 -07:00
Scott Murray 60fcc1951b Added --suppress-permalink option
Added `--suppress-permalink` option to suppress the permalink output which addresses https://github.com/pulumi/pulumi/issues/4103
2020-08-28 21:37:48 +01:00
Evan Boyle ed2e5c6680
Merge branch 'master' into evan/auto 2020-08-28 08:48:08 -07:00
stack72 c42e3ca80a Prepare for v2.9.1 release 2020-08-27 23:07:46 +01:00
Justin Van Patten 16d226d667
Avoid raising unexpected type errors with Any (#5238)
Avoid raising an `AssertionError` due to unexpected types when a type is annotated as `Any`.
2020-08-27 12:19:46 -07:00
evanboyle 7fcf833b80 changelog 2020-08-25 12:05:27 -07:00
stack72 bfb43f047d Prepare for v2.9.0 release 2020-08-19 20:00:57 +01:00
Justin Van Patten cd9fae599d
Python SDK changes to support input/output classes (#5033)
Python SDK changes to support strongly-typed input/output "dataclasses".
2020-08-19 01:15:56 -07:00
Ollie Gray 6eb475ab95
Enable pushing to Artifact Registry in actions (#5075) 2020-08-19 00:29:22 -07:00
Luke Hoban 2470d59efb
Revert "Added --suppress-permalink option (#5177)" (#5185)
This reverts commit f8d929d197.
2020-08-18 08:50:44 -07:00
Scott Murray f8d929d197
Added --suppress-permalink option (#5177) 2020-08-17 22:11:44 -07:00
Lee Briggs 3a01c0cde8
Merge pull request #5150 from pulumi/jar-extract
support extracting jar files
2020-08-12 09:58:26 -07:00
stack72 d190247ede The history command should be a subcommand of stack
Fixes: #5134

This ensures that `pulumi history` has been deprecated in favor of
the new `pulumi stack history` command. The deprecated command will
be removed in v3.0.0 of Pulumi
2020-08-11 17:52:51 +01:00
Paul Stack 44a806180b
Bump version of go-cloud to v0.20.0 (#5156) 2020-08-11 17:48:56 +01:00
Lee Briggs c325e4f53b
Merge branch 'justin/testresource' into jar-extract 2020-08-10 18:14:43 -07:00
Luke Hoban 5066ae3227
Fix support for CheckFailures in Python Dynamic Providers (#5139)
Fixes #5138.
2020-08-10 09:28:25 -07:00
stack72 347a71b377 Prepare for v2.8.2 release 2020-08-07 21:36:09 +01:00
stack72 5f4bfab192 Ensure Project Stack is not loaded and saved unnecessariliy for default secrets manager
Fixes: #5126

In the newServiceSecretsManager, we were loading and saving the project stack
without understanding if any changes had actually been made - e.g. changing the
stack to be a new secrets provider

This has now been guarded against, tests added to understand when it will
actually be saved and we no longer get unnecessary config sorting when interacting
with a default stack AND no longer get an empty config map in our config
file when we initiate a new stack with a default secrets provider
2020-08-07 21:31:57 +01:00
Luke Hoban 4e0b5df981
Support publishing and consuming policy packs using any runtime (#5102)
Fixes #5089.
2020-08-06 16:33:59 -07:00
Marcus Turewicz f39df9f030
Add nuget badge to README (#5117)
* Add nuget badge to README

* Update CHANGELOG.md
2020-08-05 20:31:33 -07:00
stack72 d4f18fdd65 Prepare for v2.8.1 release 2020-08-05 22:33:55 +01:00
stack72 ca18028bd7 Ensure Passphrase Secret Manager is available to use with new config
Fixes: #5104

This reverts a code change that was checking initially for the
SecretsProvider of the currentStack being an empty string. When it
was an empty string, we were checking the backend type and we were
setting a serviceSecretsManager. This wasn't correct, the logic
needed to check for an empty SecretsProvider AND an empty EncryptionSalt

The important part is that it needed to check for the EncryptionSalt
to make sure it wasn't a passphrase secrets manger
2020-08-05 20:55:13 +01:00
stack72 14bc0c9c15 Prepare for v2.8.0 release 2020-08-04 19:13:33 +01:00
Evan Boyle 996fd85e00
Add missing MapMap and ArrayArray types to Go SDK (#5092) 2020-08-03 11:37:28 -07:00
Justin Van Patten b364296521
Python: Improved error message when virtualenv doesn't exist (#5069) 2020-07-28 13:28:14 -07:00
Lee Briggs bad67d3242
switch os/user with luser
We make several calls to `os/user`, which uses CGO and means
cross-compilation is not possible. This replaces `os/user` with the
`luser` package, which is a drop-in replacement which does not use `CGO`
2020-07-27 14:44:08 -07:00
Paul Stack 6ff94a18cf
Add ability to create a stack based on an existing stack (#5062) 2020-07-27 19:50:33 +01:00
Paul Stack ed923a1057
Add the ability to change secrets provider (#5031) 2020-07-27 18:08:18 +01:00
Justin Van Patten ce4badd488
Update pip/setuptools/wheel in virtual environment (#5042)
Update pip, setuptools, and wheel in the virtual environment before installing dependencies as recommended by the Python documentation. This should help avoid failures when only source distributions are available for a package and pip attempts to build a wheel locally.
2020-07-23 13:33:09 -07:00
Justin Van Patten 2798bf0ede
Update CHANGELOG.md (#5040) 2020-07-22 13:36:01 -07:00
Gabriel Diaz 9f28ef6dac
Fix logic on venv (#5038) 2020-07-22 13:07:26 -07:00
Lee Briggs c9fedef887
Merge pull request #4947 from pulumi/jaxxstorm/provider-info
add plugin download url metadata to package spec
2020-07-21 12:03:09 -07:00
Sean Fausett a38bbaa221
Enable SourceLink with embedded PDB (#4967) 2020-07-21 16:55:08 +02:00
Mikhail Shilkov fe66a0ba6d
Speed up .NET programs with large number of resources (#5015)
* Speed up .NET programs with large number of resources
2020-07-21 10:50:14 +02:00
Lee Briggs 3b0462f0e0
Merge branch 'master' into jaxxstorm/provider-info 2020-07-20 17:35:47 -07:00
Craig Roddin 8e6b8fc79d
Spelling fix in changelog (#5022) 2020-07-17 10:46:27 -07:00
Paul Stack 6d09fe32df
Add the ability to copy configs between stacks (#4971) 2020-07-17 11:14:10 +01:00
Gabriel Diaz 4316800f2f
Add logic to parse pulumi venv (#4994) 2020-07-14 05:04:01 -07:00
Levi Blackstone 736019f7ce
Add support for streamInvoke during update (#4990)
Previously, streamInvoke was only supported by
the query command. Copied the implementation
into the resource monitor, which will allow
streaming invoke commands to run during updates.

Also fixed a bug with cancellation of streaming
invokes. The check was comparing against a
hardcoded string, which did not match the actual
error string. Instead, we can rely on the error code.
2020-07-10 10:56:35 -06:00
stack72 89f3a32db3 Prepare for v2.6.1 release 2020-07-09 17:51:23 +03:00
stack72 4d3545117f Prepare for v2.6.0 release 2020-07-09 00:05:43 +03:00
Simen A. W. Olsen b0d9280416
[docker/actions] unset GOOGLE_CREDENTIALS (#4972) 2020-07-07 16:35:17 +01:00
Lee Briggs c25cbf0fc8
switch terminology to plugin download URL
After a discussion about terminology, the better phrasing is to use
pluginDownloadURL
2020-07-02 09:29:19 -07:00
Lee Briggs f310c21b85
Add providerURL to package definition 2020-07-01 19:10:25 -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 2351fc66cf
Go SDK interfaces should declare impl of Ptr types where appropriate (#4911) 2020-06-26 11:25:53 -07:00
stack72 ad721d3b54 Prepare for v2.5.0 release 2020-06-25 12:00:45 +03:00
Evan Boyle 31770c3300
go program gen: prompt array conversion, unused range vars, id handling (#4884) 2020-06-24 11:07:26 -07:00
Justin Van Patten 6bad3a3620
Exclude grpcio v1.30.0, which breaks Pulumi Python programs (#4883) 2020-06-24 08:11:05 -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 9582d397ea changelog 2020-06-18 17:23:19 -07:00
Evan Boyle 8b8170252b
[Go Program Gen] multiline strings, get/lookup disambiguation, webserver example (#4850) 2020-06-18 13:34:22 -07:00
Paul Stack 83406b97f8
Adding the langage SDK specific docker images (#4837)
* [WIP] Adding the langage SDK specific docker images

Fixes: #3789

* add multiple os build

This introduces multiple containers images with various different OS's.
The base build is based on debian (symlinked from the Dockerfile.debian)
build.

We also have UBi based images, and alpine based images

* Adding the langage SDK specific docker images

Fixes: #3789

* remove alpine builds

* test docker readme sync

* fix description

* fix name of sync task

Co-authored-by: Lee Briggs <lee@leebriggs.co.uk>
2020-06-18 01:35:45 +01:00
Evan Boyle 9cdddd2566
[Go Program Gen] Support for EKS example (#4831) 2020-06-17 17:19:39 -07:00
Levi Blackstone 19a113de7a
Handle invalid UTF-8 characters before RPC calls (#4816)
Several users reported cases where error messages would
cause a panic if they contained accented characters. I wasn't
able to reproduce this failure locally, but tracked down the
panic to logging gRPC calls. The Message field is typed as
a string, which requires all of the characters to be valid UTF-8.

This change runs each log string through the strings.ToValidUTF8
function, which will replace any invalid characters with the
"unknown" character. This should prevent the the logger from
panicking.
2020-06-17 13:30:59 -06:00
Evan Boyle 2d61852e4f
Go program gen: resource range, readDir, template strings, etc (#4818) 2020-06-15 23:00:02 -07:00
Praneet Loke 2513709089
Use the GH webhook payload to parse PR details when CI system is GH Actions (#4817)
* Read the file and parse it. Also use the PR Head SHA instead of the GITHUB_REF if the build type is pull_request.

* Update changelog
2020-06-15 12:49:09 -07:00
Evan Boyle fa69a31c97
Set default namespace for go config for config-less get/try/require (#4802) 2020-06-12 16:35:06 -07:00
Justin Van Patten 9b0169be35
Fix pylint(no-member) when accessing resource.id (#4813)
Pylint currently reports `E1101: Instance of 'Bucket' has no 'id' member (no-member)` on lines in Pulumi Python programs like:

```python
pulumi.export('bucket_name', bucket.id)
```

Here's a description of this message from http://pylint-messages.wikidot.com/messages:e1101:

> Used when an object (variable, function, …) is accessed for a non-existent member.
>
> False positives: This message may report object members that are created dynamically, but exist at the time they are accessed.

This appears to be a false positive case: `id` isn't set in the constructor (it's set later in `register_resource`) and Pylint isn't able to figure this out statically. `urn` has the same problem. (Oddly, Pylint doesn't complain when accessing other resource output properties).

This change refactors `register_resource` so that `id` and `urn` can be assigned in the resource's constructor, so that Pylint can see it being assigned. The change also does the same with `read_resource`.
2020-06-12 12:41:56 -07:00
Paul Stack 1357be4afb
Ensure Authenticated to GCR when GOOGLE_CREDENTIALS supplied to action (#4812) 2020-06-12 19:38:50 +01:00
Justin Van Patten 78270ae3fc
Fix panic on pulumi up prompt when filtering and hitting arrow key (#4808)
When running `pulumi up`, after the preview, we prompt asking whether to proceed with the update. If you type to filter the options and then hit an arrow key a couple times, the CLI panics. This is a bug in the `survey` library we depend on. The issue has been fixed in the library upstream; this change updates our dependency.
2020-06-11 12:34:15 -07:00
Evan Boyle 3d2df8992f
Use appropriate types for go config methods (#4800) 2020-06-10 18:24:05 -07:00
stack72 e0bf69b77a Prepare for v2.4.0 release 2020-06-10 18:58:05 +01:00
Evan Boyle 45a901d3e7
Turn program gen NYIs into diagnostic errors (#4794) 2020-06-10 10:21:53 -07:00
Justin Van Patten b77ec919d4
Install and use dependencies automatically for new Python projects (#4775)
Automatically create a virtual environment and install dependencies in it with `pulumi new` and `pulumi policy new` for Python templates.

This will save a new `virtualenv` runtime option in `Pulumi.yaml` (`PulumiPolicy.yaml` for policy packs):

```yaml
runtime:
  name: python
  options:
    virtualenv: venv
```

`virtualenv` is the path to a virtual environment that Pulumi will use when running `python` commands.

Existing projects are unaffected and can opt-in to using this by setting `virtualenv`, otherwise, they'll continue to work as-is.
2020-06-09 16:42:53 -07:00
Praneet Loke 407896730c
Add GitHub Actions detection and update the Pulumi CI escape hatch with more CI vars (#4758)
* Add GitHub Actions detection. Update the Pulumi CI escape hatch with more CI vars.
2020-06-08 17:24:12 -07:00
Simen A. W. Olsen 76aede990e
[docker/actions] Base64 decode GOOGLE_CREDENTIALSAllows to use credentials that are Base64 encoded. (#4773) 2020-06-08 09:36:28 -07:00
Luke Hoban 678a5a6d3e
Export the CustomTimeouts class (#4747)
This class was available in the pulumi.resource module, but was not exported from the core `pulumi` module as intended for all public APIs at this level.
2020-06-03 15:36:44 -07:00
Lee Briggs bc05e2c955
improve dev version detection (#4732)
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2020-06-02 11:51:04 +01:00
stack72 aa5dfe4289 Prepare for v2.3.0 release 2020-05-27 20:30:22 +01: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
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
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 362fc8d7f2
Merge branch 'master' into feature/go-cloud-azurekeyvault-regions 2020-05-19 08:07:09 -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 728d889bf8
Use patched azure gocloud library
Fixes #4642
2020-05-18 07:43:35 -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
Lee Briggs d01a84eee8
Prepare for v2.2.1 release 2020-05-13 20:52:44 -07:00
Lee Briggs a5c08a74fe
Prepare for v2.2.0 release 2020-05-13 13:49:00 -07:00
Chris Smith 71910a1c52
Add PULUMI_SKIP_CONFIRMATIONS env var (#4477) 2020-05-13 14:01:02 +01:00
Paul Stack ebde7ae0b7
Add missing CHANGELOG due to v2.1.1 patch release (#4620) 2020-05-13 11:37:32 +01:00
Paul Stack 48f906e026
Allow pulumi stack export to decrypt secrets (#4046) 2020-05-11 19:16:30 +01:00
solidDoWant b7fb3bae22
Fixed ResourceOption deepcopy bug in stack_reference.py (#4553) 2020-05-08 12:01:59 -07:00
Levi Blackstone b445206101
Add ResourceOutput type to Go SDK (#4575) 2020-05-05 21:13:58 -06:00
Lee Briggs 3e86202d5f
Merge pull request #4494 from pulumi/feature/gcs-retries
Retry bucket writes on error
2020-05-04 09:50:04 -07:00
Yves Reynhout f36a8b4ca0
Adds TPL based runTask to Deployment (#3858)
Add TPL based runTask to Deployment.
2020-05-01 16:21:37 +02:00
Luke Hoban edf8bf5c30
Support map-typed inputs in Go SDK RegisterResource (#4521)
Adds support for RegisterResource to accept map-typed implementations if Input as well as the existing struct-typed implementations. Currently these must be fully untyped - but both map[string]pulumi.Input and map[string]interface{} are allowed. In the future, it's plausible that a mode where the data itself is a map, but the ElementType implementation returns a struct could be supported, with the struct used to provide type information over the untyped map.
2020-04-30 11:56:47 -07:00
Justin Van Patten 653dcf8f1f
Don't call IMocks.NewResourceAsync for the root stack resource (#4527) 2020-04-30 10:38:48 -07:00
Paul Stack f06e48b414
Enable fish completions for pulumi cli (#4401) 2020-04-30 15:45:57 +01:00
stack72 d3ee61cfef Cleanup after v2.1.0 release 2020-04-29 21:49:21 +01:00
stack72 675c878364 Prepare for v2.1.0 release 2020-04-29 21:45:35 +01:00
Justin Van Patten 16926504c1
Allow pulumi.export calls from unit tests (#4518)
This change allows importing modules with calls to `pulumi.export` in unit tests. Previously, you'd have to structure the Python program in a way that avoids the `pulumi.export` from being called from unit tests.
2020-04-29 10:03:20 -07:00
Levi Blackstone d1ba572e1d
Fix infinite recursion bug for Go SDK (#4516)
gatherDependencySet was not checking for Resources
in the dependency set, which could lead to infinite
recursion.
2020-04-28 18:10:07 -06:00
Lee Briggs 5bbcdd0a12
Merge remote-tracking branch 'upstream/master' into feature/gcs-retries 2020-04-27 17:17:38 -07:00
Lee Briggs 8d7cb5d99a
Merge pull request #4489 from pulumi/jaxxstorm/ordered_secrets
Order secret outputs in stack references
2020-04-27 09:36:29 -07:00
kahkeng 2fbd4c021c
Add helm env variables explicitly to pulumi Dockerfile (#4474) 2020-04-27 10:15:01 -06:00
Lee Briggs bea7aa2c07
Update CHANGELOG.md to include correct PR
Co-Authored-By: Justin Van Patten <jvp@justinvp.com>
2020-04-25 12:36:44 -07:00
Komal c7866108e1
Merge branch 'master' into komalali/increase-grpc-message-size 2020-04-24 17:54:32 -07:00
Luke Hoban cfa57914a1
[sdk/python] Improve ResourceOptions.merge type (#4484)
* [sdk/python] Improve `ResoruceOptions.merge` type

The implementation correctly handles `None` inputs, so the type should allow these as well.

* Add CHANGELOG
2020-04-24 17:45:11 -07:00
Lee Briggs 0086edb2d9
Retry bucket writes on error
When writing the snapshot to the filestate bucket, we can retry in the
event of an error, which helps users who are experiencing issues around
write rates to GCS
2020-04-24 16:41:56 -07:00
Komal 1d6af57442
Merge branch 'master' into komalali/increase-grpc-message-size 2020-04-24 13:42:54 -07:00
Pat Gavlin af344d9b72
Fix Python module names. (#4473)
In particular, ensure that they are keyword-safe. This affects
`aws:lambda:*` in particular: prior to these changes, we were generating
code into `pulumi_aws.lamdba`, which is not referencable due to its use
of the `lamdba` keyword. With these changes, we generate code into
`pulumi_aws.lambda_`.

There is also a small fix for multi-line non-formatted strings: these
strings do not need escaped braces.
2020-04-24 08:52:36 -07:00
Lee Briggs b9f44813fb
Order secret outputs in stack references
When referencing `secretOutputNames` in from another stack, spurious
diffs can often be created because the secret output slice was not
ordered.

This PR orders the slice before it's added to the propertymap, ensuring
the order always remains the same
2020-04-23 15:57:20 -07:00
komal 61def90966 fix extra line in changelog 2020-04-23 11:24:09 -07:00
Komal Ali ab3fe9ac68 Update changelog 2020-04-23 11:16:36 -07:00
Paul Stack 777b295b6a
Add flag to pulumi stack to output only the stack name (#4450)
Fixes: #4444

Before:
```
$ pulumi stack
Current stack is 47BE2956-D665-4EC3-9AE6-4D4A1C417074:
    Managed by demo-mbp
    No updates yet; run 'pulumi up'
Current stack resources (0):
    No resources currently in this stack

Use `pulumi stack select` to change stack; `pulumi stack ls` lists known ones
```

After:
```
$ pulumi stack --show-name
47BE2956-D665-4EC3-9AE6-4D4A1C417074
```
2020-04-21 23:35:28 +01:00
Luke Hoban 6afefe050f
[codegen/go] Fix accessors on struct ptr outputs (#4456)
* [codegen/go] Fix accessors on struct ptr outputs

The accesor methods on nestred struct Ptr outputs were previously not accepting pointer typed inputs as they should, and would thus always panic if used.

The "simple" fix would be to just accept the pointer type and blindly dereference it.  But this doesn't seem like the right experience - it would make these accessors very unsafe to use in practice.

Instead, this PR implements the accessors on pointer-typed outputs as nil-coaslescing, always lifting the output type into a pointer type and flowing a nil value into the result type.  This ensures the accessor will not nil-deref, and that user code can handle the `nil` value itself (or use `.Apply` directly to implement more specialized behaviour).

Before:

```go
// Name of your S3 bucket.
func (o BuildStorageLocationPtrOutput) Bucket() pulumi.StringOutput {
	return o.ApplyT(func(v BuildStorageLocation) string { return v.Bucket }).(pulumi.StringOutput)
}
```

After:

```go
// Name of your S3 bucket.
func (o BuildStorageLocationPtrOutput) Bucket() pulumi.StringPtrOutput {
	return o.ApplyT(func(v *BuildStorageLocation) *string {
		if v == nil {
			return nil
		}
		return &v.Bucket
	}).(pulumi.StringPtrOutput)
}
```

However, due to the decision to have this more usable behaviour, this is a breaking change, as some/many accessors now return a pointer type when they previously did not.

Fixes pulumi/pulumi-azure#530.

* Mark nested property types as requiring ptr types

* Add CHANGELOG

* More fixes
2020-04-21 13:33:38 -07:00
Luke Hoban e1cdd182cc
Update CHANGELOG 2020-04-21 06:09:01 -07:00
stack72 b7a3d73f69 Protect against panic when unprotecting state with no resources
Fixes: #4405
2020-04-18 14:19:56 +01:00
Chris Smith ac6f04d45f
Fix changelog (#4438) 2020-04-17 14:01:03 -07:00
Chris Smith df1b07b9dc
Add support for a PULUMI_CONSOLE_DOMAIN env var (#4410)
* Add support for a PULUMI_CONSOLE_DOMAIN env var

* Fix typo

* Update CHANGELOG.md

* Fix tests

* Address PR feedback
2020-04-17 11:50:00 -07:00
stack72 9ece9011a4 Prepare for v2.0.0 release 2020-04-16 17:42:43 +01:00
Justin Van Patten 7f27618e2d
Avoid replace on second update with import applied (#4403)
After importing some resources, and running a second update with the
import still applied, an unexpected replace would occur. This wouldn't
happen for the vast majority of resources, but for some it would.

It turns out that the resources that trigger this are ones that use a
different format of identifier for the import input than they do for the
ID property.

Before this change, we would trigger an import-replacement when an
existing resource's ID property didn't match the import property, which
would be the case for the small set of resources where the input
identifier is different than the ID property.

To avoid this, we now store the `importID` in the statefile, and
compare that to the import property instead of comparing the ID.
2020-04-15 18:52:40 -07:00
Mikhail Shilkov 3e7b3667ee
Bump to .NET Core 3.1 (#4400)
Bump to .NET Core 3.1
2020-04-15 16:31:18 +02:00
Justin Van Patten 33119659e0
Treat config values that start with '0' as strings (#4393)
When setting structured config values using `--path`, we automatically
treat values that can be converted into an integer via `strconv.Atoi` as
an integer, rather than as a string.

However, this ends up converting values like "0123456" into the integer
123456, stripping the leading 0, which isn't desirable for values like
commit SHAs, etc., where you want to keep the 0 (and keep it a string).

This change makes it so that values starting with 0 are not implicitly
converted to an integer; instead such values will remain a string.
2020-04-14 12:40:22 -07:00
CyrusNajmabadi 66bd3f4aa8
Breaking changes due to Feature 2.0 work
* Make `async:true` the default for `invoke` calls (#3750)

* Switch away from native grpc impl. (#3728)

* Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752)

* Only retry as long as we get unavailable back.  Anything else continues. (#3769)

* Handle all errors for now. (#3781)


* Do not assume --yes was present when using pulumi in non-interactive mode (#3793)

* Upgrade all paths for sdk and pkg to v2

* Backport C# invoke classes and other recent gen changes (#4288)

Adjust C# generation

* Replace IDeployment with a sealed class (#4318)

Replace IDeployment with a sealed class

* .NET: default to args subtype rather than Args.Empty (#4320)

* Adding system namespace for Dotnet code gen

This is required for using Obsolute attributes for deprecations

```
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
```

* Fix the nullability of config type properties in C# codegen (#4379)
2020-04-14 09:30:25 +01:00
Evan Boyle 90ced9574d
fix go config codegen (#4388)
* fix go config codegen

* changelog
2020-04-14 09:24:32 +01:00
Evan Boyle 4261b27a5e
fix propagation of secrets for resource inputs/outputs in go sdk (#4387) 2020-04-13 22:48:36 -07:00
stack72 b5b0fa0136 Prepare for v1.14.1 release 2020-04-13 22:51:31 +01:00
Evan Boyle 9d2f40b686
fix unknown status for secrets wrapping unknowns (#4377)
* fix unknown status for secrets wrapping unknowns

* changelog

* add test for secret computed values
2020-04-13 22:47:08 +01:00
Mikhail Shilkov d3e7041c0d
Support the binary option for .NET (#4355)
Support the binary option for .NET
2020-04-12 21:34:50 +02:00
Evan Boyle fe7877177c
fix stack reference helpers to handle nil values (#4370) 2020-04-12 08:44:08 -07:00
Evan Boyle 779c4144f9
Properly propagate unknowns in go SDK marshaling operations (#4369) 2020-04-11 22:20:03 -07:00
Harrison Heck 01d22680d9 fix: error when setting config without value in non-interactive mode 2020-04-10 19:23:32 +01:00
Harrison Heck 5dd669168b fix: remove --show-* as persistent flags 2020-04-10 17:01:12 +01:00
Harrison Heck 7f3ea52202 fix: logging out with filestate when url is deleted 2020-04-10 15:02:24 +01:00
Harrison Heck 43d310ee6d fix: up with refresh with targets not limiting refresh 2020-04-10 15:00:54 +01:00
Evan Boyle c3b2439094
Automate execution of go mod download for pulumi new Go templates (#4353) 2020-04-09 16:16:10 -07:00
Evan Boyle cfea357cda
Add runtime.options.binary to Pulumi.yaml to make prebuilt go binaries opt-in (#4338) 2020-04-09 12:21:26 -07:00
Evan Boyle 7382de6b5f
Add Go SDK stack output helpers for String and ID (#4341) 2020-04-09 07:52:34 -07:00
Mikhail Shilkov 46dababc28
Add additional RunAsync overloads (#4286) 2020-04-09 16:43:43 +02:00
Evan Boyle f50fd69c10
Define merge behavior for go resource options (#4316) 2020-04-07 14:19:33 -07:00
Mikhail Shilkov 1d171dbb74
Add Output.All overloads (#4321)
Add Output.All overloads
2020-04-07 20:51:05 +02:00
Levi Blackstone d363be9de0
Propagate additionalSecretOutputs opt to Read in NodeJS (#4307) 2020-04-06 15:50:52 -06:00
Evan Boyle ab659aa0c1
Reimplement getRequiredPlugins for go sdk (#4297) 2020-04-06 12:30:40 -07:00
Mikhail Shilkov 6d32d575e0
Enable features in mock monitor (#4272) 2020-04-03 08:33:40 +02:00
Mikhail Shilkov 0bce094dc1
Fix python mock's call (#4274)
Fix python mock's call
2020-04-03 07:28:52 +02:00
Evan Boyle 3efbc3705d
Update go codegen to include usage hints on Input types (#4279) 2020-04-02 19:59:08 -07:00
Justin Van Patten dd104a00a7
Propagate secretness correctly in Python apply (#4273)
* Propagate secretness correctly in Python `apply`

* Improve `apply` test coverage

* Update CHANGELOG.md
2020-04-02 13:01:29 -07:00
Luke Hoban 9e37741916
[Go] Ensure Apply handles nil output values (#4268)
Fixes #4247.
2020-04-01 17:39:01 -07:00
stack72 ee67501151 Prepare for v1.14.0 release 2020-04-01 17:54:16 +01:00
Praneet Loke efe7a599e6
Update the GitHub Actions container to allow users to pass a cloud url (#4243) 2020-03-30 18:25:41 -07:00
Luke Hoban 8826fe4857
Fix Node.js SxS checks for 1.x and 1.y (#4235)
Fixes #4234
2020-03-30 15:10:42 -07:00
stack72 90bf418e2b Prepare for v1.13.1 release 2020-03-27 17:04:54 +00:00
Sean Holung 7b91dc20a8
Add cmd to support policy pack config validation (#4186)
* Add cmd `pulumi policy validate-config` to do policy pack config validation
2020-03-27 09:54:26 -07:00
Mikhail Shilkov 6e15c83e1a
Remove legacy .NET attributes (#4190)
Remove legacy .NET attributes
2020-03-27 10:51:42 +01:00
Sean Holung d0f5e35b50
Add support for enabling Policy Packs with configuration (#4127)
* Support policy pack configiguration using policy enable cmd.
2020-03-24 13:30:36 -07:00
Levi Blackstone 8ce10e1dfe
Add aliases to the Go SDK codegen pkg (#4157) 2020-03-24 11:18:21 -06:00
Luke Hoban 1d4a75674b
Stop testing on Node 8, start testing on Node 13 (#4156)
Resolves #3736.
2020-03-23 14:57:03 -07:00
Evan Boyle 2408d34c71
Add missing builtin MapArray to the Go SDK (#4144) 2020-03-20 16:51:33 -07:00
Evan Boyle c28c602247
capture std err when getting required plugins for go (#4141)
* capture std err when getting required plugins for go
2020-03-20 14:59:12 -07:00
evanboyle b6b14251c8 update changelog 2020-03-19 18:05:23 -07:00
Pat Gavlin a09e87a5d0 Update the CHANGELOG for 1.13.0 2020-03-18 16:25:30 -07:00
Justin Van Patten 24e804bbe8
Support for running Python policy packs (#4057)
These changes enable running policy packs written in Python.
2020-03-18 16:15:57 -07:00
Chris Smith 8efd992bab
Fix 'pulumi stack ls' on Windows (#4094)
* Fix 'pulumi stack ls' on Windows

* Update CHANGELOG.md
2020-03-18 13:57:25 -07:00
Jamie Kinkead 4e7d5c6854
Display resource type in PAC violation output. (#4092) 2020-03-18 13:05:55 -07:00
Evan Boyle 8b46e71887
Go plugin acquisition (#4060)
These changes implement `GetRequiredPlugins` for Go using a registry
mechanism and an alternate entry point for `pulumi.Run`. Packages that
require plugins are expected to register themselves with the Pulumi SDK.
When `pulumi.Run` is used and the `PULUMI_PLUGINS` envvar is truthy, the
program will dump a JSON-encoded description of its required plugins to
stdout. The language host then uses this description to respond to
2020-03-18 12:41:45 -07:00
Levi Blackstone 66126b544e
Test PR 3893 (#4090)
Upgrade to helm 3 in the docker image

Co-authored-by: Harrison Heck <harrison.heck@gmail.com>
2020-03-17 13:35:33 -06:00
Levi Blackstone ee62f38ab9
Add ArrayMap builtin types to Go SDK (#4086)
Add support for maps of arrays of builtin types.
These types are of the form map[string][]builtin.
2020-03-16 20:41:08 -06:00
Mikhail Shilkov dbe365376d
Add Stack Transformations to .NET SDK (#4008)
Stack transformations and integration tests
2020-03-16 17:40:52 +01:00
Mike Metral cf7169125d
Improve documentation of URL formats for pulumi login 2020-03-11 18:26:47 -07:00
Pat Gavlin cbd5f862c3 Update the CHANGELOG for v1.12.1 2020-03-11 15:43:37 -07:00
Mikhail Shilkov a95a4d1195
Unit testing in .NET (#3696)
Mock-based testing in .NET
2020-03-11 23:10:01 +01:00
Mikhail Shilkov f01208af3b
Fix terminal keypad mode (#4042)
Fix terminal keypad mode
2020-03-11 08:55:36 +01:00
Luke Hoban 74ffbfd9ba
Ensure new provider is registered when provider diff is unknown (#4051)
The changes in #4004 caused old provider configuration to be used even when a provider was different between inputs and outputs, in the case that the diff returned DiffUnkown.

To better handle that case, we compute a more accurate (but still conservative) DiffNone or DiffSome so that we can ensure we conservatively update to a new provider when needed, but retain the performance benefit of not creating and configuring a new provider as much as possible.

Part of https://github.com/pulumi/pulumi-aws/issues/814.
2020-03-10 19:40:25 -07:00
stack72 b100f8494e Ensure python overlays work as expected
Fixes: https://github.com/pulumi/pulumi-terraform-bridge/issues/119

This allows us to specify an overlays block e.g.

```
Overlay: &tfbridge.OverlayInfo{
	DestFiles: []string{
		"pulumi_docker/docker.py",
		"pulumi_docker/image.py",
	},
},
```

The overlays files are treated differently to normal module files
as they are not generated. This structure means that we will emit
the correct entries in the __init__.py file

Without this structure (ie. pulumi_pkgname), the generator actually
copies the file (i.e. docker.py) to the root of the Python SDK. This
is because the structure of the Python SDK has a sub-folder than that
of the NodeJS SDK

I tested this using PR https://github.com/pulumi/pulumi-docker/pull/141
and this now works as expected and we can take advantage of the new
Python overlays for Docker
2020-03-10 00:03:41 +02:00
Paul Stack 2a24470135
Merge pull request #4030 from pulumi/stack72/allow-go-run-windows
Windows requires applications to have exe extension
2020-03-09 17:36:10 +02:00
Justin Van Patten 80f6c61310
Initial support for configuring policies (#4015) 2020-03-08 14:11:55 -07:00
Evan Boyle 81b6afa3c7
Revert "GetRequiredPlugins for Go (#3830)" (#4034)
This reverts commit 3a2890c0cd.
2020-03-06 17:50:18 -08:00
Pat Gavlin 3a2890c0cd
GetRequiredPlugins for Go (#3830)
These changes implement `GetRequiredPlugins` for Go using a registry
mechanism and an alternate entry point for `pulumi.Run`. Packages that
require plugins are expected to register themselves with the Pulumi SDK.
When `pulumi.Run` is used and the `PULUMI_PLUGINS` envvar is truthy, the
program will dump a JSON-encoded description of its required plugins to
stdout. The language host then uses this description to respond to
`GetRequiredPlugins`.
2020-03-06 14:30:43 -08:00
stack72 7f86842c68 Windows requires applications to have exe extension
We need to ensure that if the pulumi application is prebuild on
Windows then it will have the exe extension otherwise it's not
a valid windows program

https://github.com/golang/go/wiki/WindowsCrossCompiling
2020-03-06 19:58:57 +02:00
stack72 3863c6de1a Stop new projects starting with the word Pulumi
Fixes: #4013

Without this, we are in a situation where we have a cyclic import
2020-03-05 17:43:42 +02:00
Mikhail Shilkov 8e87b2b893
Relax the type check to accomodate what YAML parser returns (#4023)
Relax the type check to accomodate what YAML parser returns
2020-03-05 16:41:31 +01:00
Pat Gavlin dbb5b04d2f Update the CHANGELOG for v1.12.0 2020-03-04 13:35:45 -08:00
Charly Román 560f1f130e Python SDK fix type annotations for Output.all and Output.concat 2020-03-03 22:00:37 -06:00
Justin Van Patten acd6a5e753
Don't mark policy and watch commands as experimental (#4001) 2020-03-02 14:23:40 -08:00
Tasia Halim c96271b7a3
Support transformations in Go (#3978)
* started transformations for go sdk

* added first basic test

* added second test with child

* added RegisterStackTransformation

* added a couple tests to lifecycle_test

* update CHANGELOG and test

* included TODO for #3846
2020-03-02 13:59:11 -08:00
Luke Hoban d9a18f0aa8
Revert back to ts-node ^7.0.0 (#4007)
We upgraded to `ts-node@^8.0.0`  2.5 months ago as part of https://github.com/pulumi/pulumi/pull/3627, though it seems it wasn't really necessary to make that update for the purposes of the PR - updating the default TypeScript version.

The `8.0.0` series of `ts-node` unfortunately dropped all of it's caching support, due to what appear to be some corner-case correctness issues with the cache.  We have not seen reports of those issues for Pulumi, and have much more experience with the `7.0.0` series overall (2 years vs. 2 months).  The performance difference between `7.0.0` and `8.0.0` of ts-node for Pulumi is massive - it adds 4-4.5s to each of `pulumi preview` and `pulumi up` even on a trivial program.

As a result, for now we will revert back to `ts-node@^7.0.0`.  In the future, we may want to look into our own caching layer or alternative to `ts-node` to ensure we get the behaviour and performance we expect.

Part of #3671.
2020-03-02 08:33:01 -08:00
Luke Hoban 2067e27ee6
Avoid configuring providers twice during preview (#4004)
In the very common case where provider configuration does not change, during preview we were calling `Configure` on the cloud provider twice - once for the "old" configuration, and once for the "new" configuration.

This is not necessary, and we can just avoid using the new provider when configuration has not changed, since we will have configured the old provider very early so if we can use that we should.

Note that this technically doesn't prevent the second call to `Configure` from being made, but it prevents us from ever waiting on it.  We may want to go further and avoid even calling `Configure` on the provider in this case.

Part of #3671.
2020-03-01 14:41:46 -08:00
Pat Gavlin 682dced40b
Mock resource monitor (#3738)
These changes add support for mocking the resource monitor to the NodeJS
and Python SDKs. The proposed mock interface is a simplified version of
the standard resource monitor that allows an end-user to replace the
usual implementations of ReadResource/RegisterResource and Invoke with
their own. This can be used in unit tests to allow for precise control
of resource outputs and invoke results.
2020-02-28 17:22:50 -08:00
Levi Blackstone 0931c0d419
Fix missing module import on Windows platform (#3983)
#3895 added a module import that apparently doesn't
exist on Windows. Check the platform before importing,
and skip this import for Windows.
2020-02-26 16:08:49 -07:00
Pat Gavlin 8a0987c892 Update the CHANGELOG for 1.11.1. 2020-02-26 10:42:45 -08:00
Evan Boyle 930adc0504
Add support for secrets in Go SDK (#3938) 2020-02-25 17:45:36 -08:00
Justin Van Patten e48a585b1a
Fix panic on failed stack policy (#3960)
Avoid panic during stack validations. This regressed recently when the PAC error output was modified.
2020-02-24 07:04:35 -08:00
Lee Zen 33b232adc4
Fix a regression for CustomTimeouts in Python SDK (#3964)
* Fix a regression for CustomTimeouts in Python SDK
* Accept dict as well as CustomTimeouts object
2020-02-22 19:32:06 -08:00
Mikhail Shilkov 42d1a606a4
Simplify resource options (#3943)
Simplify resource options, making the base class abstract
2020-02-21 09:24:52 +01:00
Pat Gavlin 259b2d314a Update the CHANGELOG for 1.11.0 2020-02-20 10:11:12 -08:00
Luke Hoban 4eb2b555fe
Disable interactive progress display when no terminal size is available (#3936)
It appears there are cases where our IsInteractive heuristics return true, but terminal.GetSize returns an error. In these cases, we should assume we do not have an interactive terminal and avoid trying to render interactive progress by default.

Fixes #3935.
2020-02-19 09:21:03 -08:00
Chris Smith ba046b063b
Add --version flag to 'pulumi stack export' (#3906)
* Add --version flag to 'pulumi stack export'

* Update CHANGELOG

* Update/rebase with latest

* Fix lint warning
2020-02-13 12:25:57 -08:00
Mikhail Shilkov f1cdce9488
Move .NET serialization attributes to Pulumi namespace (#3902)
Move .NET serialization attributes to Pulumi namespace, deprecate the ones in Pulumi.Serialization
2020-02-11 11:40:14 +01:00
Levi Blackstone 7efb88de3e
Allow oversize protocol buffers (#3895)
Set an option to increase the memory limit on protobuf
parsing so that we can handle larger gRPC payloads.

Co-authored-by: Evan Boyle <EvanBoyle@users.noreply.github.com>
2020-02-10 15:30:42 -07:00
Justin Van Patten 3bf9067bac
Expose options, parent, deps, and provider config to policies (#3862) 2020-02-07 16:11:34 -08:00
Luke Hoban f6e37c25ad
Don't print prelude in terminal mode (#3890)
We can't correctly print simple messages for prelude events when doing progress based display in a terminal, as it would lead to resetting the display of the table rendering.

This does mean that `--show-config` no longer works in the default terminal display mode - but it's not clear it *can* work correctly (at least as currently implemented) since it doesn't cleanly participate in the table rendering.

For cases where `--show-config` is not set (the norm) -nothing would have been printed anyway, so the changes here just avoid resetting the table rendering unnecessarily.

Fixes #3469.
2020-02-07 12:44:22 -08:00
Pat Gavlin 4a201a7dfd
Do not busy wait in Python. (#3892)
Instead, keep a stack of outstanding RPCs and await each in turn. This
allows the main loop to block instead of spin.

Fixes #3759.
2020-02-07 12:10:59 -08:00
Evan Boyle cea807a244
Go aliases (#3853) 2020-02-06 12:02:13 -08:00
Luke Hoban 5bf490228a
Use \n for provider protocol even on Windows (#3855)
The provider plugin protocol is to write a port number followed by `\n`.  We must guarantee we do that even on Windows, so must avoid Python `print` statements which implicitly rewrite newlines to platform specific character sequences.

Fixes #3807.
2020-02-06 11:34:05 -08:00
Pat Gavlin 3b445f10b4 Update the CHANGELOG for v1.10.1 2020-02-06 10:05:45 -08:00
Evan Boyle 411f1a179a
Support stack references in Go SDK (#3829) 2020-02-06 10:00:46 -08:00
Pat Gavlin 5df00f8303 Update the CHANGELOG for 1.10.0 2020-02-05 12:56:10 -08:00
Luke Hoban 615ab3a4bf
Fix bug in computing whether checkpoint write is necessary (#3860)
We were seeing that ~all same steps were requiring checkpoint writes due to percieving a difference between `Dependencies` being `nil` and `[]URN{}` - which should be considered the same for this purpose.
2020-02-04 18:56:24 -08:00
Erin Krengel 89f84dc4d9
Improve PP naming for local PPs (#3839) 2020-01-30 13:31:41 -08:00
Jamie Kinkead 9c0e9021d1
Return current operation info (#3822) 2020-01-29 16:04:09 -08:00
CyrusNajmabadi 2d117e6acf
Fix integration test harness. (#3831) 2020-01-29 11:57:45 -08:00