quiet-wolf-18467
1.0
and 1.1
seems pretty broken due to change in the stack naming: https://github.com/pulumi/pulumi/issues/3223best-xylophone-83824
09/13/2019, 1:23 PMquiet-wolf-18467
best-xylophone-83824
09/13/2019, 1:26 PMpulumi config set
, just edit yaml filequiet-wolf-18467
best-xylophone-83824
09/13/2019, 1:28 PMquiet-wolf-18467
╰ pulumi preview
error: getting secrets manager: could not unmarshal map: could not parse devrel-metrics:telegraf:version as a configuration key (configuration keys should be of the form `<namespace>:<name>`)
best-xylophone-83824
09/13/2019, 1:29 PMdevrel-metrics
(letter 'r') ?quiet-wolf-18467
best-xylophone-83824
09/13/2019, 1:30 PM:
, try telegraf_version
quiet-wolf-18467
best-xylophone-83824
09/13/2019, 1:32 PMquiet-wolf-18467
require
or requireSecret
?best-xylophone-83824
09/13/2019, 1:40 PMquiet-wolf-18467
const password = requireSecret('name');
Output
. This means I can't render a file to put in my startupScript
. What is the expected way to handle this?cool-egg-852
09/13/2019, 2:06 PMpulumi.config()
it uses the project name. If you do specify it, then the variable has to have the namespace name like namespace:key
quiet-wolf-18467
cool-egg-852
09/13/2019, 2:08 PM.apply
or pulumi.interopolate
or a string template in some cases. It all depends on the situtation and also the style you want to go with.best-xylophone-83824
09/13/2019, 2:08 PMconst startupScript = password.apply(pw => `myScript with password=${pw}`);
quiet-wolf-18467
handlebars
toHTML
methodcool-egg-852
09/13/2019, 2:14 PMquiet-wolf-18467
cool-egg-852
09/13/2019, 2:23 PMquiet-wolf-18467
Diagnostics:
pulumi:pulumi:Stack (devrel-metrics-production):
error: Running program '/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/src/index.ts' failed with an unhandled exception:
TypeError: string.toHTML is not a function
at escapeExpression (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/utils.js:68:21)
at Object.eval (eval at createFunctionContext (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/
compiler/javascript-compiler.js:239:23), <anonymous>:12:7)
at main (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/runtime.js:152:32)
at Object.ret (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/runtime.js:155:12)
at Object.ret [as output-influxcloud] (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/compiler
/compiler.js:513:21)
at Object.invokePartialWrapper [as invokePartial] (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handleb
ars/runtime.js:51:46)
at Object.eval (eval at createFunctionContext (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/
compiler/javascript-compiler.js:239:23), <anonymous>:8:28)
at main (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/runtime.js:152:32)
at ret (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/runtime.js:155:12)
at ret (/home/rawkode/Code/src/github.com/influxdata/devrel-metric-collection/node_modules/handlebars/lib/handlebars/compiler/compiler.js:513:21)
Output
object from Pulumi and can't render it to a stringbest-xylophone-83824
09/13/2019, 2:27 PMconst data = pulumi.output({
telegrafVersion: config.require("telegraf_version"),
influxCloudUrl: config.require("influxcloud_url"),
influxCloudUsername: config.require("influxcloud_username"),
influxCloudPassword: config.requireSecret("influxcloud_password"),
influxCloudDatabase: config.require("influxcloud_database"),
influxCloud2Url: config.require("influxcloud2_url"),
influxCloud2Bucket: config.require("influxcloud2_bucket"),
influxCloud2Organization: config.require("influxcloud2_organization"),
influxCloud2Token: config.requireSecret("influxcloud2_token")
});
...
metadataStartupScript: data.apply( cfg => startupScriptCompiledTemplate(cfg)),
quiet-wolf-18467
creamy-potato-29402
09/13/2019, 6:21 PM