Commit graph

2784 commits

Author SHA1 Message Date
stack72 2a224982a5 Reconcile master with 2.25.x patch releases 2021-04-17 11:43:08 +01:00
Justin Van Patten 780a0c8a3d
Support defining remote components in Go (#6403) 2021-04-16 11:49:21 -07:00
Pat Gavlin 507082c003
Generate old type names in k8s compat mode. (#6788)
This avoids unintentional breaking changes. Ideally we would use a
different knob, but we only have one compat field at the moment.
2021-04-16 11:30:25 -07:00
Vivek Lakshmanan c00dc5b4ca Rename gcp-native reference in docs 2021-04-16 09:06:11 -07:00
stack72 664776efe8 [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v3.0.0-rc.1 2021-04-16 09:00:09 +01:00
Pat Gavlin 1cc084dc0e
Fix inconsistent object type naming. (#6686)
See #6200 for a complete description of the issue. In short, we generate
inconsistent names for object types depending on whether or not they are
transitively reachable from resources or functions, which risks
unintentional breaking changes due to schema updates.

1. Name "input" types differently: `TArgs` for a type that is used in
   resource inputs, having `Input<T>` properties, and `T` for a type
   that is used in invoke inputs. The same schema type can produce both.

2. Always keep the name `T` for output types, avoid appending `Result` to
   the name.

3. As needed, introduce a flag in the existing providers' schemas to avoid
   breaking changes. Consider removing it on a major version bump.

Fixes #6200.
2021-04-15 19:03:28 -07:00
Justin Van Patten f7f33d92af [codegen/python] Remove deprecated __name__ and __opts__ args (#6765)
These have been deprecated for a very long time and it's a trivial change to remove them from the generated code. Let's clean this up for the 3.0-based providers.
2021-04-14 19:32:18 +01:00
Paul Stack 19bd08fb1c fixup linting errors after rebase of master -> feature-3.0 (#6766) 2021-04-14 19:32:18 +01:00
stack72 5679496127 [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v3.0.0-beta.2 2021-04-14 19:32:18 +01:00
Paul Stack f6fea7fafb [cli] Removing the deprecated pulumi history command (#6724) 2021-04-14 19:32:18 +01:00
Paul Stack e955a6b06a Refactor Mock newResource and call to accept property bag rather than individual args (#6672) 2021-04-14 19:32:18 +01:00
Justin Van Patten fef3157b18 [codegen/python] Adopt improved key translation (#6696)
This change updates the Python SDK codegen to opt-in to the new casing
translation behavior, which will use the passed-in props type's property
name metadata for translations, rather than calling the resource's
`translate_input_property` and `translate_output_property` methods.

- FIX: Keys in user-defined dicts will no longer be unintentionally
  translated/modified.

- BREAKING: Dictionary keys in nested output classes are now
  consistently snake_case. If accessing camelCase keys from such output
  classes, move to accessing the values via the snake_case property
  getters (or snake_case keys). A warning will be logged when accessing
  camelCase keys.

When serializing inputs:

- If a value is a dict and the associated type is an input type, the
dict's keys will be translated based on the input type's property
name metadata.

- If a value is a dict and the associated type is a dict (or Mapping),
the dict's keys will _not_ be translated.

When resolving outputs:

- If a value is a dict and the associated type is an output type, the
dict's keys will be translated based on the output type's property
name metadata.

- If a value is a dict and the associated type is a dict (or Mapping),
the dict's keys will _not_ be translated.
2021-04-14 19:32:18 +01:00
stack72 e05477b8d6 [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v3.0.0-beta.1 2021-04-14 19:32:18 +01:00
pulumi-bot 73a66f48ea [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
stack72 5db7c9e277 [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v2.25.0 2021-04-14 17:22:27 +01:00
Levi Blackstone d0509bee49
[cli] Handle providers field for RegisterResourceRequest (#6764)
Update the RegisterResource method in the ResourceMonitor
to unmarshal the providers field added in d297db3 and then resolve
any provider references so that they can be set on the Construct call.
2021-04-13 18:56:34 -06:00
Vivek Lakshmanan e5c99b5f65 Update escape character list for python docstrings 2021-04-13 15:12:50 -07:00
Vivek Lakshmanan dc32980a51 Add new doc alias 2021-04-12 10:36:58 -07:00
svangordon-fruit b7d4032044
Add a flag to stack history to print full dates (#6742) 2021-04-11 20:38:41 +01:00
Evan Boyle 15120b99e3
Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
Paul Stack 9a66a4182b
fix typo in pulumi stack cli docs (#6721)
Co-authored-by: Charles McGowan <40527412+glitchwizard@users.noreply.github.com>
2021-04-08 09:47:20 +01:00
Justin Van Patten dcf4359c57
[codegen/python] Support <Resource>Args classes (#6525)
Add support for creating instances of resources in Python using a
`<Resource>Args` class. This capability aligns with how args are passed
to resources in all the other language SDKs and the separate object bag
allows the properties to be manipulated/validated/passed-around before
creating the resource.
2021-04-02 10:09:17 -07:00
stack72 7f6ec8a7cf Cleanup after v2.24.1 release 2021-04-01 22:11:21 +01:00
Levi Blackstone 2dad8a6649
Revert "Swap out YAML parser library (#6642)" (#6681)
This reverts commit ff2cf70
2021-04-01 14:44:29 -06:00
Justin Van Patten a9f0aead13
[codegen/go] Fix Go resource registrations (#6641)
We've been emitting calls to `New<Resource>` for resource registrations
in Go, passing `nil` for args. However, some of those `New<Resource>`
functions actually check for `nil` args and return an error if the
resource has required arguments.

At first, I was looking for a way to check inside `New<Resource>` if
the `URN` option was specified and in that case not error on
`nil` args (like we do in other languages), but we don't provide a way
to access the resource option values outside the Go SDK), so I don't
think there is a way to do it this way for Go.

So instead, this change updates the registration code to call
`ctx.RegisterResource` directly instead of `New<Resource>`, where we can
pass a `nil` args.
2021-03-31 16:50:30 -06:00
Vivek Lakshmanan 656ed796a1
Merge pull request #6528 from pulumi/vl/Nested
[codegen/go] Support nested collection types
2021-03-31 14:37:56 -07:00
stack72 80a43e9bec [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v2.24.0 2021-03-31 21:27:02 +01:00
Vivek Lakshmanan 78c48d5d31 Fix comment/example handling 2021-03-30 22:24:45 -07:00
Vivek Lakshmanan fec7209d6b PR comments and some additional cleanup 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 3151d23f09 Fix to create inputs for nested collections types 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 05b196dc59 Avoid processing collections of primitives 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 8b5e196209 Cleanup 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 700a576b70 Support nested collection types 2021-03-30 22:24:11 -07:00
Levi Blackstone ff2cf701a7
Swap out YAML parser library (#6642)
Related to #423
2021-03-29 14:49:00 -06:00
stack72 1c16f3bea7 [deps] Ensure pulumi/pulumi pkg uses sdk v2.23.2 2021-03-25 17:35:35 +00:00
Luke Hoban b82b850af0
Fix pulumi refresh diffs (#6568) 2021-03-19 13:11:59 +11:00
pulumi-bot 92544b746a [deps] Pinning pulumi/pulumi pkg & tests to v2.23.1 of the pulumi sdk 2021-03-18 04:14:20 +00:00
pulumi-bot 7977f1d160 Post v2.23.0 release cleanup 2021-03-17 19:23:39 +00:00
pulumi-bot 8a98c7fc14 [deps] Pinning pulumi/pulumi pkg to v2.23.0 of the pulumi sdk 2021-03-17 16:24:06 +00:00
Kraig Amador 71ec66aa45
Support locking on filestate logins (#2697)
When using the filestate backend (local files and cloud buckets) there is no protection to prevent two processes from managing the same stack simultaneously.

This PR creates a locks directory in the management directory that stores lock files for a stack. Each backend implementation gets its own UUID that is joined with the stack name. The feature is currently available behind the `PULUMI_SELF_MANAGED_STATE_LOCKING=1` environment variable flag.
2021-03-16 14:00:47 +11:00
Paul Stack 59686ab3ad
Ensure a user has access to the secret manager before trying to decrypt checkpoint (#6215) 2021-03-15 14:17:43 +00:00
Christian Nunciato c20bdbe945
Update resource-docs templates to adjust for Hugo upgrade (#6524) 2021-03-14 07:24:55 -07:00
Paul Stack 3f2d58ef7b
Fixing up go.mod and go.sum to ensure they don't continually change (#6502) 2021-03-11 20:41:45 +00:00
Komal 10d99b8afb
[automation/go] - Expose structured logging (#6436) 2021-03-10 20:49:48 -08:00
Paul Stack 63857ac72d
Disabling the use of pulumi watch on darwin/arm64 architecture (#6497) 2021-03-10 22:03:55 +00:00
Paul Stack 1f16423ede
Change nodejs codegen to use coalescing operator when when default values are present (#6496) 2021-03-10 21:16:18 +00:00
Justin Van Patten 572c74826c
Add schema & codegen support for plain properties (#6481)
This change adds schema and codegen support for plain properties which
are emitted typed as the plain type rather than wrapped as an `Input`.
Plain properties require a prompt value and do not accept a value that
is `Output`.
2021-03-10 07:08:08 -08:00
Paul Stack 0241fb282c
Upgrading to go-cloud v0.22.0 (#6473) 2021-03-09 18:59:01 +00:00
Paul Stack 0d5b3d375d
Ensuring dotnet package sources are correct for local packages (#6476)
When passing a package source as part of a `dotnet add package` in
our acceptance testing framework, dotnet was then trying to use that
package source for the restoration of other packages in the csproj
file.

We have removed passing the source to dotnet add package add
and replaced it with adding a machine level package source via
dotnet nuget add source command

this is the more correct way to work and will allow us to be able
to search multiple locations as part of the dotnet restore command
2021-03-09 14:57:24 +00:00
Mikhail Shilkov 3ddf121b79 Respect provider aliases while diffing resources 2021-03-02 22:48:31 +01:00