Commit graph

732 commits

Author SHA1 Message Date
Pat Gavlin b7404f202e
Expose update events to ExtraRuntimeValidation. (#3160)
* Add the ability to log all engine events to a file.

The path to the file can be specified using the `--event-log` flag to
the CLI. The file will be truncated if it exists. Events are written as
a list of JSON values using the schema described by `pkg/apitype`.

* Expose update engine events to ExtraRuntimeValidation.

Just what it says on the tin. Events from previews are not exposed.
2019-09-06 17:07:54 -07:00
Alex Clemmer 261b69ae6a Requite debug env var for --policy-pack
Fixes https://github.com/pulumi/pulumi-policy/issues/89.
2019-08-29 10:49:11 -07:00
Luke Hoban f0a24079ce
Filter the list of templates shown by default (#3147)
If any templates are marked as `Important: true` then by default show only those templates along with an option to see additional templates.

Fixes #3094.
2019-08-27 17:56:49 -07:00
Joe Duffy a687f81575
Update the tagline in our CLI (#3141) 2019-08-26 20:24:00 -07:00
Justin Van Patten 0cb850ff9c
Remove expanded_url from the command that generate docs (#3134)
As of the new TOC, `expanded_url` isn't a thing anymore, so no need to emit it when generating command docs.
2019-08-23 14:26:40 -07:00
Mikhail Shilkov 1a93049e71 Swap names of the tests 2019-08-23 19:08:57 +02:00
Mikhail Shilkov 7e7fc01d5b Refactor broken tests 2019-08-23 19:08:57 +02:00
Mikhail Shilkov 273ade2ac0 Parameterize the progress function with a message 2019-08-23 14:45:29 +02:00
Mikhail Shilkov 370047bbb6 Show a progress bar for plugin installation during pulumi up 2019-08-23 14:45:29 +02:00
Mikhail Shilkov ccc7ec145a Extend the test suite 2019-08-23 09:09:54 +02:00
Mikhail Shilkov c270204387 Check project existence during pulumi new 2019-08-23 09:09:54 +02:00
Mikhail Shilkov c88fcc4fb3 Review comment 2019-08-23 08:40:31 +02:00
Mikhail Shilkov b8aff4dfbd Add a hint about stack rm after successful destroy 2019-08-23 08:40:31 +02:00
Chris Smith eb0934970c
Add support for filtering stacks by organization, tag (#3108)
* Add support for filtering stacks by organization, tag

* Update CHANGELOG.md

* Address PR feedback

* Address even more PR feedback

* Support empty-string filters
2019-08-22 13:56:43 -07:00
ben-nagengast 638075e3e1 Fixing error message typo. "buy" -> "by" 2019-08-20 13:35:32 -07:00
Mikhail Shilkov 04b169a64b Add a hint about the org name in stack in pulumi new 2019-08-19 09:21:02 +02:00
Luke Hoban 82903927f1
Add CLI docs on --secrets-provider (#3099)
Part of pulumi/docs#1509.
2019-08-16 12:53:02 -07:00
Luke Hoban 3cc67cee86
Annotate preview features (#3098)
The `pulumi logs` and `pulumi history` commands are still in preview, even as `pulumi` itself will reach 1.0.  We now communicate this clearly in CLI help text.

The local and remote state backends are also still in preview, and this is annotated inline in the help text for the `pulumi login` command which is the entrypoint to this functionality.
2019-08-16 12:52:32 -07:00
CyrusNajmabadi 2afe5b88b8
Disable interactive-terminal spinner when on a CI machine. (#3070) 2019-08-13 12:50:09 -07:00
Alex Clemmer ef8cc236c4 Implement --policy-pack flag on up and preview
Fixes pulumi/pulumi-policy#43.
2019-08-12 12:45:48 -07:00
Alex Clemmer 7070304f81 Use npm pack for policy publish
Fixes #35.
2019-08-05 16:12:12 -07:00
Alex Clemmer 6360cba588 Improve "project not found" error messages
Fixes pulumi/pulumi-policy#36.
Fixes pulumi/pulumi-policy#37.
2019-08-05 14:14:20 -07:00
Luke Hoban 6ed4bac5af
Support additional cloud secrets providers (#2994)
Adds support for additional cloud secrets providers (AWS KMS, Azure KeyVault, Google Cloud KMS, and HashiCorp Vault) as the encryption backend for Pulumi secrets. This augments the previous choice between using the app.pulumi.com-managed secrets encryption or a fully-client-side local passphrase encryption.

This is implemented using the Go Cloud Development Kit support for pluggable secrets providers.

Like our cloud storage backend support which also uses Go Cloud Development Kit, this PR also bleeds through to users the URI scheme's that the Go CDK defines for specifying each of secrets providers - like `awskms://alias/LukeTesting?region=us-west-2` or `azurekeyvault://mykeyvaultname.vault.azure.net/keys/mykeyname`.

Also like our cloud storage backend support, this PR doesn't solve for how to configure the cloud provider client used to resolve the URIs above - the standard ambient credentials are used in both cases. Eventually, we will likely need to provide ways for both of these features to be configured independently of each other and of the providers used for resource provisioning.
2019-08-02 16:12:16 -07:00
Chris Smith 17ee050abe
Refactor the way secrets managers are provided (#3001) 2019-08-01 10:33:52 -07:00
Pat Gavlin 1af7449f1a
Remove references to pulumi/glog. (#3009)
This package's flags conflict with those in google/glog. Replace all
references to this package with references to
pulumi/pulumi/pkg/util/logging, and change that package to explicitly
call `flag.CommandLine.Parse` with an empty slice.

This should make it much easier to consume these packages in downstream
repos that have direct or indirect dependencies on google/glog.
2019-07-31 13:23:33 -05:00
James Nugent 54fde111a7
Merge pull request #2984 from pulumi/jen20/replace-glog
Depend on `pulumi` fork of `glog`.
2019-07-25 16:43:55 -05:00
PLACE 3fb8a59da9 PULUMI_CONFIG_PASSPHRASE now supports an enpty passphrase (#2904)
This change allows you to run pulumi in non-interactive environments without a state passphrase.

e.g. the following will now work.

```
export PULUMI_CONFIG_PASSPHRASE=""
pulumi up --yes
```

Related to #2758.
2019-07-25 14:23:43 -07:00
James Nugent 7f6a6501ef Depend on pulumi fork of glog.
This removes the need for a replace directive in every downstream `go.mod`.
2019-07-25 16:10:53 -05:00
Chris Smith b0055787e6
Fix issue when logging out of local backend (#2951)
* Fix issue when logging out of local backend

* Put actual cloud URL into credentials.json

* Fix test on Windows; disable newly-enabled tests on Appveyor

* Keep track of the URL used to initialize local backend
2019-07-25 07:58:19 -07:00
Chris Smith c14a58987c Add --yes params to a couple commands (#2976) 2019-07-24 16:56:51 -07:00
Chris Smith f6379fae05
Fix 'pulumi new' to support creating stacks in an org (#2950)
* Fix 'pulumi new' to support creating stacks in an org

* Fix tests
2019-07-22 10:12:26 -07:00
bermudezmt 5539fff2f3 Update links to docs index and manual installation pages 2019-07-16 10:05:37 -07:00
Alex Clemmer 0850c88a97 Address comments 2019-07-16 00:58:33 -07:00
Alex Clemmer 826e6a1cca Add pulumi policy apply command 2019-07-16 00:58:33 -07:00
Alex Clemmer 95e8b314bd Implment pulumi policy publish
This commit, at long last, will connect the code we've written to pack
up and publish a set of policies to the pulumi service, to a CLI command
`pulumi policy publish`.
2019-07-16 00:58:33 -07:00
Justin Van Patten 1fd4fa0c76
Update gen-markdown command for new site (#2869)
The documentation on the new site will be under /docs, and the alias for
the ugly style URL is no longer needed.
2019-07-04 09:36:37 -07:00
Pat Gavlin 6e5c4a38d8
Defer all diffs to resource providers. (#2849)
Thse changes make a subtle but critical adjustment to the process the
Pulumi engine uses to determine whether or not a difference exists
between a resource's actual and desired states, and adjusts the way this
difference is calculated and displayed accordingly.

Today, the Pulumi engine get the first chance to decide whether or not
there is a difference between a resource's actual and desired states. It
does this by comparing the current set of inputs for a resource (i.e.
the inputs from the running Pulumi program) with the last set of inputs
used to update the resource. If there is no difference between the old
and new inputs, the engine decides that no change is necessary without
consulting the resource's provider. Only if there are changes does the
engine consult the resource's provider for more information about the
difference. This can be problematic for a number of reasons:

- Not all providers do input-input comparison; some do input-state
  comparison
- Not all providers are able to update the last deployed set of inputs
  when performing a refresh
- Some providers--either intentionally or due to bugs--may see changes
  in resources whose inputs have not changed

All of these situations are confusing at the very least, and the first
is problematic with respect to correctness. Furthermore, the display
code only renders diffs it observes rather than rendering the diffs
observed by the provider, which can obscure the actual changes detected
at runtime.

These changes address both of these issues:
- Rather than comparing the current inputs against the last inputs
  before calling a resource provider's Diff function, the engine calls
  the Diff function in all cases.
- Providers may now return a list of properties that differ between the
  requested and actual state and the way in which they differ. This
  information will then be used by the CLI to render the diff
  appropriately. A provider may also indicate that a particular diff is
  between old and new inputs rather than old state and new inputs.

Fixes #2453.
2019-07-01 12:34:19 -07:00
Artem Yarmoluk f1b5fb6e0f
Backend setting in project config
Signed-off-by: Artem Yarmoluk <koolgen@gmail.com>
2019-06-13 20:02:03 +03:00
Matt Ellis bc9448b1cf Fix crash in pulumi stack output when stack is empty 2019-06-11 12:58:29 -07:00
Mike Metral 803533d7d4 docs(login): escape codeblocks, and add object store state instructions 2019-06-07 10:37:06 -07:00
Matt Ellis c201d92380 Use server information from NodeJS host for fetching plugins 2019-06-03 09:31:18 -07:00
Matt Ellis 917f3738c5 Add --server to pulumi plugin install
Previously, when the CLI wanted to install a plugin, it used a special
method, `DownloadPlugin` on the `httpstate` backend to actually fetch
the tarball that had the plugin. The reason for this is largely tied
to history, at one point during a closed beta, we required presenting
an API key to download plugins (as a way to enforce folks outside the
beta could not download them) and because of that it was natural to
bake that functionality into the part of the code that interfaced with
the rest of the API from the Pulumi Service.

The downside here is that it means we need to host all the plugins on
`api.pulumi.com` which prevents community folks from being able to
easily write resource providers, since they have to manually manage
the process of downloading a provider to a machine and getting it on
the `$PATH` or putting it in the plugin cache.

To make this easier, we add a `--server` argument you can pass to
`pulumi plugin install` to control the URL that it attempts to fetch
the tarball from. We still have perscriptive guidence on how the
tarball must be
named (`pulumi-[<type>]-[<provider-name>]-vX.Y.Z.tar.gz`) but the base
URL can now be configured.

Folks publishing packages can use install scripts to run `pulumi
plugin install` passing a custom `--server` argument, if needed.

There are two improvements we can make to provide a nicer end to end
story here:

- We can augment the GetRequiredPlugins method on the language
  provider to also return information about an optional server to use
  when downloading the provider.

- We can pass information about a server to download plugins from as
  part of a resource registration or creation of a first class
  provider.

These help out in cases where for one reason or another where `pulumi
plugin install` doesn't get run before an update takes place and would
allow us to either do the right thing ahead of time or provide better
error messages with the correct `--server` argument. But, for now,
this unblocks a majority of the cases we care about and provides a
path forward for folks that want to develop and host their own
resource providers.
2019-06-03 09:31:18 -07:00
Praneet Loke bf3325d9c3
Remove the GitHubLogin and GitHubRepo update metadata keys (#2732) 2019-05-29 11:22:59 -07:00
Justin Van Patten da7c8f1dde
Improvements to the gen-markdown command for Hugo (#2764)
Updates to the gen-markdown command for the Hugo migration.
2019-05-23 10:37:10 -07: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
CyrusNajmabadi 2246a97c17
Always normalize paths to forward slashes to properly work with gocloud (#2747) 2019-05-20 14:46:00 -04:00
Matt Ellis 145fdd9a7c Fix spelling issues 2019-05-15 08:32:49 -07:00
Matt Ellis 5be8b5da12 Fix lint issues
The linter had been warning me for a while that some comments we had
confused it.  I fixed this.  Then the linter found a place where we
were ignoring a return value.  Looking at it, it feels like we want to
continue in this case, so I just `contract.IgnoreError`'d it.
2019-05-15 00:02:35 -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