Commit Graph

16 Commits

Author SHA1 Message Date
Julien P 029fcc3ce0
Export automation.tag.TagMap type & @param tag fixes ()
# Description

Noticed a couple warnings when building the docs using typedoc.

- Fix some typedoc `@param` tags
- Export automation.tag.TagMap type


Ref: https://github.com/pulumi/docs/pull/10964

## Checklist

- [ ] I have run `make tidy` to update any new dependencies
- [ ] I have run `make lint` to verify my code passes the lint check
  - [ ] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-03-25 14:33:15 +00:00
Robbie McKinstry e05a3bd81c
Apply autoformat
This commit applies the Rome autoformatter to the Node SDK.
These changes are automatically produced. To reproduce these
changes, run `make format` from inside sdk/nodejs.
2023-04-28 18:27:10 -04:00
Abhinav Gupta a455e0005f
sdk/node/StackReference: Add getOutputDetails
NodeJS equivalent of the StackReference.GetOutputDetails
method and accompanying type added to the Go SDK in .

This will allow users of the TypeScript and JavaScript SDKs
to fetch outputs from stack references directly--without going through
an Output type.

Couple notes about testing:

- `MockMonitor.readResource` kept exploding because the getCustom method
  was missing on the provided object.
  I didn't find any examples in the Node SDK
  of using mocks to test StackReferences,
  so I'm guessing this was an unexercised code path.
  I've fixed that.
- It seems that the JavaScript SDK promotes an entire map to secret
  if an item inside it is a secret.
  So I had to isolate the two test cases into separate outputs
  to get the plain text case to be written as a "value".
  If there's a more correct way of setting up that mock,
  I'm happy to merge the outputs back into a single map
  for a more representative test case.

Refs , 
2023-02-03 16:47:27 -08:00
Daniel Bradley 350274c996
Tidy Nodejs SDK imports ()
* Remove unused nodejs SDK imports

Quick audit to find all unused imports in files

- Remove unused `protobufjs` dependency - we use `google-protobuf` and `@grpc/grpc-js`.

* Eliminate additional unused code
2022-05-30 09:31:28 +01:00
CyrusNajmabadi 66bd3f4aa8
Breaking changes due to Feature 2.0 work
* Make `async:true` the default for `invoke` calls ()

* Switch away from native grpc impl. ()

* Remove usage of the 'deasync' library from @pulumi/pulumi. ()

* Only retry as long as we get unavailable back.  Anything else continues. ()

* Handle all errors for now. ()


* Do not assume --yes was present when using pulumi in non-interactive mode ()

* Upgrade all paths for sdk and pkg to v2

* Backport C# invoke classes and other recent gen changes ()

Adjust C# generation

* Replace IDeployment with a sealed class ()

Replace IDeployment with a sealed class

* .NET: default to args subtype rather than Args.Empty ()

* 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 ()
2020-04-14 09:30:25 +01:00
CyrusNajmabadi 35bc41c5d3
Support sxs with old outputs with sync resources only. () 2019-12-17 19:04:09 -08:00
CyrusNajmabadi d4aa5fe20d Switch to 'console.log' for our hang warning. Add warning to synchronous StackReference calls. ()
Codepaths which could result in a hang will print a message to the console indicating the problem, along with a link to documentation on how to restructure code to best address it.

`StackReference.getOutputSync` and `requireOutputSync` have been deprecated as they may cause hangs on some combinations of Node and certain OS platforms. `StackReference.getOutput` and `requireOutput` should be used instead.
2019-11-19 12:51:14 -08:00
CyrusNajmabadi b135af10be
Enable full strict mode. () 2019-09-11 16:21:35 -07:00
Matt Ellis e349f3c094 Fix stack reference issue when running on a pre `-beta.3` CLI
In  we made change to the built in provider for `StackReference`
to return additional data about the names of outputs which were
secrets.  The SDKs uses this information to decide if it should mark a
stack output as secret when returning it's value from `getOutput`.

When using an older CLI which does not report this data, we hit an
error:

```
 TypeError: Cannot read property 'outputs' of undefined
```

This was caused by a refactoring error where we extracted a private
helper out of the StackReference class, but neglected to change one
instance of `this` to `sr`. While we do have tests that exercise this
feature, we would only see this bug when using an older CLI, and we
don't have automated tests here that use the neweset `@pulumi/pulumi`
with an older `pulumi` CLI
2019-08-22 11:55:02 -07:00
Matt Ellis 0bb4e6d70b Respond to PR feedback
Address post commit feedback from Cyrus on
2019-08-15 12:42:51 -07:00
Matt Ellis 9308246114 Do not taint all stack outputs as secrets if just one is
When using StackReference, if the stack you reference contains any
secret outputs, we have to mark the entire `outputs` member as a
secret output. This is because we only track secretness on a per
`Output<T>` basis.

For `getSecret` and friends, however, we know the name of the output
you are looking up and we can be smarter about if the returned
`Output<T>` should be treated as a secret or not.

This change augments the provider for StackReference such that it also
returns a list of top level stack output names who's values contain
secrets. In the language SDKs, we use this information, when present,
to decide if we should return an `Output<T>` that is marked as a
secret or not. Since the SDK and CLI are independent components, care
is taken to ensure that when the CLI does not return this information,
we behave as we did before (i.e. if any output is a secret, we treat
every output as a secret).

Fixes 
2019-08-13 16:11:38 -07:00
Luke Hoban aac25eabc4
Add requireOutput to StackReference ()
Provides an additional helper function to read outputs from a stack reference in case it is known that the stack output must be present. This is similar to the design for config.get and config.require.

Fixes .
2019-08-01 11:27:32 -07:00
CyrusNajmabadi 11a19a4990
Make it possible to get a StackReference output promptly () 2019-06-17 12:25:56 -07:00
CyrusNajmabadi 5211954f3a
Break out Resource and Output into their own files () 2019-01-31 18:08:17 -08:00
Pat Gavlin 1a651ab0e0
Always read StackReference resources ()
This is something of a quick hack to work around the limitations that
are at the root of . In short, `StackReference` resources do not
change during a update because their inputs have not changed and we do
not refresh resources as part of the update by default. We want
`StackReference` to remain a resource for myriad reasons (not the least
of which is to avoid a breaking change), but it does seem correct for it
to refresh its state during each update. Because there is no actual CRUD
operation associated with a `StackReferece`, we can obtain this behavior
by changing the implementation of its ctor in the various SDKs s.t. its
options bag always contains an appropriate `id`, thus indicating a
`Read`.

Fixes .
2019-01-03 16:06:21 -08:00
Pat Gavlin bc08574136
Add an API for importing stack outputs ()
These changes add a new resource to the Pulumi SDK,
`pulumi.StackReference`, that represents a reference to another stack.
This resource has an output property, `outputs`, that contains the
complete set of outputs for the referenced stack. The Pulumi account
performing the deployment that creates a `StackReference`  must have
access to the referenced stack or the call will fail.

This resource is implemented by a builtin provider managed by the engine.
This provider will be used for any custom resources and invokes inside
the `pulumi:pulumi` module. Currently this provider supports only the
`pulumi:pulumi:StackReference` resource.

Fixes .
2018-11-14 13:33:35 -08:00