curved-summer-41191
01/08/2021, 9:51 PMprehistoric-nail-50687
01/11/2021, 4:03 PMpulumi.Output<any>
to pulumi.Output<string>
when getting an output from a StackReference
?
const infra = new pulumi.StackReference(`infra`);
const dbUser = infra.getOutput("dbUser"); // is of type pulumi.Output<any> but should be pulumi.Output<string>
do I really have to do this?:
const dbUser = infra.getOutput("dbUser") as pulumi.Output<string>;
breezy-butcher-78604
01/12/2021, 1:17 AMconst stackRef = new pulumi.StackReference("vpc/dev");
const subnetIds = stackRef.requireOutput("subnetIds");
given the above, subnetIds
will be of type Output<any>
but I want to be able to loop over the values because I need to create a resource for each subnet. is creating the resources inside an apply()
the only option?
it seems weird not being able to directly access the values since stack outputs should always be known prior to a pulumi up
or preview
right?adventurous-lighter-33507
01/12/2021, 7:22 PM▼ pulumi preview
Previewing update (dev)
View Live: https://app.pulumi.com/adamstortz/pulumi-new-relic/dev/previews/593c311f-f632-4713-87ea-b0077b6e0801
Type Name Plan Info
+ pulumipulumiStack pulumi-new-relic-dev create
└─ pulumiprovidersnewrelic default_3_9_0 1 error
Diagnostics:
pulumiprovidersnewrelic (default_3_9_0):
error: failed to load plugin /root/.pulumi/plugins/resource-newrelic-v3.9.0/pulumi-resource-newrelic: fork/exec /root/.pulumi/plugins/resource-newrelic-v3.9.0/pulumi-resource-newrelic: exec format erroradventurous-lighter-33507
01/12/2021, 7:23 PMquiet-tomato-48326
01/13/2021, 9:16 AMquiet-wolf-18467
crd2pulumi
and noticing that the apiVersion
is defined as such:
readonly apiVersion: pulumi.Output<"<http://cluster.x-k8s.io/v1alpha3|cluster.x-k8s.io/v1alpha3>" | undefined>;
I’m struggling to use this with other resources, however it does work if I change the generated line to readonly apiVersion: pulumi.Output<"<http://cluster.x-k8s.io/v1alpha3|cluster.x-k8s.io/v1alpha3>"> | undefined;
quiet-wolf-18467
future-hydrogen-91224
01/15/2021, 8:42 PMadamant-translator-31969
01/18/2021, 7:42 PMbland-byte-34481
01/20/2021, 7:55 PMerror: Running program '/Users/simon/workspace/aws-typescript/sample-full-infrastructure' failed with an unhandled exception:
TypeError: pulumi.runtime.registerResourceModule is not a function
at Object.<anonymous> (/Users/simon/workspace/aws-typescript/node_modules/@pulumi/app/index.ts:75:16)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/simon/workspace/aws-typescript/node_modules/@pulumi/index.ts:13:1)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
little-cartoon-10569
01/21/2021, 12:28 AMrhythmic-fireman-45324
01/21/2021, 3:44 AMrhythmic-fireman-45324
01/21/2021, 1:57 PMrhythmic-fireman-45324
01/21/2021, 1:58 PMadamant-translator-31969
01/22/2021, 8:29 PMprehistoric-kite-30979
01/24/2021, 4:24 PMOutput<string[]>
to Input<string>[]
?adamant-translator-31969
01/25/2021, 5:32 PMbland-byte-34481
01/25/2021, 7:41 PMexport const bucketObjectWithInput = (bucket: Bucket, param: pulumi.Input<string>, param2: pulumi.Input<string>) => {
const output: Output<string> = pulumi.all([
param2,
param2
]).apply<string>(async (args) => {
const [
param,
param2
] = args;
return JSON.stringify({
param,
param2
});
});
const outputPromise = new Promise<string>(resolve => output.apply(resolve));
const asset = new StringAsset(outputPromise);
const bucketObject = new BucketObject("uniqueName", {
bucket,
source: asset,
});
}
colossal-australia-65039
01/25/2021, 9:27 PMbland-byte-34481
01/26/2021, 11:57 PMprehistoric-kite-30979
01/27/2021, 4:36 PMroot stack was referenced before it was initialzed
error. https://github.com/pulumi/pulumi/blob/master/sdk/nodejs/runtime/stack.ts#L218quiet-hairdresser-18834
01/27/2021, 5:24 PMlet agwConfig: azure.network.ApplicationGatewayArgs = {
name: agwName,
resourceGroupName: resourceGroup.name,
autoscaleConfiguration: {
minCapacity: appGatewayAutoScaleMinimumInstanceCount,
maxCapacity: appGatewayAutoScaleMaximumInstanceCount
}
//... more code here
}
If I wanted to optionally have the autoscaleConfiguration not be set to anything, how can I do that?
I tried clearing it after with
if (!useAppGateayAutoScale)
{
agwConfig.autoscaleConfiguration = null;
}
but it gives me an error that the property is readonly so it can not be changedincalculable-engineer-92975
01/28/2021, 2:39 PMadamant-translator-31969
02/01/2021, 10:06 PMerror configuring Terraform AWS Provider: Error creating AWS session: SharedConfigErr: only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso
when I try to create rds.Instance ...someone could help me?proud-pizza-80589
02/02/2021, 1:58 PMsomeStack.getOutput(identifier);
exists or not? The typescript output is an Output<any> but the text docs say that it can be undefined.adventurous-lighter-33507
02/03/2021, 5:33 PMimport { OneDashboard, OneDashboardArgs } from "@pulumi/newrelic";
import { OneDashboardPage } from "@pulumi/newrelic/types/input";
import { CustomResourceOptions } from "@pulumi/pulumi";
const page1: OneDashboardPage = {
name: "page1",
};
const oneDashArgs: OneDashboardArgs = {
name: "sample dashboard",
pages: [page1],
};
const oneDashOptions: CustomResourceOptions = {};
const oneDash = new OneDashboard("my-one-dashboard", oneDashArgs, oneDashOptions);
I get this error:
error: Argument "dashboard" has invalid value $dashboard.
In field "pages": Expected type "[DashboardPageInput!]!", found [{name: "page1"}].
In element #1: Expected type "DashboardPageInput", found {name: "page1"}.
In field "widgets": Expected type "[DashboardWidgetInput!]!", found null.
It seems like there may be a mismatch between the New Relic One GraphQL API and the provider. Am I doing something wrong?bland-lamp-16797
02/11/2021, 11:00 AMerror: Running program '/Users/confiq/work/xxx/pulumi' failed with an unhandled exception:
/Users/confiq/work/wave-xxx-service/pulumi/node_modules/xxx-pulumi/index.ts:1
import * as pulumi from "@pulumi/pulumi";
^
SyntaxError: Unexpected token *
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.require.extensions.(anonymous function) [as .ts] (/Users/confiq/work/wave-xxx-service/pulumi/node_modules/ts-node/src/index.ts:431:14)
at Module.load (internal/modules/cjs/loader.js:653:32)
If I take same file and use it as non-package, it works.
This is probably beyond my knowledge of typescript/javascript but did anyone have something similar?
Somehow pulumi think this is javascript but it's definitely typescript and I don't want to downgrade 😞future-nail-59564
02/12/2021, 3:18 PMOutput<string>
? I have a custom component that returns a string output: in some cases it will return an output from a child resource, but in some cases the value will be known immediately/synchronously and I want to return it in the same output property. What’s the simplest syntax to return such a string as output?adventurous-lighter-33507
02/12/2021, 8:25 PMimport { OneDashboard, OneDashboardArgs } from "@pulumi/newrelic";
import { OneDashboardPage, OneDashboardPageWidgetPy } from "@pulumi/newrelic/types/input";
const pieWiget: OneDashboardPageWidgetPy = {
column: 1,
height: 3,
row: 4,
width: 4,
nrqlQueries: [
{
accountId: 399786,
query:
"...",
},
],
title: "filter envs",
};
const page1: OneDashboardPage = {
name: "Deployments",
description: "Current deployments by environment",
widgetPies: [pieWiget],
};
const deploymentsDashboardArgs: OneDashboardArgs = {
name: "Deployments Dashboard",
pages: [page1],
};
new OneDashboard("deployments", deploymentsDashboardArgs);
I am getting the following error:
error: newrelic:index/oneDashboard:OneDashboard resource 'deployments' has a problem: page.0: invalid or unknown key: widget_pies