brainy-helmet-80249
10/06/2021, 8:33 PMpanic: interface conversion: interface {} is []interface {}, not *schema.Set
while deploying with GitHub actions?
Full diagnostics:
Diagnostics:
aws:lambda:Function (****-handler-lambda-function-dev):
error: transport is closing
aws:s3:BucketObject (****-handler-deployment-dev.zip):
error: transport is closing
pulumi:pulumi:Stack (****-dev):
error: update failed
panic: interface conversion: interface {} is []interface {}, not *schema.Set
goroutine 438 [running]:
<http://github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsLambdaFunctionUpdate(0xc001bf6480|github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsLambdaFunctionUpdate(0xc001bf6480>, 0x6d569e0, 0xc0015f6c00, 0x0, 0x0)
/home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-aws@v1.38.1-0.20211004122636-8966d24576a0/aws/resource_aws_lambda_function.go:1199 +0x522d
<http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xc000717110|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xc000717110>, 0x8963f18, 0xc00012c018, 0xc001bf6480, 0x6d569e0, 0xc0015f6c00, 0x0, 0x0, 0x0)
/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20210629210550-59d24255d71f/helper/schema/resource.go:342 +0x1ee
<http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000717110|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000717110>, 0x8963f18, 0xc00012c018, 0xc0023278f0, 0xc00139a4c0, 0x6d569e0, 0xc0015f6c00, 0x8, 0x10, 0x7fa1682565b8, ...)
/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20210629210550-59d24255d71f/helper/schema/resource.go:454 +0x390
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply(0xc00107a1e0|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply(0xc00107a1e0>, 0x7cc8d72, 0x13, 0x8964e68, 0xc002251340, 0x898b330, 0xc00139a4c0, 0x0, 0x898b330, 0xc00139a4c0, ...)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.8.2-0.20210930033847-5bba386a0e79/pkg/tfshim/sdk-v2/provider.go:112 +0x210
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc00000a3c0|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc00000a3c0>, 0x8963f88, 0xc001bc2630, 0xc001b0d380, 0xc00000a3c0, 0x6ca9101, 0xc002243080)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.8.2-0.20210930033847-5bba386a0e79/pkg/tfbridge/provider.go:1038 +0x9a3
<http://github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler.func1(0x8963f88|github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler.func1(0x8963f88>, 0xc001bc2630, 0x7a70020, 0xc001b0d380, 0x7a24600, 0xd580058, 0x8963f88, 0xc001bc2630)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.13.2/proto/go/provider.pb.go:2638 +0x8b
<http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x8963f88|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x8963f88>, 0xc001bc20c0, 0x7a70020, 0xc001b0d380, 0xc00132f1a0, 0xc001562c00, 0x0, 0x0, 0x8876e20, 0xc000400a70)
/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x30a
<http://github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler(0x7b63f20|github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler(0x7b63f20>, 0xc00000a3c0, 0x8963f88, 0xc001bc20c0, 0xc0010555c0, 0xc00145b800, 0x8963f88, 0xc001bc20c0, 0xc0009b4c00, 0xadc)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.13.2/proto/go/provider.pb.go:2640 +0x150
<http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003cb6c0|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003cb6c0>, 0x898bcf8, 0xc0015a6180, 0xc0024af440, 0xc0015316b0, 0xd53aa30, 0x0, 0x0, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:1217 +0x52b
<http://google.golang.org/grpc.(*Server).handleStream(0xc0003cb6c0|google.golang.org/grpc.(*Server).handleStream(0xc0003cb6c0>, 0x898bcf8, 0xc0015a6180, 0xc0024af440, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:1540 +0xd0c
<http://google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000ea8050|google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000ea8050>, 0xc0003cb6c0, 0x898bcf8, 0xc0015a6180, 0xc0024af440)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:878 +0xab
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.37.0/server.go:876 +0x1fd
pulumi up
as wellbillowy-army-68599
10/06/2021, 9:10 PMbrainy-helmet-80249
10/06/2021, 9:19 PMbillowy-army-68599
10/06/2021, 9:21 PMbrainy-helmet-80249
10/06/2021, 9:22 PMlittle-cartoon-10569
10/06/2021, 9:29 PMenvironment
and vpcConfig
args work. You've not provided a property name on the LHS. Is that a typescript feature, where it figures out the property name from the variable name? I've never seen it before.brainy-helmet-80249
10/06/2021, 10:04 PMinterface FunctionEnvironment {
/**
* Map of environment variables that are accessible from the function code during execution.
*/
variables?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
interface FunctionVpcConfig {
/**
* List of security group IDs associated with the Lambda function.
*/
securityGroupIds: pulumi.Input<pulumi.Input<string>[]>;
/**
* List of subnet IDs associated with the Lambda function.
*/
subnetIds: pulumi.Input<pulumi.Input<string>[]>;
vpcId?: pulumi.Input<string>;
}
little-cartoon-10569
10/06/2021, 10:34 PM...
handler: "index.handler",
environment,
vpcConfig,
});
I expect this:
...
handler: "index.handler",
environment: environment,
vpcConfig: vpcConfig,
});
brainy-helmet-80249
10/06/2021, 10:42 PMred-match-15116
10/06/2021, 10:54 PMbrainy-helmet-80249
10/06/2021, 11:34 PMred-match-15116
10/06/2021, 11:36 PM--logtostderr -v=9
https://www.pulumi.com/docs/troubleshooting/#verbose-loggingJSON.stringify
in that specific case because it has a PolicyDocument
type which means that it gets converted to json string under the hood.quick-apartment-308
10/06/2021, 11:42 PMred-match-15116
10/06/2021, 11:44 PMenough-leather-70274
10/08/2021, 5:50 AMI1008 15:53:58.673933 34391 rpc.go:74] Marshaling property for RPC[Provider[aws, 0xc0018d6c00].Update(<<redacted>>,urn:pulumi:dev::<<redacted>>::aws:ec2/securityGroup:SecurityGroup$aws:iam/role:Role$aws:lambda/function:Function::<<redacted>>).news]: subnetIds={[{<<redacted>>} {<<redacted>>}]}
I1008 15:53:58.680811 34391 eventsink.go:59] Locking "aws_lambda_function"
I1008 15:53:58.680826 34391 eventsink.go:62] eventSink::Debug(<{%reset%}>Locking "aws_lambda_function"<{%reset%}>)
I1008 15:53:58.681017 34391 eventsink.go:59] Locked "aws_lambda_function"
I1008 15:53:58.681029 34391 eventsink.go:62] eventSink::Debug(<{%reset%}>Locked "aws_lambda_function"<{%reset%}>)
I1008 15:53:58.681373 34391 eventsink.go:59] Unlocking "aws_lambda_function"
I1008 15:53:58.681386 34391 eventsink.go:62] eventSink::Debug(<{%reset%}>Unlocking "aws_lambda_function"<{%reset%}>)
I1008 15:53:58.681559 34391 eventsink.go:59] Unlocked "aws_lambda_function"
I1008 15:53:58.681568 34391 eventsink.go:62] eventSink::Debug(<{%reset%}>Unlocked "aws_lambda_function"<{%reset%}>)
I1008 15:53:58.681568 34391 eventsink.go:62] eventSink::Debug(<{%reset%}>Unlocked "aws_lambda_function"<{%reset%}>)
I1008 15:53:58.684201 34391 eventsink.go:78] eventSink::Infoerr(<{%reset%}>panic: interface conversion: interface {} is []interface {}, not *schema.Set
<<redacted>>
are our names/ ids)brainy-helmet-80249
10/08/2021, 6:12 AM*new* aws.lambda.Function
) and made sure to pass in a role's name (instead of the role) when defining RolePolicyAttachments. Those two steps got our build working again on 3.14.0.
new aws.iam.RolePolicyAttachment(
`${functionName}-lambda-execute-role-policy-attachment-${stack}`,
{
role: lambdaRole.name, // Pass in the name here, instead of lambdaRole
policyArn: aws.iam.ManagedPolicy.AWSLambdaExecute,
}
);
enough-leather-70274
10/08/2021, 6:17 AMbrave-planet-10645
10/08/2021, 7:56 AM4.22.2
(the latest) then try downgrading to `4.22.1`: https://github.com/pulumi/pulumi-aws/issues/1651