mammoth-art-6111
03/11/2022, 3:20 PMapply
or all
mammoth-art-6111
03/16/2022, 3:10 PMrefined-terabyte-65361
03/17/2022, 7:56 PMError: code: 255
stdout:
stderr: error: could not create stack: the stack is currently locked by 1 lock(s). Either wait for the other process(es) to end or manually delete the lock file(s).
how to fix this ?
Thanksorange-kite-80991
03/22/2022, 5:39 PMancient-eve-13947
03/23/2022, 2:38 PMerror: Error serializing '() => provider': index.js(28,47)
'() => provider': index.js(28,47): captured
variable 'provider' which indirectly referenced
function 'Provider': configuration.ts(21,0): which referenced
function 'send': configuration.ts(60,8): which could not be serialized because
Unexpected missing variable in closure environment: fetch
breezy-bear-50708
03/24/2022, 4:31 PM{
"name": "extended-test",
"main": "src/index.ts",
"devDependencies": {
"@google-cloud/container": "^2.6.0",
"@google-cloud/resource-manager": "^3.0.0",
"@kubernetes/client-node": "^0.16.3",
"@types/chai": "^4.3.0",
"@types/k6": "^0.36.0",
"@types/mocha": "^9.1.0",
"@types/node": "^16.11.25",
"chai": "^4.3.6",
"mocha": "^9.2.1",
"node-fetch": "^2.6.7"
},
"dependencies": {
"@js-joda/core": "^5.2.0",
"@pulumi/gcp": "^6.12.0",
"@pulumi/kubernetes": "^3.16.0",
"@pulumi/pulumi": "^3.26.1",
"@pulumi/random": "^4.3.1",
"@types/promise-poller": "^1.7.1",
"promise-poller": "^1.9.1",
"typescript": "~3.8.3"
},
"scripts": {
"lint": "eslint --fix **/*.ts",
"check": "eslint **/*.ts",
"test": "mocha -r ts-node/register tests/**/*.ts"
}
}
tsconfig:
{
"extends": "../tsconfig.base",
"compilerOptions": {
"outDir": "dist",
"sourceMap": true
},
"include": [
"src/**/*",
"tests/**/*"
],
"references": [
{
"path": "../tslib"
}
]
}
example stack trace, line numbers are off by around ~150
TypeError: Cannot read properties of undefined (reading 'name')
at new PerformancePipeline (/home/james/redacted/extended-test/src/PerformancePipeline.ts:344:68)
at Object.<anonymous> (/home/james/redacted/extended-test/src/index.ts:16:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Module.m._compile (/home/james/redacted/extended-test/node_modules/.pnpm/ts-node@7.0.1/node_modules/ts-node/src/index.ts:439:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Object.require.extensions.<computed> [as .ts] (/home/james/redacted/extended-test/node_modules/.pnpm/ts-node@7.0.1/node_modules/ts-node/src/index.ts:442:12)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
bitter-psychiatrist-55958
04/03/2022, 6:18 PMaws.ec2.NetworkInterface
. The VPC is defined as:
const vpc = new awsx.ec2.Vpc("culex-vpc", {
cidrBlock: "10.50.0.0/16",
numberOfAvailabilityZones: 1, // defaults to 2, but for a lab 1 is good enuf
subnets: [
{ type: "public", location: "10.50.20.0/24", tags },
{ type: "private", location: "10.50.30.0/24", tags }
],
tags
});
How would I get the private subnet to use in the subnetId
property in aws.ec2.NetworkInterface
?
I tried using subnetId: vpc.id.apply(async () => vpc.privateSubnetsIds),
as seen above here, but have issues with it being the wrong type for subnetId
.nutritious-battery-42762
04/04/2022, 1:56 PMconst cluster = new awsx.ecs.Cluster("custom", {
cluster: aws.ecs.Cluster.get("payup-" + env, databaseStack.getOutput("ECS_CLUSTER_NAME")),
});
This is where it hangs
Type Name Status
pulumi:pulumi:Stack application-dev
- └─ aws:ec2:SecurityGroup custom deleting.
nutritious-battery-42762
04/04/2022, 2:23 PMType Name Status Info
pulumi:pulumi:Stack application-dev **failed** 1 error
- └─ aws:ec2:SecurityGroup custom **deleting failed** 1 error
Diagnostics:
aws:ec2:SecurityGroup (custom):
error: deleting urn:pulumi:dev::application::awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup$aws:ec2/securityGroup:SecurityGroup::custom: 1 error occurred:
* Error deleting security group: DependencyViolation: resource sg-0519c8bd76b8feab6 has a dependent object
status code: 400, request id: b323e056-8b51-4fcb-a8ac-b6afd48fef91
nutritious-battery-42762
04/04/2022, 2:24 PMrhythmic-whale-48997
04/05/2022, 8:14 AMapply
but I'm getting errors
TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object
at Object.writeFileSync (node:fs:2163:5)
Code:
cluster.kubeconfig.apply(v => {
fs.writeFileSync("../test", v);
});
witty-park-12681
04/05/2022, 4:04 PMconst modelBucket = new aws.s3.Bucket(this.modelBucketName, modelBucketConfig, {
parent: this,
protect: true
})
const p0 = this.createQueue(pipelineName, 0, modelBucket)
let modelNotificationName = `${pipelineName}-modelNotification-${ENV_LOWER}`;
new aws.s3.BucketNotification(modelNotificationName, {
bucket: modelBucket.id,
queues: [{
events: ["s3:ObjectCreated:*"],
filterSuffix: "model.tar.gz",
queueArn: p0.arn,
}],
}, {
dependsOn: [modelBucket, p0],
parent: this
})
/**
* Create an SQS queue
*
* @param name
* @param priority
* @param bucket
*/
private createQueue(name: string, priority: number, bucket: aws.s3.Bucket) {
let queueName = `p${priority}-${name}-queue-${ENV_LOWER}`
const queue = new aws.sqs.Queue(queueName,
{visibilityTimeoutSeconds: 120},
{ dependsOn: bucket, parent: this } // specify resource parent
)
new aws.sqs.QueuePolicy(`p${priority}-${name}-S3Events-${ENV_LOWER}`, {
policy: pulumi.interpolate`{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "sqs:SendMessage",
"Resource": "${queue.arn}",
"Condition": {
"ArnEquals": { "aws:SourceArn": "${bucket.arn}" }
}
}
]
}`,
queueUrl: queue.url,
},
{ dependsOn: [bucket, queue],
parent: this })
return queue
}
The error I get is the following
error: 1 error occurred:
* error putting S3 Bucket Notification Configuration: InvalidArgument: Unable to validate the following destination configurations
status code: 400, request id: NZSHGJTE4XD0SFHA, host id: a+VHT+tq6Fj91OMR29gdfmvHxUbsCR8KpAsD/NNQiYQoxz03Z2hZgDlS6ibC/2PCCFDHLwwudH0=
Can anyone shed light on why this might be failing. I'm trying to create a bucket, and SQS queue, with a queue notification when a file gets created in the bucket.proud-cricket-86351
04/10/2022, 7:33 PMproud-cricket-86351
04/10/2022, 7:33 PMquiet-tomato-48326
04/11/2022, 7:17 AMpulumi.dynamic.Resource
subclass while calling superquiet-tomato-48326
04/12/2022, 9:25 AMpulumi about
and the output of -v=9 --logtostderr
)
any help would be appreciated, I’m kinda stumped on how to troubleshoot this one without any error messages 😕proud-cricket-86351
04/13/2022, 8:03 PMbusy-journalist-6936
04/15/2022, 6:48 PMOutput<string>
and string
.
In this case, I want to do:
const name: string = pulumi.concat(["kc2-", stack]);
But obviously that does not work due to error:
Type 'Output<string>' is not assignable to type 'string'.
How do I remediate this?busy-journalist-6936
04/15/2022, 6:56 PMimport * as k from "@pulumi/kubernetes";
const stack = pulumi.getStack();
const name: string = pulumi.concat(["kc2-", stack]);
const ns = new k.core.v1.Namespace(name, {
metadata: {
name: name,
},
}, {
provider: kubevirt,
});
miniature-musician-31262
04/15/2022, 7:02 PMconcat
returns an Output<string>
— but I’m not sure you need that, as both values are strings — does this work?
const name: string = `kc2-${stack}`;
rough-window-15889
04/25/2022, 9:21 PMpurple-train-14007
04/26/2022, 5:59 PMrough-window-15889
04/28/2022, 9:26 PMproud-cricket-86351
04/29/2022, 3:13 PMrough-window-15889
04/30/2022, 2:50 PMbroad-gold-44713
04/30/2022, 10:59 PMwonderful-bird-78843
05/01/2022, 6:59 PMconst requestsSns = new aws.sns.Topic("mcurl-sns-requests");
const mcurlHandler = new aws.lambda.CallbackFunction("mcurl-handler", {
callback: async (ev, ctx) => {
const snsClient = new SNSClient({ region: region });
var msg = {}
var msgString = JSON.stringify(msg);
var params = {
Message: msgString,
TopicArn: requestsSns.arn, <--------
};
try {
adamant-dress-73325
05/02/2022, 8:14 PMwonderful-bird-78843
05/02/2022, 11:03 PMimport { promisify } from "util";
import { execFile as execFileReal } from 'child_process';
const execFile = promisify(execFileReal);
and then in a sns Topic.onEvent()
I'm doing:
try {
const { stdout } = await execFile('curl', args);
console.log("stdout:", stdout);
msg.Response = stdout;
}
On up
, I'm getting:
Diagnostics:
pulumi:pulumi:Stack (mcurl-typescript-mcurl):
error: Error serializing '(ev, ctx) => __awaiter(this, void 0, ...': index.ts(137,57)
'(ev, ctx) => __awaiter(this, void 0, ...': index.ts(137,57): captured
'execFile', a function defined at
'(...args) => { const { promise, reso ...': node:child_process(231,9): which captured
'orig', a function defined at
function 'execFile': node:child_process(278,17): which captured
'ArrayIsArray', a function defined at
function 'isArray': which could not be serialized because
it was a native code function.
purple-shampoo-2675
05/03/2022, 3:08 PMawsx
to deploy EC2-backed ECS services (not Fargate_)_ and having trouble setting them up with proper capacity providers. They have an ASG (via cluster.createAutoScalingGroup(...)
) but by default the group doesn't scale for new deploys. I thought the answer might be to create an explicit aws.ecs.CapacityProvider
which will respond to task placement failures by provisioning new instances, but there seems to be a circular dependency between the different elements like so:
• awsx.ecs.Cluster
takes a capacityProviders
array on creation, but
• aws.ecs.CapacityProvider
needs the ARN of an autoscalingGroup
, but
• the autoscalingGroup
is created via cluster.createAutoScalingGroup(...)
which is not available until after the cluster is created.
I hope that's enough context! I can provide more code if that would be useful. Basically where I want to get to is an ASG with n
instances in, where every time a pulumi up
happens the group scales up to 2n
instances to place new tasks, then scales back down to n
instances, getting rid of the old ones. Right now pulumi up
completes successfully but new tasks don't happen unless I specify the ASG should be permanently twice as big as it needs to be.