Commit graph

185 commits

Author SHA1 Message Date
Matt Ellis 0fbce2c9ce Update CHANGELOG.md 2019-06-03 09:31:50 -07:00
Luke Hoban 15e924b5cf
Support aliases for renaming, re-typing, or re-parenting resources (#2774)
Adds a new resource option `aliases` which can be used to rename a resource.  When making a breaking change to the name or type of a resource or component, the old name can be added to the list of `aliases` for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.

There are two key places this change is implemented. 

The first is the step generator in the engine.  When computing whether there is an old version of a registered resource, we now take into account the aliases specified on the registered resource.  That is, we first look up the resource by its new URN in the old state, and then by any aliases provided (in order).  This can allow the resource to be matched as a (potential) update to an existing resource with a different URN.

The second is the core `Resource` constructor in the JavaScript (and soon Python) SDKs.  This change ensures that when a parent resource is aliased, that all children implicitly inherit corresponding aliases.  It is similar to how many other resource options are "inherited" implicitly from the parent.

Four specific scenarios are explicitly tested as part of this PR:
1. Renaming a resource
2. Adopting a resource into a component (as the owner of both component and consumption codebases)
3. Renaming a component instance (as the owner of the consumption codebase without changes to the component)
4. Changing the type of a component (as the owner of the component codebase without changes to the consumption codebase)
4. Combining (1) and (3) to make both changes to a resource at the same time
2019-05-31 23:01:01 -07:00
Praneet Loke 5ac446fffd
Add CI vars for Bitbucket Pipelines (#2783)
* Introduce a new package under ciutil for individual CI systems. Split-out each CI system with env var detection for each.

* Add Bitbucket Piplines env var detection.

* Update changelog with note about adding Bitbucket Pipelines detection.

* Rename the CI system structs.

* Move files from ciutil/systems to ciutil. Un-export some types that don't need visibility beyond the ciutil package.

* Un-export DetectSystem function and the System type.

* Add a test for CI systems which we only know by name and nothing else, i.e. those with just a baseCI implementation.
2019-05-30 17:35:41 -07:00
Pat Gavlin 2324eaaa59
Add StackReference to the Python SDK (#2786)
This commit adds StackReference to the Python SDK, which uses
read_resource to read the remote state of a a Pulumi stack.
2019-05-30 14:12:37 -07:00
Sean Gillespie eda5de0f88 Implementation of Read for Python (#2752)
This commit implements read_resource functionality for Python in a
manner identical to the NodeJS implementation. If an "id" option is
passed to a resource via ResourceOptions on construction, that resource
will be read and not created.
2019-05-30 11:04:47 -07:00
Justin Van Patten 5df2b15320
Update CHANGELOG.md (#2778) 2019-05-28 17:31:41 -07:00
CyrusNajmabadi b84b3d487d
Revert "Simplify signature of pulumi.all (#2527)" (#2775)
This reverts commit b32892e0c1.
2019-05-28 10:54:56 -07:00
Joe Duffy bf75fe0662
Suppress JSON outputs in preview correctly (#2771)
If --suppress-outputs is passed to `pulumi preview --json`, we
should not emit the stack outputs. This change fixes pulumi/pulumi#2765.

Also adds a test case for this plus some variants of updates.
2019-05-25 12:10:38 +02:00
Matt Ellis 0574d8cd6f Attempt to download plugins before doing a refresh
Like `preview`, `update` and `destroy` we should ensure any plugins
that are listed in the snapshot are present.

Fixes #2669
2019-05-24 16:12:22 -07:00
stack72 19bf51d89a cmd/whoami: Move the changelog entry to unreleased
This was originally part of an older release but it has since been
moved to unreleased as it was only recently merged
2019-05-23 12:37:19 +02:00
Paul Stack fa691d8c40
cli/whoami: Addition of the currently connected backend to whoami (#2686)
cli/whoami: Addition of the currently connected backend to whoami
2019-05-22 15:57:52 +03:00
stack72 6ab390a815 cli/whoami: Addition of the currently connected backend to whoami
This is an attempt towards #2684

I am not sure if this is too simplistic for now OR we need to
consider if this will break anyones automation as they maybe using
the output of that command as plain text

Before:

```
▶ pulumi whoami
stack72
```

After:

```
▶ pulumi whoami
User: stack72
Backend URL: https://app.pulumi.com/stack72
```
2019-05-22 14:45:04 +02:00
Matt Ellis 61bff0c3a4 Do not parse version from resource providers
Until we can come up with a solution for #2753, just ignore the
version that comes in as part of a resource monitor RPC.
2019-05-21 19:20:18 -07:00
Fraser Waters d5b45ac5ad Move windows path fix changelog entry to 17.13 (#2749)
Was merged into the 17.11 changelog
2019-05-21 18:11:44 -07:00
Matt Ellis 31bd463264 Gracefully handle the case where secrets_provider is uninitalized
A customer reported an issue where operations would fail with the
following error:

```
error: could not deserialize deployment: unknown secrets provider type
```

The problem here was the customer's deployment had a
`secrets_provider` section which looked like the following:

```
"secrets_providers": {
    "type": ""
}
```

And so our code to try to construct a secrets manager from this thing
would fail, as our registry does not contain any information about a
provider with an empty type.

We do two things in this change:

1. When serializing a deployment, if there is no secrets manager,
don't even write the `secrets_provider` block. This helps for cases
where we are roundtripping deployments that did not have a provider
configured (i.e. they were older stacks that did not use secrets)

2. When deserializing, if we see an empty secrets provider like the
above, interpret it to mean "this deployment has no secrets". We set
up a decrypter such that if it ends up haiving secrets, we panic
eagerly (since this is a logical bug in our system somewhere).
2019-05-21 17:11:54 -07:00
CyrusNajmabadi b32892e0c1
Simplify signature of pulumi.all (#2527) 2019-05-21 13:13:23 -04:00
CyrusNajmabadi 2246a97c17
Always normalize paths to forward slashes to properly work with gocloud (#2747) 2019-05-20 14:46:00 -04:00
Matt Ellis 7ca9721d23 Apply colorization to the ---outputs--- line
We were not actually calling our colorization routines, which lead to
printing this very confusing text:

```
<{%reset%}>    --outputs:--<{%reset%}>
```

When running updates with `--diff` or when drilling into details of a
proposed operation, like a refresh.
2019-05-20 11:43:02 -07:00
Matt Ellis 4f693af023 Do not pass arguments as secrets to CheckConfig/Configure
Providers from plugins require that configuration value be
strings. This means if we are passing a secret string to a
provider (for example, trying to configure a kubernetes provider based
on some secret kubeconfig) we need to be careful to remove the
"secretness" before actually making the calls into the provider.

Failure to do this resulted in errors saying that the provider
configuration values had to be strings, and of course, the values
logically where, they were just marked as secret strings

Fixes #2741
2019-05-17 16:42:29 -07:00
Matt Ellis 2cd4409c0d Fix a panic during property diffing
We have to actually return the value we compute instead of just
dropping it on the floor and treating the underlying values as
primitive.

I ran into this during dogfooding, the added test case would
previously panic.
2019-05-15 16:20:25 -07:00
Matt Ellis 137b517c13 Prepare for release 2019-05-15 12:04:43 -07:00
Matt Ellis b4cca4a108 Update CHANGELOG.md 2019-05-15 09:33:02 -07:00
Matt Ellis e453c7db9e Eagerly validate secrets-provider option
Validate the value is well formed much earlier so you don't end up
seeing you've picked a bad value in the middle of trying to create
your new stack. Update the helptext to list currently supported
values.

Fixes #2727
2019-05-15 00:02:29 -07:00
Matt Ellis c91ddf996b Do not prompt for passphrase multiple times
The change does two things:

- Reorders some calls in the CLI to prevent trying to create a secrets
  manager twice (which would end up prompting twice).

- Adds a cache inside the passphrase secrets manager such that when
  decrypting a deployment, we can re-use the one created earlier in
  the update. This is sort of a hack, but is needed because otherwise
  we would fail to decrypt the deployment, meaning that if you had a
  secret value in your deployment *and* you were using local
  passphrase encryption *and* you had not set PULUMI_CONFIG_PASSPHRASE
  you would get an error asking you to do so.

Fixes #2729
2019-05-14 23:35:27 -07:00
Matt Ellis f6c25b7d2d Update Changelog for 0.17.11 2019-05-13 17:38:19 -07:00
Matt Ellis 5a5d320b7d Wordsmith CHNAGELOG.md 2019-05-10 17:12:35 -07:00
Matt Ellis 16932873a4 Update CHANGELOG.md 2019-05-10 17:07:52 -07:00
Cameron Stokes 1927b1c908 ~CHANGELOG: Change date format of recent release (#2716)
Be consistent with previous date formats (and use a format that's less ambiguous).
2019-05-10 16:55:09 -07:00
Erin Krengel b0327b96db
Ekrengel/fix azure urls (#2709)
* Fix GetVSCInfo for various Azure urls
2019-05-08 09:25:59 -07:00
Praneet Loke f4112a4ea1
Add detection of Azure Pipelines (#2705)
* Add a var for PRNumber. Add an environment metadata key for PR number.

* Move the detection of PULUMI_CI_SYSTEM into vars.DetectVars(). Set the PRNumber CI property based on respective env vars from each CI system.

* Add Azure Pipelines build variables.

* Add tests for DetectVars.

* Added changelog entry for Azure Pipelines.

* Capture the value of env var being modified for the ciutil unit test, and restore their values at the end of them.

* Simplify the DetectVars function by moving the Pulumi CI system code into the switch-case expression.

* Rename the Pulumi CI system to Generic CI. Include the GenericCI system in the test case for DetectVars.
2019-05-07 11:49:13 -07:00
Justin Van Patten fedfc9b6b4
pulumi update => pulumi up (#2702)
We changed the `pulumi update` command to be `pulumi up` a while back
(`update` is an alias of `up`). This change just makes it so we refer to
the actual command, `pulumi up`, instead of the older `pulumi update`.
2019-05-06 14:00:18 -07:00
CyrusNajmabadi b146733a26
Update changelog. (#2699) 2019-05-04 21:58:17 -07:00
Matt Ellis 2efde733b2
Merge pull request #2694 from bigkraig/contrib
Minor contributing doc improvement
2019-05-02 16:53:35 -07:00
CyrusNajmabadi daca809d09
Fix local file:// stacks on Windows. (#2696) 2019-05-02 16:52:00 -07:00
Matt Ellis 769cd7ce07
Merge pull request #2615 from pulumi/ellismg/scout-node-12
Support Node 12
2019-05-02 10:25:00 -07:00
Kraig Amador 7dac095d98
Updated CHANGELOG 2019-05-02 10:20:48 -07:00
Luke Hoban 3062ba7c4f
Move CHANGELOG entry for pulumi preview --json (#2690)
This was first released in `0.17.9` not `0.17.8`.
2019-05-01 12:39:18 -07:00
Matt Ellis de78ddb4b6 Update CHANGELOG.md 2019-05-01 10:05:33 -07:00
Justin Van Patten cde23669e2
pulumi new: Suppress npm warnings (#2685)
Right now, when we run `npm install` as part of `pulumi new`, the
following warnings are emitted:

```
node-pre-gyp WARN Using needle for node-pre-gyp https download

...

npm WARN aws-typescript@ No description
npm WARN aws-typescript@ No repository field.
npm WARN aws-typescript@ No license field.
```

We can suppress these warnings by specifying `--loglevel=error` to the
`npm install` command.
2019-05-01 09:17:53 -07:00
Justin Van Patten 55b233fbdc
Update CHANGELOG for 0.17.9 (#2687) 2019-04-30 11:01:58 -07:00
Justin Van Patten 95d51efe6a
pulumi new: Ensure the stack is selected (#2683)
Ensure the stack is selected when using `pulumi new` with an existing
stack (e.g. a stack created on app.pulumi.com).
2019-04-29 13:32:15 -07:00
Fraser Waters 6a2c9ae4f8 Update CHANGELOG.md 2019-04-27 21:47:49 +01:00
joeduffy 250bcb9751 Add a --json flag to the preview command
This change adds a --json flag to the preview command, enabling
basic JSON serialization of preview plans. This effectively flattens
the engine event stream into a preview structure that contains a list
of steps, diagnostics, and summary information. Each step contains
the deep serialization of resource state, in addition to metadata about
the step, such as what kind of operation it entails.

This is a partial implementation of pulumi/pulumi#2390. In particular,
we only support --json on the `preview` command itself, and not `up`,
meaning that it isn't possible to serialize the result of an actual
deployment yet (thereby limiting what you can do with outputs, etc).
2019-04-25 17:36:31 -07:00
PLACE 70bc0436ed Add support for state in cloud object storage (S3, GCS, Azure) (#2455) 2019-04-24 20:55:39 -07:00
Mike Metral 24f08ddb0f Update CHANGELOG for 0.17.8 2019-04-23 13:21:56 -07:00
Luke Hoban 0550f71a35
Add an ignoreChanges resource option (#2657)
Fixes #2277.

Adds a new ignoreChanges resource option that allows specifying a list of property names whose values will be ignored during updates. The property values will be used for Create, but will be ignored for purposes of updates, and as a result also cannot trigger replacements.

This is a feature of the Pulumi engine, not of the resource providers, so no new logic is needed in providers to support this feature. Instead, the engine simply replaces the values of input properties in the goal state with old inputs for properties marked as ignoreChanges.

Currently, only top level properties may be specified in ignoreChanges. In the future, this could be extended to support paths to nested properties (including into array elements) with a JSONPath/JMESPath syntax.
2019-04-22 13:54:48 -07:00
Joe Duffy 3b93199f7a Use Outputs instead of merged Inputs+Outputs (#2659)
Fixes #2650.

We have historically relied on merging inputs and outputs in several places in the engine. This used to be necessary, as discussed in #2650 (comment), but our core engine model has moved away from depending on this. However, we still have a couple places we do this merge, and those places have triggered several severe issues recently in subtle cases.

We believe that this merging should no longer be needed for a correct interpretation of the current engine model, and indeed that doing the merge actively violates the contract with providers. In this PR we remove the remaining places where this input + output merge was being done. In all three cases, we use just the Outputs, which for most providers will already include the same values as the inputs - but correctly as determined by the provider itself.
2019-04-22 13:52:36 -07:00
Matt Ellis f78c2f58f6 Update CHANGELOG.md for release 2019-04-17 08:19:52 -07:00
Joe Duffy 644d5dc916
Enable unit testing for Pulumi programs (#2638)
* Enable unit testing for Pulumi programs

This change enables rudimentary unit testing of your Pulumi programs, by introducing a `PULUMI_TEST_MODE` envvar that, when set, allows programs to run without a CLI. That includes

* Just being able to import your Pulumi modules, and test ordinary functions -- which otherwise would have often accidentally triggered the "Not Running in a CLI" error message
* Being able to verify a subset of resource properties and shapes, with the caveat that outputs are not included, due to the fact that this is a perpetual "dry run" without any engine operations occurring

In principle, this also means you can attach a debugger and step through your code.

* Finish the unit testing features

This change

1) Incorporates CR feedback, namely requiring that test mode be
   explicitly enabled for any of this to work.

2) Implements Python support for the same capabilities.

3) Includes tests for both JavaScript and Python SDKs.

* Add a note on unit testing to the CHANGELOG

* Use Node 8 friendly assert API

* Embellish the CHANGELOG entry a bit
2019-04-16 22:20:01 -07:00
Levi Blackstone 2532ce0527
Update changelog for 0.17.6 release (#2639) 2019-04-11 11:53:17 -06:00
Alex Clemmer fac6944781 Warn instead of error when refresh'd resource is unhealthy
Fixes #2633.

Currently when a user runs `refresh` and a resource is in a state of
error, the `refresh` will fail and the resource state will not be
persisted. This can make it vastly harder to incrementally fix
infrastructure. The issue mentioned above explains more of the
historical context, as well as some specific failure modes.

This commit resolves this issue by causing refresh to *not* report an
error in this case, and instead to simply log a warning that the
`refresh` has recognized that the resource is in an unhealthy state
during state sync.
2019-04-10 16:43:33 -07:00
Matt Ellis 44292747d4 Collect logs from Google Cloud Functions
This change adds an operations provider for GCP. Right now, it can
just collect logs from google cloud functions, similar to `gcloud
functions logs read`
2019-04-08 09:44:05 -07:00
Joe Duffy cc7a657628
Make the Python SDK's Config.name argument optional (#2624)
This makes the Python SDK's Config constructor name argument
optional, similar to what we do in the Node.js SDK. If not supplied,
the current project name is used as the default.
2019-04-04 16:55:01 -07:00
CyrusNajmabadi 1f51ec00fc
Revert 'Simplify API for passing providers to a ComponentResource (#2602)' (#2606) 2019-03-28 18:31:03 -07:00
CyrusNajmabadi 7193622183
Simplify API for passing providers to a ComponentResource (#2602) 2019-03-28 15:04:07 -07:00
Matt Ellis 2ace3e7b0c Correctly handle FileArchives when the filename contains a dot
Our logic for how we handled `.tar.gz` archives meant that any other
type of file that had a dot in the filename would not be detected
correctly.

Fixes #2589
2019-03-28 13:26:07 -07:00
CyrusNajmabadi b1c9386926
Update changelog (#2594) 2019-03-26 16:53:37 -07:00
CyrusNajmabadi 992952b54f
Revert "Better present interpolated strings during preview. (#2564)" (#2593) 2019-03-26 16:36:43 -07:00
Matt Ellis ccd958777c Don't print error prefix when a confirmation prompt is declined
Use `result.Result` in more places, so when a confirmation prompt is
declined, we just return `result.Bail()` after printing a message
without the `error: ` prefix.

Fixes #2070
2019-03-26 15:17:18 -07:00
Sean Gillespie f34aef2f4d
Prepare CHANGELOG.md for release (#2591) 2019-03-26 14:45:09 -07:00
Sean Gillespie 4d227f7ed2
Load default providers deterministically (#2590)
* Load default providers deterministically

This commit adds a new algorithm for deriving a list of default
providers from the set of plugins reported from the language host and
from the snapshot. If the language host reports a set of plugins,
default providers are sourced directly from that set, otherwise default
providers are sourced from the full set of plugins, including ones from
the snapshot.

When multiple versions of the same provider are requested, the newest
version of that provider is always select as the default provider.

* Add CHANGELOG.md entry

* Skip the language host's plugins if it reports no resource plugins

* CR feedback

* CR: Log when skipping non resource plugin
2019-03-26 13:29:34 -07:00
Matt Ellis 3621c01f4b Fix spurious warnings when using dynamic provider
When using a dynamic provider, the following messages are printed,
because we did not update the dynamic provider when we added these new
RPCs:

```
Method handler checkConfig for /pulumirpc.ResourceProvider/CheckConfig expected but not provided
Method handler diffConfig for /pulumirpc.ResourceProvider/DiffConfig expected but not provided
```

Given that we don't do anything for the `configure` RPC today, we can
also just no-op these RPCs as well.
2019-03-26 12:04:15 -04:00
CyrusNajmabadi 906488c7d0
Fix issue where we could not serialize an arrow-function with a deconstructed parameter. (#2582) 2019-03-22 16:48:38 -07:00
CyrusNajmabadi be1c3eb05b
Add support for serializing bigints (#2581) 2019-03-22 15:33:37 -07:00
Matt Ellis a1bb16407d Add pulumi stack rename
`pulumi stack rename` allows you to change the name of an existing
stack. This operation is non-distructive, however it is possible that
the next update will show additional changes to resources, if the
pulumi program uses the value of `getStack()` as part of a resource
name.
2019-03-19 11:04:33 -07:00
Matt Ellis b774917e57 Prepare CHANGELOG.md for release 2019-03-15 15:21:34 -07:00
Sean Gillespie 26cc1085b1
Install missing plugins on startup (#2560)
* Install missing plugins on startup

This commit addresses the problem of missing plugins by scanning the
snapshot and language host on startup for the list of required plugins
and, if there are any plugins that are required but not installed,
installs them. The mechanism by which plugins are installed is exactly
the same as 'pulumi plugin install'.

The installation of missing plugins is best-effort and, if it fails,
will not fail the update.

This commit addresses pulumi/pulumi-azure#200, where users using Pulumi
in CI often found themselves missing plugins.

* Add CHANGELOG

* Skip downloading plugins if no client provided

* Reduce excessive test output

* Update Gopkg.lock

* Update pkg/engine/destroy.go

Co-Authored-By: swgillespie <sean@pulumi.com>

* CR: make pluginSet a newtype

* CR: Assign loop induction var to local var
2019-03-15 15:01:37 -07:00
Pat Gavlin d14f47b162
Elide diffs in internal properties (#2543)
Various providers use properties that begin with "__" to represent
internal metadata that should not be presented to the user. These
changes look for such properties and elide them when displaying diffs.
2019-03-11 18:01:48 -07:00
Pat Gavlin 7ebd70a3e6
Refresh inputs (#2531)
These changes take advantage of the newly-added support for returning
inputs from Read to update a resource's inputs as part of a refresh.
As a consequence, the Pulumi engine will now properly detect drift
between the actual state of a resource and the desired state described
by the program and generate appropriate update or replace steps.

As part of these changes, a resource's old inputs are now passed to the
provider when performing a refresh. The provider can take advantage of
this to maintain the accuracy of any additional data or metadata in the
resource's inputs that may need to be updated during the refresh.

This is required for the complete implementation of
https://github.com/pulumi/pulumi-terraform/pull/349. Without access to
the old inputs for a resource, TF-based providers would lose all
information about default population during a refresh.
2019-03-11 13:50:00 -07:00
Justin Van Patten 7d7e104ee3
Stop running up as part of pulumi new (#2539)
Originally, `pulumi new` did not run `up` after generating a project. To
help users get a deployed stack as quickly as possible, we changed
`pulumi new` to run an initial deployment at the end of its operation.
Users would first see a preview and get to decide whether to proceed
with an initial deployment, and then continue to iterate from there.

Note that this would only happen for nodejs projects
(TypeScript/JavaScript). We would not run `up` for Python projects as we
require the user to run `pip install` in a virtualenv, so we'd print
instructions with the necessary commands the user must run instead.

Running `up` as part of `pulumi new` for nodejs projects has ended up
being more confusing than helpful for new users, and annoying for
experienced users. New users aren't expecting `pulumi new` to run an
initial deployment after generating the project (they haven't even
looked at the project source yet). Experienced users find it frustrating
as you typically want to just generate the project, and don't want to
have to wait for the preview just to decline running the update.

This change reverts `pulumi new` back to not running `up` automatically
for nodejs projects. Instead, like with Python projects, at the end of
the operation, we print instructions to the user to run `pulumi up` to
deploy the project.
2019-03-11 12:32:40 -07:00
CyrusNajmabadi 680f7bf84e
Update changelog (#2532) 2019-03-07 12:47:23 -08:00
Pat Gavlin 4b33a45561
Filter diff keys based on provider info (#2526)
If a provider returns information about the top-level properties that
differ, use those keys to filter the diffs that are rendered to the
user.

Fixes #2453.
2019-03-06 16:41:19 -08:00
Justin Van Patten 7784c94c88
Show brew upgrade when installed with Homebrew (#2519)
Show `brew upgrade pulumi` as the upgrade message when the currently
running pulumi executable is on macOS and running from the brew install
directory.
2019-03-06 10:56:44 -08:00
CyrusNajmabadi 62b6f1c3b2
Spelling (#2521) 2019-03-06 02:58:08 -08:00
CyrusNajmabadi d6d839608b
Tweak signature of .apply to help TS infer things better. (#2520) 2019-03-06 01:53:58 -08:00
CyrusNajmabadi d06c0af32f
Update changelog (#2516) 2019-03-05 17:29:53 -08:00
CyrusNajmabadi 7f5e089f04
Update @pulumi/pulumi to version 0.17.0 (#2510)
This update includes several changes to core `@pulumi/pulumi` constructs that will not play nicely
in side-by-side applications that pull in prior versions of this package.  As such, we are rev'ing
the minor version of the package from 0.16 to 0.17.  Recent version of `pulumi` will now detect,
and warn, if different versions of `@pulumi/pulumi` are loaded into the same application.  If you
encounter this warning, it is recommended you move to versions of the `@pulumi/...` packages that
are compatible.  i.e. keep everything on 0.16.x until you are ready to move everything to 0.17.x.

### Improvements

- `Output<T>` now 'lifts' property members from the value it wraps, simplifying common coding patterns.  Note: this wrapping only happens for POJO values, not `Output<Resource>`s. 

- Depending on a **Component** Resource will now depend on all other Resources parented by that
  Resource. This will help out the programming model for Component Resources as your consumers can
  just depend on a Component and have that automatically depend on all the child Resources created
  by that Component.  Note: this does not apply to a **Custom** resource.  Depending on a
  CustomResource will still only wait on that single resource being created, not any other Resources
  that consider that CustomResource to be a parent.
2019-03-05 17:06:57 -08:00
CyrusNajmabadi 5a08bf5daa
Update changelog. (#2504) 2019-03-01 18:56:12 -08:00
CyrusNajmabadi 66ada50ccf
Do a version check and emit a warning if major/minor versions of @pulumi/pulumi do not match. (#2503) 2019-03-01 17:43:26 -08:00
Sean Gillespie 1b6fe6271f
Look for exact match when loading plugins (#2483)
* Look for exact match when loading plugins

Pulumi's current behavior when loading plugins is surprising in that it
will attempt to load the "latest" provider binary instead of exactly the
version that was requested. Since provider binaries and provider
packages are tied together and versioned together, this is going to be
problematic if a provider makes a breaking change.

Although there are other issues in this area, this commit fixes the
arguably bug-like behavior of loading the latest plugin and instead opts
to load the plugin that exactly the requested semver range. Today, the
engine will never ask for anything other than an exact version match.

Since this is a breaking change, this commit also includes an
environment variable that allows users to return back to the "old"
plugin loading behavior if they are broken. The intention is that this
escape hatch can be removed in a future release once we are confident
that this change does not break people.

* CR feedback

* Use SelectCompatiblePlugin for HasPluginGTE check
2019-03-01 15:42:38 -08:00
CyrusNajmabadi 3d1df982de
Incorrect closure serialization when object referenced through different functions. (#2497) 2019-02-28 11:11:43 -08:00
CyrusNajmabadi aa3c6d0ba6
Converting an Output to a string or JSON now produces a warning . (#2496) 2019-02-27 16:00:54 -08:00
Cyrus Najmabadi 34f83de210 Rollback waiting on children of a component when waiting on the component.
(cherry picked from commit d1ecc5a250)
2019-02-27 12:31:57 -08:00
CyrusNajmabadi c53f697a6f
Fix deadlock when waiting for transitive dependencies (#2471) 2019-02-24 12:14:16 -08:00
CyrusNajmabadi 967c6407a0
Revert "Simplify how we export the .all operator (#2467)" (#2469)
This reverts commit 93c9464125.
2019-02-23 19:54:28 -08:00
CyrusNajmabadi 93c9464125
Simplify how we export the .all operator (#2467) 2019-02-22 12:02:52 -08:00
CyrusNajmabadi ee5b13cb10
Update changelog (#2466) 2019-02-22 01:00:00 -08:00
CyrusNajmabadi 27b04c4c62
Have child resources update their parent urn to include themselves in its dependencies. (#2299) 2019-02-21 20:18:29 -08:00
Justin Van Patten b064a03054
Return error from stack tag commands in local mode (#2457)
Instead of operating as no-ops, return an error to make it more clear
that these commands are not currently implemented when using --local
mode.
2019-02-19 16:07:57 -08:00
Sean Gillespie e0b516d0cc
Fix an issue with empty ID for CustomResource (#2449)
* Fix an issue with empty ID for CustomResource

The Python runtime was checking the ID field it receives from the engine
against None, assuming that the engine would not set the ID field if one
was not present. However, it does set the ID field; it is set to the
empty string when an ID is not known.

This commit fixes an issue that can cause certain IDs to be erroneously
considered to be known during previews, which can cause problems during
the Check phase of resources that directly reference IDs of other
resources.

* Add CHANGELOG
2019-02-15 09:55:19 -08:00
Sean Gillespie c720d1329f
Enable delete parallelism for Python (#2443)
* Enable delete parallelism for Python

* Add CHANGELOG.md entry

* Expand changelog message - upgrade to Python 3

* Rework stack rm test

The service now allows removing a stack if it just contains the top
level `pulumi:pulumi:Stack` resource, so we need to actually create
another resource before `stack rm` fails telling you to pass
`--force`.

Fixes #2444
2019-02-12 14:49:43 -08:00
Luke Hoban 06d3c7811f
Fix date text 2019-02-11 15:28:17 -08:00
Matt Ellis 687a780b20 Show a better error when --force needs to be passed to stack rm
When `pulumi stack rm` is run against a stack with resources, the
service will respond with an error if `--force` is not
passed. Previously we would just dump the contents of this error and
it looked something like:

`error: [400] Bad Request: Stack still has resources.`

We now handle this case more gracefully, showing our usual "this stack
still has resources" error like we would for the local backend.

Fixes #2431
2019-02-07 15:25:02 -08:00
Pat Gavlin 6e90ab0341
Add support for explicit delete-before-replace (#2415)
These changes add a new flag to the various `ResourceOptions` types that
indicates that a resource should be deleted before it is replaced, even
if the provider does not require this behavior. The usual
delete-before-replace cascade semantics apply.

Fixes #1620.
2019-01-31 14:27:53 -08:00
Matt Ellis a627cf817a Ensure InvokeRequest is defined
InvokeRequest is defined in provider_pb.js not resource_pb.js. Require
that module instead.
2019-01-31 12:00:32 -08:00
Matt Ellis 07130913df Prepare for v0.16.13 2019-01-30 21:17:34 -08:00
Matt Ellis 50c2ebbdd5 Improve StackReference error message
Because of the change to include a stack's project as part of its
identity in the service, the names passed to StackReference now
require the project name as well.

Improve the error message when they do not include them.
2019-01-30 15:57:44 -08:00
Matt Ellis e950ab1e51 Update CHANGELOG.md for 0.16.12 2019-01-25 15:26:01 -08:00
Matt Ellis f94e2e7bcc Update CHANGELOG.md 2019-01-25 12:52:33 -08:00
Matt Ellis 902be2b0b0 Use project name as part of stack identity with cloud backend
This change starts to use a stack's project name as part of it's
identity when talking to the cloud backend, which the Pulumi Service
now supports.

When displaying or parsing stack names for the cloud backend, we now
support the following schemes:

`<stack-name>`
`<owner-name>/<stack-name>`
`<owner-name>/<project-name>/<stack-name>`

When the owner is not specificed, we assume the currently logged in
user (as we did before). When the project name is not specificed, we
use the current project (and fail if we can't find a `Pulumi.yaml`)

Fixes #2039
2019-01-24 16:56:54 -08:00