Commit graph

427 commits

Author SHA1 Message Date
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