better-vegetable-87807
01/01/2024, 5:34 AM.getProvider
method to get the provider of the resource. I'd like to write a helper function that works over multiple region. That function needs to investigate the provider of the passed resource. I tried something like .getProvider("aws")
, but it always returns undefined
. What did I do wrong? Do we have any docs about getProvider
method?great-sunset-355
01/03/2024, 12:41 PMaws.Provider
passed to the pulumi.dynamic.ResourceProvider
class EnableRAOrgSharingProvider implements pulumi.dynamic.ResourceProvider {
// Implement the necessary methods, in this case, we're only providing a simple 'create' operation.
public create: (inputs: pulumi.Inputs) => Promise<pulumi.dynamic.CreateResult>;
constructor(private readonly provider?: aws.Provider) {
this.create = async (inputs: EnableRAOrgSharingInputs) => {
const ec2Client = new ec2sdk.EC2Client({
region: inputs.awsProvider.region,
// TS2345: Argument of type [{ region: Output<Region | undefined>; }] is not assignable to parameter of type [] | [EC2ClientConfig]
Type [{ region: Output<Region | undefined>; }] is not assignable to type [EC2ClientConfig]
});
icy-controller-6092
01/07/2024, 3:59 AMicy-controller-6092
01/07/2024, 4:29 AMicy-controller-6092
01/07/2024, 4:44 AMtypescript: false
in Pulumi.yaml and then add your own loader via NODE_OPTIONS="--loader xyz"
great-sunset-355
01/10/2024, 1:38 PMstatements: pulumi.Input<pulumi.Input<aws.iam.PolicyStatement>[]>;
during the creation of a Component resource and it looks like the only way to do so is to change the type to statements: pulumi.Input<aws.iam.PolicyStatement>[];
or statements: aws.iam.PolicyStatement[]
Is there anything I can do to keep the original type?great-sunset-355
01/11/2024, 3:47 PMPULUMI_DEBUG_PROMISE_LEAKS
-> this variable is not very helpful
The Pulumi runtime detected that 468 promises were still active
at the time that the process exited. There are a few ways that this can occur:
* Not using `await` or `.then` on a Promise returned from a Pulumi API
* Introducing a cyclic dependency between two Pulumi Resources
* A bug in the Pulumi Runtime
Leaving promises active is probably not what you want. If you are unsure about
why you are seeing this message, re-run your program with the `PULUMI_DEBUG_PROMISE_LEAKS`
environment variable. The Pulumi runtime will then print out additional
debug information about the leaked promises.
fast-vase-27755
01/12/2024, 5:08 PMfresh-spring-82225
01/25/2024, 7:46 PMpackage.json
. I just noticed that some of the pulumi sample templates do have an explicit dependency on typescript ^4.0.0. It looks like my existing projects have an implicit dependency, via @pulumi/pulumi
, on typescript 3.8.3.
Should I add an explicit typescript dependency? Would that let me use newer language features?gifted-balloon-26385
01/27/2024, 11:16 PMpulumi.Output
instead of passing it through pulumi.interpolate
. is there an eslint config out there or something that can prevent me from doing this footgunhappy-noon-67231
01/29/2024, 6:52 AMerror: Symbol.prototype [ @@toPrimitive ] requires that 'this' be a Symbol
I found this ticket: https://github.com/pulumi/pulumi/issues/6229
But the fixes mentioned in it does not seem to be applicable for me, since as soon as I create a new gRPC client, this error would appear, doe anyone else have experience this?ambitious-accountant-72089
01/29/2024, 2:35 PMhappy-noon-67231
01/29/2024, 6:38 PMgray-airplane-38353
01/30/2024, 2:00 AMerror: could not deserialize deployment: snapshot integrity failure; refusing to use it: resource urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer$aws:route53/record:Record::r53-resource-name dependency urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer$aws:lb/loadBalancer:LoadBalancer::lb-name refers to missing resource
I cannot simply rm
my stack as it's in use (and has been from some time).
Importing the resource that is claimed to be missing is also failing.worried-answer-92750
02/06/2024, 5:41 PM*Error*: Cannot find module 'pg'
on my lambda whenever I execute it. Could someone please help me out? I have tried adding lambda layers to upload the node_modules
directory but still not workingcuddly-jewelry-42389
02/07/2024, 9:15 AMpulumi up
?
Background: My code compiles fine when I run tsc in the project folder, but during pulumi up
I get compilation errors about a property:
index.ts(111,45): error TS2339: Property 'endpoints' does not exist on type 'Service'.
However, the property exists. The IDE shows no error as well as tsc
running without errors.prehistoric-fish-76119
02/08/2024, 11:35 AMhcloud
NetworkSubnet correct way linked to Network, looks like docs examples outdated (https://www.pulumi.com/registry/packages/hcloud/api-docs/networksubnet/):
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const mynet = new hcloud.Network("mynet", {ipRange: "10.0.0.0/8"});
const foonet = new hcloud.NetworkSubnet("foonet", {
networkId: mynet.id,
type: "cloud",
networkZone: "eu-central",
ipRange: "10.0.1.0/24",
});
Because Network network.id
is Output<string> and NetworkSubnet networkId is Input<number>.
The same situation in Go version.prehistoric-fish-76119
02/09/2024, 6:37 AMkubectl apply --server-side -f <https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml>
bitter-diamond-17281
02/09/2024, 7:14 AMprehistoric-fish-76119
02/09/2024, 11:10 AMhashedPassword
changed:
const traefikAuthSecret = new k8s.core.v1.Secret(
"traefik-auth",
{
metadata: {
name: `traefik-auth`,
namespace: traefikNamespace.metadata.name,
},
stringData: {
auth: `${httpUsername}:${hashedPassword}`,
},
},
{
ignoreChanges: ["data"],
}
);
gentle-application-59272
02/13/2024, 8:20 AMapply
on outputs
with a mediapackage.Channel
the output hlsIngests
is doing weird stuff. In the following code the type of ingsests
is meant to be ChannelHlsIngest[]
but instead I get something like this
{
4dabf18193072939515e22adb298388d: unknown; // i didn't check this
value: ChannelHlsIngest[]
}
channel.hlsIngests.apply((ingests) => ingests.map(...))
TypeError: ingests.map is not a function
https://www.pulumi.com/registry/packages/aws/api-docs/mediapackage/channel/#channelhlsingest
As far as i can tell this was working just fine ~ 2 months ago. I've had to 'fix' it by doing
.apply((ingests) => ((ingests as any).value as types.output.mediapackage.ChannelHlsIngest[]).map(...))
We haven't changed any package or pulumi versions since we last ran that, i don't think 😕fresh-spring-82225
02/20/2024, 8:15 PMimport * as fs from 'fs'
^^^^^^
SyntaxError: Cannot use import statement outside a module
Is there a trick I can use to get pulumi to import .ts files (with es6 module imports) from node_modules? I've tried fiddling with various tsconfig settings, but I haven't found one that works.cuddly-family-16114
02/27/2024, 4:04 PMValue () for parameter groupId is invalid.
I've got a simplified version of my code below. Can someone tell me what I'm missing? I've tried everything including vpcSecurityGroups
, securityGroupNames
, networkInterfaces:securityGroups
as well as doing getSecurityGroup requests instead.
const group1s = new aws.ec2.SecurityGroup("secgrp-1s", {
vpcId: defaultVpcId,
description: "Enable HTTPS access",
ingress: [{
protocol: "tcp",
fromPort: 443,
toPort: 443,
cidrBlocks: ["0.0.0.0/0"],
}],
egress: [{
protocol: "-1",
fromPort: 0,
toPort: 0,
cidrBlocks: ["0.0.0.0/0"],
}],
}, {dependsOn: [appVpc]})
const launchTemplate = new aws.ec2.LaunchTemplate("spot-lt", {
imageId: "ami-0f93c02efd1974b8b",
instanceType: instanceType ?? "t3.micro",
vpcSecurityGroupIds: [group1s.id],
}, {dependsOn: [group1s]})
const autoScalingGroup = new aws.autoscaling.Group("spot-asg", {
desiredCapacity: desiredCapacity ?? 1,
minSize: minSize ?? 1,
maxSize: maxSize ?? 1,
availabilityZones: ["us-east-1a", "us-east-1b"],
mixedInstancesPolicy:{
instancesDistribution: {
onDemandBaseCapacity: onDemandBaseCapacity ?? 1,
onDemandPercentageAboveBaseCapacity: onDemandPercentageAboveBaseCapacity ?? 0,
spotAllocationStrategy: "lowest-price",
},
launchTemplate: {
launchTemplateSpecification:{
launchTemplateId: launchTemplate.id,
},
},
},
}, {dependsOn: [launchTemplate, group1s]})
Going a little nuts figuring out what I missedblue-translator-21668
02/28/2024, 3:59 PMlittle-iron-62790
02/29/2024, 8:24 AMlate-piano-64593
03/07/2024, 4:54 PMcommand.local.Command
triggers to only rerun if I need to rebuild some source files.miniature-arm-21874
03/07/2024, 8:31 PMlate-piano-64593
03/11/2024, 5:56 PMaws.iam.PolicyDocument
move out of the exported API? I can't seem to find it in the aws.iam
module. version: "@pulumi/aws": "6.22.0",
little-rainbow-66576
03/12/2024, 5:20 PMType Name Plan Info
+ pulumi:pulumi:Stack dynamic-test-dev create 2 messages
└─ pulumi:providers:pulumi-nodejs default 1 error
Diagnostics:
pulumi:pulumi:Stack (dynamic-test-dev):
(node:3967888) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
pulumi:providers:pulumi-nodejs (default):
error: could not find latest version for provider pulumi-nodejs: 404 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-pulumi-nodejs/releases/latest>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
Any ideas?magnificent-apartment-79511
03/15/2024, 12:23 PMpulumi.export('name', value)
but not in typescript.