pulumi/tests/testdata
Zaid Ajaj ebf838e02e
[go] Allow output-versioned invokes to resolve and maintain secrets (#17132)
Partially addressing #12710

### Description

This PR extends Go SDK-gen, specifically for output-versioned invokes
such that they no longer rely on the plain invokes for their function
body.

We do this by implementing and using a sdk function `InvokePackageRaw`
which is similar to `InvokePackage` except that it doesn't fail on
secrets and actually returns a boolean indicating whether the invoke
response contained any secrets. This way, the generated output-versioned
invokes can immediately wrap the response as a secret if necessary and
more importantly, not failing immediately if the response contained
secrets.

The sdk-gen test `output-funcs` actually do a runtime test for the newly
generated function body and it passes. ~~However, I don't think it
covers the _if secret then wrap as secret_ path~~ but maybe that's
acceptable because it's a simple one liner
```go
// <invoke function body ommited here>
if secret {
  return pulumi.ToSecret(output).(FuncResultOutput), nil
}
```
Follow-up PRs with less priority:
 - [x] A proper test for invokes with secrets in their response
 - [ ] A conformance test
- [ ] Doing the same for _generic_ output-versioned invokes to let them
maintain secretness

### EDIT
Updated the test in output-funcs such that it now returns a response for
an invoke containing secrets
2024-09-09 12:57:43 +00:00
..
aws_tf Add an envar to disable automatic provider installation (#14083) 2023-10-03 15:35:23 +00:00
bad_random_pp Make convert more lenient 2023-06-08 11:14:31 +01:00
codegen [go] Allow output-versioned invokes to resolve and maintain secrets (#17132) 2024-09-09 12:57:43 +00:00
component_pp Test components in convert 2023-06-01 20:54:44 +01:00
import_node Fix flakey test (#15311) 2024-01-30 14:08:47 +00:00
random_pp Add per-language smoke tests to the integration tests 2023-05-06 09:23:19 +01:00
random_yaml Add a simple yaml convert smoke test 2023-08-09 17:48:41 +01:00
relative_plugin_node Ensure project plugins are absolute paths (#15470) 2024-02-22 11:43:18 +00:00
simple_schema Add per-language smoke tests to the integration tests 2023-05-06 09:23:19 +01:00
simple_tags Cover bool like and number like values in pulumi:tags test (#14092) 2023-10-07 18:27:03 +00:00