Commit graph

5789 commits

Author SHA1 Message Date
Komal
0f06e03931
Docstring fixups (#6194) 2021-01-25 12:22:17 -07:00
Fraser Waters
4fc745d807
Allow VERSION to be set explicitly (#6016) 2021-01-25 13:21:28 +00:00
Vivek Lakshmanan
54582e7c68
Merge pull request #6179 from pulumi/vl/FixEnum
[codegen/go] Fix default value handling for enums
2021-01-22 19:28:01 -08:00
Vivek Lakshmanan
e2c1ec73aa
Merge pull request #6180 from pulumi/lblackstone/fix-go-codegen
[codegen/go] Handle hyphenated package names
2021-01-22 19:26:11 -08:00
Vivek Lakshmanan
b8e0d53b9b Fix tests for other languages for updated enum test schema 2021-01-22 17:30:44 -08:00
Vivek Lakshmanan
fd3bbca5aa Fix default value handling for enums 2021-01-22 17:30:44 -08:00
Levi Blackstone
f5dab03846
[codegen/go] Handle hyphenated package names 2021-01-22 15:42:11 -07:00
Komal
51521bbe73
Improve automation-api docs (#6178) 2021-01-22 15:12:41 -07: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
Lee-Ming Zen
044e37573e Remove checkout of head in PR workflow 2021-01-21 20:18:56 -08:00
Vivek Lakshmanan
06b7f1d91c
Merge pull request #6173 from pulumi/vl/FixTestGoMod
Cleanup test go.mod
2021-01-21 17:25:42 -08: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
Vivek Lakshmanan
88d54c0c64 Cleanup 2021-01-21 16:09:08 -08:00
Vivek Lakshmanan
f5c76031ae Cleanup test go.mod
Follow up from https://github.com/pulumi/pulumi/pull/6124
2021-01-21 16:00:10 -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
Paul Stack
9322072146
Revert "Fix resource-ref-as-ID marshaling. (#6125)" (#6167) 2021-01-21 20:37:40 +00:00
Paul Stack
7b80188cd6
Revert "Add resource ref unit tests for the Go SDK." (#6166)
This reverts commit 3d505912b8.
2021-01-21 19:42:08 +00:00
Vivek Lakshmanan
8f7dfbb5ae
Merge pull request #6156 from pulumi/vl/AddGenProgram
Fix base import path handling in go programgen
2021-01-20 18:17:31 -08:00
Vivek Lakshmanan
6566b9058e Fix base import path handling in go programgen 2021-01-20 16:04:33 -08:00
Vivek Lakshmanan
ef66287b7b
Merge pull request #6124 from pulumi/vl/ExtRefCodegenGo
[go/codegen]  Support for external resource references and imports/aliases
2021-01-20 12:35:08 -08:00
Paul Stack
c1cdbccb46
Change back to pull-request-target which allows a write GitHub Token (#6151) 2021-01-20 19:53:44 +00:00
Vivek Lakshmanan
4da8a45eb2 Option to generate container types resources now specified in GoPackageInfo 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
38ac84038c Make resource container-type generation optional 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
3aa566d286 Fix tests 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
3d6701732a PR comments 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
68b655bba6 Test fixes for other languages due to change in schema. 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
8f2901df01 Test data to cover types generated for external references 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
22896074f3 Expand testing to cover all generated files 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
842e4aa052 Support for external resource references and imports/aliases 2021-01-20 11:29:01 -08:00
stack72
6d790fce29 Prepare for v2.18.0 release 2021-01-20 17:30:06 +00:00
Levi Blackstone
2dfec71a5c
[codegen/go] Register resource modules/packages (#6121) 2021-01-19 16:59:51 -07:00
Pat Gavlin
3d505912b8
Add resource ref unit tests for the Go SDK. (#6142)
- Add tests that deserialize known custom and component resources
- Add tests that deserialize missing custom and component resources

These changes also add support for deserializing resources with missing
modules/packages. Such resources are deserialized as generic component,
custom, or provider resources as appropriate.

Contributes to #5943.
2021-01-19 13:11:17 -08:00
Lee Briggs
49849fc91b
try an arm64 build (#5729) 2021-01-19 20:06:43 +00:00
Paul Stack
3b8c3f7e61
Add an option to be able to stack export showing secrets for use in ExtraRuntimeValidation (#6094)
Fixes: #2993

```
func TestAccMyExample(t *testing.T) {
	test := getBaseOptions().
		With(integration.ProgramTestOptions{
			Dir: filepath.Join(getCwd(t), "test-dir"),
			DecryptSecretsInOutput: true,
			ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) {
			  // manipulate the output of the stack here
			}),
		})

	integration.ProgramTest(t, &test)
}
```
2021-01-19 19:18:45 +00:00
Paul Stack
39b640ec9d
[chore] cleanup go formatting of pulumi.Unsecret (#6127) 2021-01-19 18:02:21 +00:00
Paul Stack
d84f7fc791
Revert "Add resource ref unit tests for the Go SDK." (#6136)
This reverts commit 940c0eaf62.
2021-01-19 12:01:34 +00:00
Pat Gavlin
940c0eaf62
Add resource ref unit tests for the Go SDK. (#6116)
- Add tests that deserialize known custom and component resources
- Add tests that deserialize missing custom and component resources

These changes also add support for deserializing resources with missing
modules/packages. Such resources are deserialized as generic component,
custom, or provider resources as appropriate.

Contributes to #5943.
2021-01-15 16:33:43 -08:00
Pat Gavlin
2f0dba23ab
Fix resource-ref-as-ID marshaling. (#6125)
When marshaling a resource reference as its ID (i.e. when
opts.KeepResources is false, as it will be in the case of downlevel SDKs
and resource providers), we must take care to marshal/unmarshal an empty
ID as the unknown property value.

This includes the following changes to the resource ref APIs:

- Bifurcate resource reference creation into two methods: one for
  creating references to custom resources and one for creating
  references to component resources.
- Store the ID in a resource reference as a PropertyValue s.t. it can be
  computed.
- Add a helper method for retrieving the ID as a string + an indicator of
  whether or not the reference has an ID.

Fixes #5939.
2021-01-15 16:06:57 -08: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
655418bbbf
Updating the description for the pulumi logs cli command (#6122)
Fixes: #6118
2021-01-15 18:23:52 +00:00
Levi Blackstone
aec642e8c9
[codegen/go] Add utility function to get current package version (#6117)
This function uses reflection to determine the current package
path and then extracts the version from that path string.
2021-01-15 10:03:57 -07: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