Commit graph

712 commits

Author SHA1 Message Date
Ringo De Smet bcd14d8060
Automation API Go SDK: Expsoe the version in the UpdateSummary struct. (#6339) 2021-02-16 12:16:41 -08:00
Justin Van Patten d02c0b1152
Default to UseAutomaticVirtualEnv in integration tests (#6318)
This way, the tests use the built-in virtual environment support by
default, which is what most customers will be using. A new `UsePipenv`
option is available to go back to using pipenv for tests.
2021-02-11 18:16:07 -08:00
Justin Van Patten f111a53337
Look for python binary first on Windows (#6317)
We previously looked for `python3` and fallback to `python` on all systems. However, our Windows CI images include a `python3.exe` symlink to `python.exe` which does not work with `venv`. So on Windows, just look for `python` first, falling back to `python3`. (The default python.org Windows installation only includes `python.exe`).
2021-02-11 11:34:07 -08:00
Komal 1a9050eaa6
[sdk/python] - Allow kwargs in Output.all() to create a dict (#6269) 2021-02-11 08:52:46 -07:00
Evan Boyle 8e58f5d682
Add pagination to pulumi stack history (#6292)
replaces the unreleased `--limit` flag with `--page` and `--page-size` to support full pagination
2021-02-09 16:20:01 -08:00
Evan Boyle eefc104c2b
Add --limit flag to pulumi stack history and consume from automation api (#6257)
Adds a `--limit` flag to `pulumi stack history. This allows limiting to the last few entries rather than fetching the entirety of a stack's update history (which can be quite slow for stacks with lots of updates). Example: `pulumi stack history --limit 1` fetches the last history entry only. 

`stack.up` and related operations in the Automation API have been updated to consume this change, drastically reducing overhead.
2021-02-08 10:49:57 -08:00
Komal f374b8a953
[python/sdk] - Correctly handle outputs with properties named "values" (#6264)
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-02-05 17:16:13 -07:00
Komal 3a3b96de72
[sdk/python] - Gracefully handle monitor shutdown (#6249) 2021-02-04 20:28:39 -07:00
stack72 a1387c5d6c Prepare for v2.20.0 release 2021-02-03 20:40:11 +00:00
Justin Van Patten 2779de38ea
[sdk/python] from_input: Unwrap nested outputs in input types (#6221)
`Output.from_input` deeply unwraps nested output values in dicts and lists, but doesn't currently do that for the more recently added "input types" (i.e. args classes). This leads to errors when using args classes with output values with `Provider` resources, which uses `Output.from_input` on each input property and then serializes the value to JSON in an `apply`. This changes fixes `Output.from_input` to recurse into values within args classes to properly unwrap any nested outputs.
2021-01-29 15:44:00 -08:00
Justin Van Patten ca7dfdfcbc Prepare for v2.19.0 release 2021-01-27 17:40:21 -08:00
Justin Van Patten b3d11e1c32
Enable resource references by default (#6202) 2021-01-27 13:25:26 -08:00
Paul Stack d72b788011
Ensure Old Secrets Provider Details Removed when Changing to Passphrase (#6210)
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-01-27 20:07:25 +00:00
Evan Boyle 8c6865af29
Always read and write nodejs runtime options from/to the environment (#6076) 2021-01-26 14:59:32 -08:00
Evan Boyle 527b799974
[BREAKING] Remove unidiomatic numerical types from Go SDK (#6143) 2021-01-26 10:58:21 -08:00
stack72 3931d41047 Prepare for v2.18.2 release 2021-01-22 20:18:24 +00:00
Mikhail Shilkov 4335a44bfb
Relax the diff path check to avoid panic (#6159) 2021-01-22 12:00:44 +01:00
Justin Van Patten dab47e9b40
[sdk/dotnet] RegisterResourceOutputs: Check for resource ref support (#6172)
.NET's implementation of RegisterResourceOutputs was always serializing resources as resource references, regardless of the monitor's reported support. This change fixes .NET to check if the monitor supports resource references, which is consistent with all the other languages, and with serialization code elsewhere in the .NET SDK.
2021-01-21 17:04:21 -08:00
Levi Blackstone f6ec691544
Fix malformed resource value bug (#6164)
* Fix resource-ref-as-ID marshaling. (#6125)

This reapplies 2f0dba23ab.

* Fix malformed resource value bug

PR #6125 introduced a bug by marshaling resource
ids as PropertyValues, but not handling that case on
the unmarshaling side. The previous code assumed
that the id was a simple string value. This bug prevents
any stack update operations (preview, update, destroy,
refresh). Since this change was already
released, we must now handle both cases in the
unmarshaling code.

* Add resource ref unit tests for the Go SDK. (#6142)

This reapplies 3d505912b8.

Co-authored-by: Pat Gavlin <pat@pulumi.com>
2021-01-21 16:40:27 -07:00
stack72 3496c56fa1 Prepare for v2.18.1 release 2021-01-21 21:40:15 +00:00
stack72 6d790fce29 Prepare for v2.18.0 release 2021-01-20 17:30:06 +00:00
Paul Stack 475250f82f
Adding pulumi.IsSecret and pulumi.Unsecret to the Go SDK (#6085) 2021-01-15 20:49:48 +00:00
Paul Stack 61ae57da0c
Add support for pulumi logout --all (#6101) 2021-01-15 13:38:58 +00:00
stack72 3853f530d2 Prepare for v2.17.2 release 2021-01-14 22:39:33 +00:00
Paul Stack 1cff1a4bcf
[sdk/python] Adding pulumi.unsecret and pulumi.is_secret (#6111) 2021-01-14 20:37:05 +00:00
Paul Stack ae9a6db36e
Add the ability to pulumi.unsecret an existing output (#6086)
Related: #5653

This will take an existing output and then unwrap the secret, and
return a new output

```
import * as pulumi from "@pulumi/pulumi";

const x = pulumi.secret("test")
export const xVal = x;

const y = pulumi.unsecret(x);
export const yVal = y;
```

```
▶ pulumi stack output
Current stack outputs (3):
    OUTPUT         VALUE
    xVal           [secret]
    yVal           test
```

Also adds the ability to check if an output is as secret:

```
import * as pulumi from "@pulumi/pulumi";

const x = pulumi.secret("test")
const isSecret = x.isSecret;

export const isSecretDeets = isSecret;
```
2021-01-14 20:36:52 +00:00
Komal dd66d8d2ab
Remove annotations import (#6109) 2021-01-14 12:36:11 -08:00
Pat Gavlin 683b4de2f0
Add .NET resource ref unit tests. (#6104)
- Add tests that serialize custom and component resources for targets
  that support resource references
- Add tests that serialize custom and component resources for downlevel
  targets
- Add tests that deserialize known custom and component resources
- Add tests that deserialize missing custom and component resources

These changes also fix a few bugs that were encountered during testing:
- Component resource construction was not supported
- Resources with missing packages could not be deserialized

In the latter case, a missing resource is deserialized as a generic
DependencyResource.

These changes also update the signature of IMocks.NewResourceAsync to
allow the returned ID to be null. This is technically a C# breaking change
with respect to nullability.

Contributes to #5943.

Co-authored-by: Mikhail Shilkov <github@mikhail.io>
2021-01-14 12:24:41 -08:00
Komal a35b61e0b5
[auto/go] - Set DryRun on RunInfo (#6099) 2021-01-13 13:05:36 -08:00
Vivek Lakshmanan 37487d3e61
Merge branch 'master' into vl/AutomationLogging 2021-01-13 10:24:12 -08:00
stack72 d25b74014e Prepare for v2.17.1 release 2021-01-13 14:48:16 +00:00
Komal 89b1d0d2c7
[automation-api/python] - Support recovery workflow (#6037) 2021-01-12 19:27:21 -08:00
Komal 059402483b
[Automation API] Python Implementation (#5979)
Co-authored-by: evanboyle <evan@pulumi.com>
2021-01-12 16:55:59 -08:00
Vivek Lakshmanan f68aa2396d Add changelog 2021-01-12 13:50:09 -08:00
Roderik van der Veer f5c65c18e8
fix: typo to get the outputs while registering them in a mock (#6040)
Resolves: #6039
2021-01-12 10:49:39 -08:00
Justin Van Patten 74580168c2
Fix looking up empty version in ResourcePackages.TryGetResourceType (#6084)
When a resource reference is deserialized, it may not have a version in which case `version` will be an empty string. This change fixes `TryGetResourceType` to work correctly when an empty version is passed.
2021-01-12 08:53:52 -08:00
Mikhail Shilkov 710f385447
[dotnet] Unsecret and IsSecret implementation for .NET (#6092) 2021-01-12 14:54:08 +00:00
Vivek Lakshmanan 4dec79b67d Update changelog 2021-01-11 09:58:32 -08:00
Nicolas Fløysvik 9fbdc51fcd
[sdk/dotnet] Moved urn value retrieval into if statement (#6081) 2021-01-11 06:39:17 -08:00
Komal ae7d95eb87
[sdk/python] - Don't log if debug and no engine (#6067) 2021-01-07 15:23:23 -08:00
Pulumi Bot 42f355b497
[CLI] Add Version to the output of pulumi stack history (#6063)
fixes: #4328

Allows events to be tracked back to those of the Pulumi SaaS

Co-authored-by: stack72 <public@paulstack.co.uk>
2021-01-07 19:44:15 +00:00
stack72 fa3490ba2b Prepare for v2.17.0 release 2021-01-06 19:22:20 +00:00
Luke Hoban db14188526
[sdk/go] Support maps in Invoke outputs and Read inputs (#6014)
* [sdk/go] Support maps in Invoke outputs and Read inputs

These are already supported by the implementation, but were prevented by overzealous input validation in Invoke and ReadResource.

Follow-up to #4522 and #4521.

* Add CHANGELOG

* PR feedback
2021-01-06 15:35:13 +11:00
Pat Gavlin e1ac01a9f2
Respect the version option for provider resources. (#6055)
Although raw provider resources accept an input that allows a user to
specifiy a provider version to use, this input is not reflected in
current SDK code generation. Furthermore, we already have a method to
specify the provider version that should be used for a resource: the
"version" resource option. These changes update the code that handles
provider resource registrations to autmoatically populate the version
input from the "version" resource option if the option is present.

Fixes https://github.com/pulumi/pulumi-azure/issues/803.
2021-01-05 15:57:11 -08:00
Komal 8e8129012e
[automation-api/nodejs] - Support recovery workflow (#6038) 2021-01-04 16:45:57 -08:00
Komal 1ef22c375d
Revert bulk config ops in nodejs auto-api (#6051) 2021-01-04 14:38:55 -08:00
Paul Stack 21de78291f
[CLI] Add a confirmation prompt when deleting a policy pack (#6034)
Fixes: #4292
2021-01-04 22:37:46 +00:00
Paul Stack 60991a5568
[CLI] Provider better user error when Pulumi credentials file is corrupt (#6044)
Fixes: #2779
2021-01-04 20:36:51 +00:00
Paul Stack a7cabc2519
[CLI] Allow pulumi console to accept a stack name (#6031)
Fixes: #5854

If a stackname is not passed as an argument then it will use the
currently selected stack
2020-12-31 00:45:32 +00:00
Luke Hoban 1ef2f10543
Allow serializeFunction to capture secrets (#6013)
Adds an opt-in `allowSecrets` flag to `serializeFunction` to allow it to capture secrets.  If passed, `serializeFunction` will now report back whether it captured any secrets.  This information can be used by callers to wrap the resulting text in a Secret value.

Fixes #2718.
2020-12-31 09:37:25 +11:00