Commit graph

779 commits

Author SHA1 Message Date
CyrusNajmabadi bfcb07a164
Add functions to help make strings from values that may include Outputs (#2359) 2019-01-16 11:03:25 -08:00
Luke Hoban 5ec78df73d Update CHANGELOG for 0.16.10 release 2019-01-11 15:18:34 -08:00
Justin Van Patten 5d3d8c01dd
Add commands for managing stack tags (#2333)
Adds `pulumi stack tag` commands for managing stack tags.
2019-01-04 13:23:47 -08:00
CyrusNajmabadi 87e5a441f5
Convert resource to pojo objects when used as stack outputs. (#2311) 2019-01-03 10:03:11 -08:00
Justin Van Patten ea3b681a54
Link directly to /account/tokens (#2328)
We're changing /account to redirect to /account/profile instead of
/account/tokens as the user profile settings are a more natural place
to land when going into account settings.

This commit changes the CLI to link
directly to /account/tokens, avoiding having to click on
"Access Tokens" to go to the tokens page to get an access token when
coming from the URL outputted by the CLI.
2018-12-28 18:06:03 -05:00
Matt Ellis fc14d50359 Update CHANGELOG.md for 0.16.9 release 2018-12-24 20:41:44 -08:00
Matt Ellis 3ef40c6ba6 Update CHANGELOG.md
Add in some fixes and features that were missing from `CHANGELOG.md`
2018-12-24 09:56:31 -08:00
Matt Ellis b03c48e852 Merge v0.16.8 into master 2018-12-14 15:32:48 -08:00
Matt Ellis d2bd696d15 Fix synchronization with the event renderer (#2290)
The event rendering goroutine in the remote backend was not properly
synchronizing with the goroutine that created it, and could continue
executing after its creator finished. I believe that this is the root
cause of #1850.

(cherry picked from commit ded3882afd)
2018-12-14 14:19:01 -08:00
Pat Gavlin ded3882afd
Fix synchronization with the event renderer (#2290)
The event rendering goroutine in the remote backend was not properly
synchronizing with the goroutine that created it, and could continue
executing after its creator finished. I believe that this is the root
cause of #1850.
2018-12-13 19:58:26 -08:00
Matt Ellis 59a54f1802
Add --stack argument to a few missing commands (#2278)
As of this change, all of the stack specific commands for `pulumi` now
allow passing `--stack` to operate on a different stack from the
default one.

Fixes #1648
2018-12-10 10:10:43 -08:00
Matt Ellis ad78f3ef59 Improve error message when Pulumi.yaml can't be found
Fixes #2234
2018-12-06 14:04:01 -08:00
Matt Ellis 7b74f3b1be Update CHANGELOG.md for v0.16.7 2018-12-05 14:32:32 -08:00
Matt Ellis d7575072f2 Do not use relative path when launching dynamic provider
Previously, we assumed that the dynamic provider was located in
`./node_modules/@pulumi/pulumi/../` which is correct in the majority
of cases. However, tools like lerna or yarn workspaces (or custom
workflows) allow the node_modules folder to be located elsewhere on
disk, and node will still find it because of its algorithm for module
resolution.

So, do what we do in the language host itself, first launch node and
ask it to tell us where it resolves a require statement to on disk and
then launch node against that script.

Fixes #2261
2018-12-05 13:45:06 -08:00
Matt Ellis bb1fa36a47
Enable ANSI colorization in Windows terminal (#2269)
Before the windows console will understand ANSI colorization codes the
terminal must be put in a special mode by passing
ENABLE_VIRTUAL_TERMINAL_PROCESSING to SetConsoleMode. This was
happening as a side effect of term.StdStreams() from a docker package,
which we did before displaying the update data. However, any
colorization done before that call would just show the raw ANSI escape
codes.

Call this helper much earlier (i.e. as soon as the CLI starts up) so
any messages that we print will have the correct colorization applied
to them.

Fixes #2214
2018-12-04 16:58:32 -08:00
Matt Ellis f3fbc1d9ee Do not disable echo when stdin is not a terminal
When reading values like access keys or secrets from the terminal, we
would use the `terminal.ReadPassword` function to ensure characters
the user typed were not echo'd back to the console, as a convience.

When standard input was not connected to a tty (which would happen in
some cases like in docker when -t was not passed or in CI), this would
fail with an error about an bad ioctl. Update our logic such that
when standard in is not connected to a terminal, we just read input
normally.

While I was in the area, I unified the code for Windows and *NIX for
these functions.

Fixes #2017
2018-12-03 16:40:51 -08:00
Pat Gavlin 9c5526e7dd
Add a --config-file option for stack ops (#2258)
This option allows the user to override the file used to fetch and store
configuration information for a stack. It is available for the config,
destroy, logs, preview, refresh, and up commands.

Note that this option is not persistent: if it is not specified, the
stack's default configuration will be used. If an alternate config file
is used exclusively for a stack, it must be specified to all commands
that interact with that stack.

This option can be used to share plaintext configuration across multiple
stacks. It cannot be used to share secret configuration, as secrets are
associated with a particular stack and cannot be decryptex by other
stacks.
2018-11-30 15:11:05 -08:00
Pat Gavlin 3e913d2577
Update changelog (#2250)
Stamp in release info for 0.16.6.
2018-11-28 10:02:13 -08:00
Justin Van Patten 55534e9dad
Fix typo in CHANGELOG.md (#2249) 2018-11-28 08:27:28 -08:00
Matt Ellis 466f92dfb1 Minor wordsmithing in CHANGELOG.md 2018-11-26 13:34:24 -08:00
Matt Ellis 4865c1fc68 Update CHANGELOG.md
We are still building the muscle to do this per commit, so some things
had fallen through the cracks. I walked the output of `git log
v0.16.5...master` and added some small notes for improvements that we
had not documented.
2018-11-26 09:21:44 -08:00
Matt Ellis 72d52c6e1f Don't fail on configuration keys like a:config:b:c
Configuration keys are simple namespace/name pairs, delimited by
":". For compatability, we also allow
"<namespace>:config:<name>", but we always record the "nice" name in
`Pulumi.<stack-name>.yaml`.

While `pulumi config` and friends would block setting a key like
`a🅱️c` (where the "name" has a colon in it), it would allow
`a:config:b:c`. However, this would be recorded as `a🅱️c` in
`Pulumi.<stack-name>.yaml`, which meant we'd error when parsing the
configuration file later.

To work around this, disallow ":" in the "name" part of a
configuration key.  With this change the following all work:

```
keyName
my-project:keyName
my-project:config:keyName
```

However, both

`my-project:keyName:subKey`
`my-project:config:keyName:subKey`

are now disallowed.

I considered allowing colons in subkeys, but I think it adds more
confusion (due to the interaction with how we allow you elide the
project name in the default case) than is worthwhile at this point.

Fixes #2171
2018-11-20 14:14:37 -08:00
Matt Ellis c878916901 Look for language plugins next to pulumi when probing
When launching plugins today, `pulumi` looks in two places:

1. It looks to see if the plugin in on the $PATH and if so, uses
   it. This makes it easy to force a specific version of a resource
   provider to be used and is what happens at development time (since
   resource providers make their way onto $PATH via GOBIN).

2. If the above fails, it looks in the "plugin cache" in
   `~/.pulumi/plugins`. This is the location that `pulumi plugin
   install` places plugins.

Unlike resource provider plugins, we don't yet deliver language
plugins via `pulumi plugin install` so the language provider plugins
must be on the `$PATH` to be found. This is okay, because when we ship
the SDK, we include the executables next to `pulumi` itself.

However, if a user chooses to not put `pulumi` on their $PATH, or they
do but it is a symlink to the real `pulumi` binary installed
somewhere, we'd fail to find the language plugins, since they would
not be on the `$PATH`

To address this, when probing for language plugins, also consider
binaries next to the currently running `pulumi` process.

Fixes #1956
2018-11-20 12:02:36 -08:00
Matt Ellis 6e95bdda9c Merge branch 'release/0.16' into ellismg/merge-release 2018-11-16 20:22:13 -08:00
Matt Ellis faff805f1e Fix an issue where plugin install would fail on windows
The issue is related to this code:

https://github.com/pulumi/pulumi/blob/v0.16.4/pkg/workspace/plugins.go#L155-L195

Note that we use `defer` to ensure we close our handle to the file we
are unpacking when we encounter a file in the tarball.  However, the
defers don't run until the containing function ends, so when we go to
do the rename, or process still has a bunch of open file handles, which
prevents the directory from being renamed because it is "in use".

By doing all of the work in an anonymous function, we ensure that the
defer statements run before we go to rename the directory

Fixes #2217
2018-11-16 20:07:24 -08:00
Matt Ellis 76e20281f4 Fix a race when pulumi plugin install ran concurrently 2018-11-15 15:50:08 -08:00
Matt Ellis eca0ec4036 Add CHANGELOG.md 2018-11-13 09:43:20 -08:00
Luke Hoban 3b561392b1
Remove out-of-date files (#1401) 2018-06-05 08:39:19 -07:00
Matt Ellis cc04cd6581 Use per stack key for local stacks instead of per project
In the Pulumi Cloud, there is no guarantee that two stacks will share
the same encryption key. This means that encrypted config can not be
shared across stacks (in the Pulumi.yaml) file. To mimic this behavior
in the local experience, we now use a unique key per stack.

When upgrading an existing project, for any stack with existing
secrets, we copy the existing key into this stack. Future stacks will
get thier own encryption key. This strikes a balance between
expediency of implementation, the end user UX and not having to make a
breaking change.

As part of this change, I have introduced a CHANGELOG.md file in the
root of the repository and added a small note about the change to it.

Fixes #769
2018-01-19 00:50:59 -08:00