alert-pillow-96521
03/03/2021, 10:59 AMCapabilities = { new AccountCapabilityArgs { Name = "EnableServerless" } }
, however the deployment fails on expected capabilities.0.name to be one of [EnableAggregationPipeline EnableCassandra EnableGremlin EnableTable EnableMongo MongoDBv3.4 mongoEnableDocLevelTTL], got EnableServerless
I have found it could be related to old Terraform version. Is possible to upgrade Pulumi task somehow? or I need to wait for new version? in the Devops pipeline it is enabled via "Pulumi Azure Pipelines Task" I have seen this preview already cosmos serverless , but that was using Pulumi with TypeScript.breezy-apartment-46543
03/03/2021, 2:55 PMagreeable-ram-97887
03/03/2021, 3:01 PMtall-shoe-66375
03/03/2021, 4:09 PMmodern-dress-7144
03/03/2021, 7:38 PMstocky-student-96739
03/03/2021, 10:53 PMstocky-student-96739
03/03/2021, 10:53 PMbreezy-apartment-46543
03/04/2021, 12:07 AMconst fn = new aws.lambda.Function('InfraLambda', {
code: new pulumi.asset.AssetArchive({
'__index.js': new pulumi.asset.FileAsset('./handler.js'),
}),
handler: '__index.fnInfra',
runtime: aws.lambda.NodeJS12dXRuntime,
role: role.arn,
tracingConfig: {
mode: 'Active', // Enable X-ray
},
});
The handler.js file have require(‘@pulumi/pulumi’) and require(‘@pulumi/aws’) at the top and is using some classes from those packages. When deploying the app and then calling the apigateway for the lambda, ‘internal server error’ occurs and cloudwatch logs ’Error: Cannot find module ‘@pulumi/pulumi’' etc. How can I solve this problem, it looks like pulumi only respects dependencies declared in index.js and not the ones in handler.jsbrash-airline-37413
03/04/2021, 2:02 AMpulumi:providers:aws (default_3_31_0):
error: no resource plugin 'aws-v3.31.0' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource aws v3.31.0`
I’ve confirmed my gopath with go env
and I get the same thing when renaming the artifact to aws-v3.31.0 and verbose logs say nothing additional.
Is there something special I need to do in order for pulumi to pick up a locally compiled version of pulumi-aws?clever-cartoon-41433
03/04/2021, 5:10 AMbe me
install loft helm chart
after installation, every update brings errors where pulumi tries to create CRD resources that already exist
try removing loft from index.ts so that I can just manually install it via helm myself
the removal of the chart also breaks my stack, as now the namespace is stuck in a perpetually terminating state
clever-lawyer-94920
03/04/2021, 5:46 AMelegant-island-39916
03/04/2021, 10:08 AMResourceOptions(provider=eks_provider, ignore_changes=["provider"])
miniature-leather-70472
03/04/2021, 11:15 AMbrash-kite-78002
03/04/2021, 12:18 PMtall-shoe-66375
03/04/2021, 5:52 PMcolossal-australia-65039
03/04/2021, 7:54 PMaws:region
from my Pulumi config file and instead have it as a provider in code so I have fewer dependencies on the config file. But this is causing every resource to be recreated even though it's ultimately being applied to the same cloud environment. Is there no way around this?clever-cartoon-41433
03/05/2021, 6:15 AMchilly-analyst-14900
03/05/2021, 8:02 AMdamp-school-17708
03/05/2021, 10:12 AMtall-shoe-66375
03/05/2021, 1:50 PMDiagnostics:
digitalocean:index:Firewall (doroplets-webmago-firewall):
error: transport is closing
pulumi:pulumi:Stack (digitalocean-ts-droplets-dev):
panic: interface conversion: interface {} is string, not int
goroutine 13 [running]:
<http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.SerializeValueForHash(0xc000561100|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.SerializeValueForHash(0xc000561100>, 0x148c740, 0x1927410, 0xc0006cb900)
/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/serialize.go:24 +0x959
<http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.HashSchema.func1(0x148c740|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.HashSchema.func1(0x148c740>, 0x1927410, 0xc0008feec0)
/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/set.go:43 +0x68
<http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfshim/sdk-v2.v2Schema.SetHash(0xc0006cba40|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfshim/sdk-v2.v2Schema.SetHash(0xc0006cba40>, 0x148c740, 0x1927410, 0x0)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.19.0/pkg/tfshim/sdk-v2/schema.go:176 +0x62
<http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.visitPropertyValue(0xc000a729a4|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.visitPropertyValue(0xc000a729a4>, 0xb, 0xc000b693e0, 0xa, 0x146d820, 0xc00069e040, 0x198e3a0, 0xc0006cba40, 0x0, 0xc0006cba00, ...)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.19.0/pkg/tfbridge/diff.go:114 +0x486
<http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.doIgnoreChanges(0x19800a0|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.doIgnoreChanges(0x19800a0>, 0xc0004e9650, 0xc00057bec0, 0xc000397e90, 0xc0006f8cf0, 0x0, 0x0, 0x0, 0x19845a0, 0xc000792220)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.19.0/pkg/tfbridge/diff.go:259 +0x4e5
<http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Diff(0xc00000a1e0|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Diff(0xc00000a1e0>, 0x19765c0, 0xc000397d70, 0xc0002da000, 0xc00000a1e0, 0x1520001, 0xc000953e40)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.19.0/pkg/tfbridge/provider.go:689 +0x785
<http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Diff_Handler.func1(0x19765c0|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Diff_Handler.func1(0x19765c0>, 0xc000397d70, 0x1678e80, 0xc0002da000, 0x1687960, 0x22d3870, 0x19765c0, 0xc000397d70)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.20.1-0.20210212181059-f4b0fa86fedc/proto/go/provider.pb.go:2251 +0x89
<http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x19765c0|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x19765c0>, 0xc000396600, 0x1678e80, 0xc0002da000, 0xc000b57de0, 0xc000b57e00, 0x0, 0x0, 0x1950560, 0xc00036de90)
/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x2f6
<http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Diff_Handler(0x16c0c20|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Diff_Handler(0x16c0c20>, 0xc00000a1e0, 0x19765c0, 0xc000396600, 0xc000600e40, 0xc0007085c0, 0x19765c0, 0xc000396600, 0xc000950a80, 0x9d6)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.20.1-0.20210212181059-f4b0fa86fedc/proto/go/provider.pb.go:2253 +0x150
<http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003321c0|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003321c0>, 0x1984d80, 0xc00008a780, 0xc0009a8800, 0xc0006dab40, 0x2290410, 0x0, 0x0, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1194 +0x522
<http://google.golang.org/grpc.(*Server).handleStream(0xc0003321c0|google.golang.org/grpc.(*Server).handleStream(0xc0003321c0>, 0x1984d80, 0xc00008a780, 0xc0009a8800, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1517 +0xd05
<http://google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0001262c0|google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0001262c0>, 0xc0003321c0, 0x1984d80, 0xc00008a780, 0xc0009a8800)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:859 +0xa5
created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1>
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd
helpful-van-82564
03/05/2021, 2:17 PMcolossal-australia-65039
03/05/2021, 5:10 PMPULUMI_CONFIG_PASSPHRASE
(I'm using S3 to store state)shy-oxygen-8874
03/05/2021, 5:26 PMpurple-jelly-68780
03/05/2021, 6:30 PMPulumi.stackname.yaml
file is meant to be committed to git? This might be a matter of personal choice but I wanted to hear if there's any kind of best practice. Especially if it has values like:
config:
aws:region: us-west-2
health-directory:bastionPublicKey:
secure: <encryptedString>
health-directory:dbPassword:
secure: <encryptedString>
clever-cartoon-41433
03/05/2021, 8:10 PMclever-cartoon-41433
03/06/2021, 8:42 PMpurple-jelly-68780
03/06/2021, 11:59 PM.up()
from Automation API? I'm currently hacking my way through to try to do it myself but it sure would be nice if there was some out of the box way of doing this 😅gifted-dentist-89608
03/07/2021, 12:48 AM"Cannot find module '@pulumi/pulumi/metadata.js'"
in cloudwatch when I try to http request. But I have @pulumi/pulumi installed in my package.json.purple-processor-6610
03/07/2021, 5:14 AMinvalid reference format
clever-cartoon-41433
03/07/2021, 8:35 PMclever-cartoon-41433
03/07/2021, 8:35 PMbillowy-army-68599
03/07/2021, 8:45 PMclever-cartoon-41433
03/07/2021, 8:47 PMconst config = new loft.LoftKubeconfig("stack", {
spaceName: ns.metadata.name,
vclusterName: virKube.metadata.name,
}, {dependsOn: virKube})
return new k8s.Provider("loftK8s", {
kubeconfig: config.data,
cluster: config.clusterName,
context: config.ctx,
}, {dependsOn: config})
billowy-army-68599
03/07/2021, 8:50 PMconfig.data
is just a standard kubeconfig string?clever-cartoon-41433
03/07/2021, 8:50 PMbillowy-army-68599
03/07/2021, 8:51 PMbroad-dog-22463
03/07/2021, 8:53 PMclever-cartoon-41433
03/07/2021, 8:53 PMbroad-dog-22463
03/07/2021, 8:57 PMclever-cartoon-41433
03/07/2021, 8:58 PMimport * as pulumi from "@pulumi/pulumi";
import * as child_process from "child_process";
export interface LoftKubeconfigOptions {
spaceName: pulumi.Input<string> //Name of namespace where vcluster is located
vclusterName: pulumi.Input<string> //name of vcluster itself
}
interface LoftKubeconfigDynamicProviderInputs {
spaceName: string; //Name of namespace where vcluster is located
vclusterName: string //name of vcluster itself
}
class LoftKubeconfigResourceProvider implements pulumi.dynamic.ResourceProvider {
async create(inputs: LoftKubeconfigDynamicProviderInputs): Promise<pulumi.dynamic.CreateResult> {
return {
id: inputs.spaceName + "-" + inputs.vclusterName,
outs: {
data: child_process.execSync("loft use vcluster " + inputs.vclusterName + " --print --space " + inputs.spaceName + " --cluster loft-cluster --silent"),
...inputs
}
};
}
}
export class LoftKubeconfig extends pulumi.dynamic.Resource {
public readonly spaceName!: pulumi.Output<string> //Name of namespace where vcluster is located
public readonly vclusterName!: pulumi.Output<string> //name of vcluster itself
//Other outputs
public readonly data!: pulumi.Output<string> //kubeconfig yaml file
public readonly ctx!: pulumi.Output<string> //context in yaml file
public readonly clusterName!: pulumi.Output<string> //context in yaml file
constructor(name: string, args: LoftKubeconfigOptions, opts?: pulumi.CustomResourceOptions) {
super(new LoftKubeconfigResourceProvider(), `loft:vclusterKubeConfig:${name}`, args, pulumi.mergeOptions(opts || {}, {
additionalSecretOutputs: ["config"],
}));
}
}
import * as pulumi from "@pulumi/pulumi";
export interface LoftKubeconfigOptions {
vclusterName: pulumi.Input<string> //name of vcluster itself
}
interface LoftKubeconfigDynamicProviderInputs {
vclusterName: string //name of vcluster itself
}
interface LoftKubeconfigDynamicProviderOutputs extends LoftKubeconfigDynamicProviderInputs {
data: string
}
class LoftKubeconfigResourceProvider implements pulumi.dynamic.ResourceProvider {
async create(inputs: LoftKubeconfigDynamicProviderInputs): Promise<pulumi.dynamic.CreateResult> {
const data = await require('child_process').exec("loft use vcluster " + inputs.vclusterName + " --print --silent").toString('utf8')
const outs: LoftKubeconfigDynamicProviderOutputs = {
vclusterName: inputs.vclusterName,
data: data,
}
return {
id: inputs.vclusterName,
outs: outs
};
}
async read(id: string, props: LoftKubeconfigDynamicProviderOutputs): Promise<pulumi.dynamic.ReadResult> {
const data = await require('child_process').exec("loft use vcluster " + props.vclusterName + " --print --silent").toString('utf8')
props.data = data
return {
id: id,
props: props,
};
}
}
export class LoftKubeconfig extends pulumi.dynamic.Resource {
public readonly vclusterName!: pulumi.Output<string> //name of vcluster itself
public readonly data!: pulumi.Output<string> //kubeconfig yaml file
constructor(name: string, args: LoftKubeconfigOptions, opts?: pulumi.CustomResourceOptions) {
super(new LoftKubeconfigResourceProvider(), `loft:vclusterKubeConfig:${name}`, args, pulumi.mergeOptions(opts || {}, {
additionalSecretOutputs: ["data"],
}));
}
}
(index.ts):
...
const config12 = new loft.LoftKubeconfig("main12", {
vclusterName: virKube.metadata.name,
}, {dependsOn: virKube})
config12.data.apply(v => {
return v
}) //Crash happens here
...