ripe-xylophone-26538
07/06/2020, 4:04 PMgray-jewelry-3360
07/20/2020, 7:50 PMfamous-garage-15683
07/21/2020, 6:38 PMrough-eve-30174
08/15/2020, 6:41 AMripe-xylophone-26538
08/20/2020, 1:29 PMrough-eve-30174
08/28/2020, 5:10 AMcuddly-table-34753
08/28/2020, 7:26 AMpulumi-language
process and wondering what it is for ?average-school-38756
09/08/2020, 5:09 PMlimited-rainbow-51650
09/23/2020, 1:04 PMlimited-rainbow-51650
10/12/2020, 11:54 AMmake prepare
of the tf-bridge, only in provider/go.mod
the module name is replaced with REPOSITORY
, but not in scripts/go.mod
, examples/go.mod
and sdk/go.mod
?
https://github.com/pulumi/pulumi-tf-provider-boilerplate/blob/master/Makefile#L37-L46ripe-xylophone-26538
10/19/2020, 11:14 AMtall-needle-56640
10/19/2020, 4:46 PMmake ensure
, but I get the error
make: pulumictl: Command not found
make: pulumictl: Command not found
make: pulumictl: Command not found
make: * No rule to make target 'ensure'. Stop.
calm-greece-42329
10/20/2020, 10:25 PMlemon-agent-27707
10/24/2020, 6:33 AMripe-xylophone-26538
11/05/2020, 11:40 AM[ActiveMQ]
to [ActiveMQ, RabbitMQ]
?ripe-xylophone-26538
11/05/2020, 11:40 AMlemon-agent-27707
11/09/2020, 11:30 PMrich-library-94587
11/29/2020, 8:46 AMastonishing-quill-88807
12/01/2020, 3:59 PMlemon-agent-27707
12/02/2020, 5:39 PMbored-oyster-3147
12/15/2020, 6:48 PMIDictionary<string, StackSettingsConfigValue> Config { get; }
.
The StackSettingsConfigValue
looks like:
{
string? ValueString,
IDictionary<string, object>? ValueObject,
bool IsSecure,
bool IsObject
}
This allows us to deserialize a structured object provided to stack settings config in a shape that isn't known at compile time. There is a catch though. Since both System.Text.Json
and YamlDotNet
deserialize to a dictionary differently, the compile-time type of ValueObject
must remain Dictionary<string, object>
in order to support both formats, since we don't want JSON or YAML to be exposed on StackSettingsConfigValue
. But the runtime-type will be different depending on what format we are deserializing.
Coming from JSON with System.Text.Json
, the type of TValue
at runtime will always be JsonElement
.
For good measure I tried Newtonsoft.Json
, and this library tries to determine the type if it is a primitive, but only at the first level of depth. So if the property is a .NET primitive it will be that type - I tried and got long
or double
for numbers depending on if there is a decimal, as well as bool
& string
. But if the property is itself an object, than rather than getting another nested Dictionary
you instead receive Newtonsoft's type JObject
.
Coming from YAML with YamlDotNet
, the type of TValue
at runtime is always a string
, but it will break apart nested objects. So you receive either string
or Dictionary<string, string>
depending on if the property itself is an object.
So questions, are we OK with this implementation? Are we OK with the runtime type being different depending on which format we're deserializing from? Do we prefer Newtonsoft's method over System.Text.Json? Honestly I prefer System.Text.Json's just because it is consistent across all depths, but it does mean that the json-specific Type is exposed right away (at runtime).tall-needle-56640
01/04/2021, 10:42 PMworried-honey-61577
01/05/2021, 4:42 PMmake build_sdks
command generates an npm library and a binary plugin. I can see the plugin:
$ pulumi plugin ls | grep rundeck
rundeck resource 0.2.0 40 MB 2 weeks ago 2 weeks ago
But now āĀ how do I actually get this deployed somewhere so that itās usable in a production environment?
Hereās my fork of the pulumi-tf-provider-boilerplate
, after having followed all the steps. Any ideas?worried-honey-61577
01/06/2021, 3:52 PMprovider/resources.go
Resources: map[string]*tfbridge.ResourceInfo{
// Map each resource in the Terraform provider to a Pulumi type. Two examples
// are below - the single line form is the common case. The multi-line form is
// needed only if you wish to override types or other default options.
//
// "aws_iam_role": {Tok: makeResource(mainMod, "IamRole")}
//
// "aws_acm_certificate": {
// Tok: makeResource(mainMod, "Certificate"),
// Fields: map[string]*tfbridge.SchemaInfo{
// "tags": {Type: makeType(mainPkg, "Tags")},
// },
// },
},
DataSources: map[string]*tfbridge.DataSourceInfo{
// Map each resource in the Terraform provider to a Pulumi function. An example
// is below.
// "aws_ami": {Tok: makeDataSource(mainMod, "getAmi")},
},
bored-oyster-3147
01/06/2021, 7:57 PMstack output --json
in order to get the latest outputs. Specifically this function:
async outputs(): Promise<OutputMap> {
await this.workspace.selectStack(this.name);
// TODO: do this in parallel after this is fixed <https://github.com/pulumi/pulumi/issues/6050>
const maskedResult = await this.runPulumiCmd(["stack", "output", "--json"]);
const plaintextResult = await this.runPulumiCmd(["stack", "output", "--json", "--show-secrets"]);
const maskedOuts = JSON.parse(maskedResult.stdout);
const plaintextOuts = JSON.parse(plaintextResult.stdout);
const outputs: OutputMap = {};
for (const [key, value] of Object.entries(plaintextOuts)) {
const secret = maskedOuts[key] === secretSentinel;
outputs[key] = { value, secret };
}
return outputs;
}
I'm willing to take any suggestions on how you'd like to accomplish this same result in .NET, since we can't simply assign arbitrary JSON to an anonymous object and have it typed such that we can iterate over the properties to build the resulting dictionary. I would consider just returning the JSON and letting the consumer deal with it and whatever they want to do with it. But that means you're losing the IsSecret
boolean on your output map as well, because we would only be able to return either plaintext or masked.worried-honey-61577
01/07/2021, 2:43 PMYou need to manage a cloud resource that doesnāt have provider support, and you expect to only use it from within one program. If you expect to use it from many programs, and in many languages, implementing a full provider is preferable.Why is that? From my point of view, if thereās a fairly simple set of resources weāll be interacting with, even if we do it in many pulumi projects across our organization, using a dynamic provider that we distribute as an NPM library seems simpler than implementing a full provider. This is partly because we donāt feel too confident implementing a full provider. Like what would we do in that case? Create a Terraform provider and then use that to generate a Pulumi provider? Cuz that does not seem easier than implementing a dynamic provider. Note that we only care about having a nodejs sdk
bored-oyster-3147
01/07/2021, 6:16 PMtall-needle-56640
01/18/2021, 11:00 PMbored-oyster-3147
01/19/2021, 4:36 PMquiet-wolf-18467
01/19/2021, 5:32 PMquiet-wolf-18467
01/19/2021, 5:32 PM