Hello guys, I am really struggling with pulumi, I ...
# general
a
Hello guys, I am really struggling with pulumi, I have a bug that I don't know how to navigate. I will really appreciate all the help I can get
p
I had similar error, but I'm a bit confused in what You pasted. Why is there an info about deleting resource.? However, I had similar error to the one that You pasted:
Copy code
* waiting for Elastic Beanstalk Environment (e-623zw4uwmp) update: couldn't find resource (21 retries)
in this case, there was a missing thing to configure, I think it was instanceProfile, but the way to investigate this is to check in AWS console and see there. AWS beanstalk should write errors that ocured during creation. Maybe this will help In my case (typescript) I think I had to configure:
Copy code
const env = new aws.elasticbeanstalk.Environment("testEnt", {
    application: app.name,
    solutionStackName: "64bit Amazon Linux 2023 v4.0.2 running PHP 8.1",
    settings: [
        {
            namespace: "aws:autoscaling:launchconfiguration",
            name: "IamInstanceProfile",
            value: instanceProfile.name,
        },
        {
            namespace: "aws:autoscaling:launchconfiguration",
            name: "EC2KeyName",
            value: keyPair.keyName,
        },
    ],
    tags: tags,
});
a
My bad, I copied the deletion one but I get the same response when I try to create using pulumi up
@purple-printer-9748
there are no errors on aws so I am wondering what's going on
p
strange ... basically your error tells, that there was something wrong when creating resource in AWS. I am not an expert, but the way I understand how this goes is a bit like this: So pulumi sends creation request It is processed by AWS. Pulumi awaits result by quering resource existance. In case it is not there after X retries (21 I think in your snippet) than it considers resource was not created...
a
Absolutely!
p
So for me, errors were clear, and I found them in here:
a
Copy code
This is my Elasticbeanstalk dashboard. Nothing is being created
Can someone help me confirm pls?
I can share the code so you run it from your end and see what the outcome will be
p
dashboard looks like this, but on the left you should see the menu with apps and envs, it is prettty confusing
image.png
a
image.png
p
ok, sorry for pointing obvious 😞
a
No probs, I appreciate the help so far
Can I share the code with you so try on your end for me pls
p
I don't think I will quickly run it, I don't have python locally and easilly set up
a
I would later share the infrastructure as a blog post to contribute to the knowledge out there
p
have you tried to run with --debug and --diff to give more verbosity to the action?
a
pulumi up -y --logtostderr -v=9 2> out.txt
I am using this to output the log to a file but there's nothing much
p
I tihnk -v was not good for me recently and --debug actually behaved better
a
Oh great
--debug gives more info
Copy code
debug: resource registration successful: ty=aws:ec2/securityGroup:SecurityGroup, urn=urn:pulumi:dev::infrastructure-aws::aws:ec2/securityGroup:SecurityGroup::vpc-to-rds
    debug: resource registration prepared: ty=aws:rds/instance:Instance, name=rds-instance

    panic: interface conversion: interface {} is nil, not map[string]interface {}
    goroutine 101 [running]:
    <http://github.com/hashicorp/go-cty/cty.Value.GetAttr({{{0xfbaa7a0|github.com/hashicorp/go-cty/cty.Value.GetAttr({{{0xfbaa7a0>?, 0xc00a679710?}}, {0x0?, 0x0?}}, {0xe5c1db9, 0x8})
        /home/runner/go/pkg/mod/github.com/hashicorp/go-cty@v1.4.1-0.20200723130312-85980079f637/cty/value_ops.go:711 +0x2de
    <http://github.com/hashicorp/terraform-provider-aws/internal/provider.tagsResourceInterceptor.run({0xc0007dc580|github.com/hashicorp/terraform-provider-aws/internal/provider.tagsResourceInterceptor.run({0xc0007dc580>?, 0xe8b8ea8?, 0xe8b8ea0?}, {0xfbaa2c0, 0xc00a796180}, {0xfbbb2b0, 0xc00a788100}, {0xe555640?, 0xc003da43c0?}, 0x1, ...)
        /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/provider/intercept.go:250 +0x143a
    <http://github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Update.interceptedHandler[...].func10(0xca5e580|github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Update.interceptedHandler[...].func10(0xca5e580>?, {0xe555640?, 0xc003da43c0?})
        /home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/provider/intercept.go:100 +0x169
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xfbaa3a0|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xfbaa3a0>?, {0xfbaa3a0?, 0x1a946400?}, 0xd?, {0xe555640?, 0xc003da43c0?})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20230912190043-e6d96b3b8f7e/helper/schema/resource.go:812 +0x7a
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000eacc40|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000eacc40>, {0xfbaa3a0, 0x1a946400}, 0xc007ac20d0, 0xc009ab1f00, {0xe555640, 0xc003da43c0})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20230912190043-e6d96b3b8f7e/helper/schema/resource.go:924 +0x83a
    <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0xc000d722a0|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0xc000d722a0>?, {0xc0000f4660?, 0x0?, 0xc0019714c8?}}, {0xe61c4bb, 0x12}, {0xfbaa7d8?, 0xc00a60de78}, {0xfbbadd8, 0xc009ab1f00})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.63.2/pkg/tfshim/sdk-v2/provider.go:100 +0x165
    <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc0002a4000|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc0002a4000>, {0xfbaa2c0?, 0xc00a62be90?}, 0xc00a5ac5a0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.63.2/pkg/tfbridge/provider.go:975 +0x8ac
    <http://github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Update.func1({0xfbdbdf8|github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Update.func1({0xfbdbdf8>?, 0xc0002a4000?})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7-0.20230801203955-5d215c892096/muxer.go:356 +0x33
    <http://github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0xc001b6e7d0|github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0xc001b6e7d0>?, 0x40, 0xc009a8f778?)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7-0.20230801203955-5d215c892096/muxer.go:303 +0xb5
    <http://github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Update(0x0|github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Update(0x0>?, {0xfbaa2c0?, 0xc00a62be90?}, 0x40?)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7-0.20230801203955-5d215c892096/muxer.go:355 +0x65
    <http://github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler.func1({0xfbaa2c0|github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler.func1({0xfbaa2c0>, 0xc00a62be90}, {0xe15c1e0?, 0xc00a5ac5a0})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.91.1/proto/go/provider_grpc.pb.go:629 +0x75
    <http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0xfbaa2c0|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0xfbaa2c0>, 0xc00a62b920}, {0xe15c1e0, 0xc00a5ac5a0}, 0xc00a60f8c0, 0xc00a60ddb8)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x3d0
    <http://github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler({0xe3d7b20|github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler({0xe3d7b20>?, 0xc001b6e7d0}, {0xfbaa2c0, 0xc00a62b920}, 0xc00a611810, 0xc00158abe0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.91.1/proto/go/provider_grpc.pb.go:631 +0x135
    <http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0004dc3c0|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0004dc3c0>, {0xfbbd1e0, 0xc007652680}, 0xc00a38d560, 0xc0099d58f0, 0x1a8f84d0, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:1376 +0xde7
    <http://google.golang.org/grpc.(*Server).handleStream(0xc0004dc3c0|google.golang.org/grpc.(*Server).handleStream(0xc0004dc3c0>, {0xfbbd1e0, 0xc007652680}, 0xc00a38d560, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:1753 +0x9e7
    <http://google.golang.org/grpc.(*Server).serveStreams.func1.1()|google.golang.org/grpc.(*Server).serveStreams.func1.1()>
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:998 +0x8d
    created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1> in goroutine 57
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:996 +0x165

  aws:ec2:DefaultSubnet (default-az-3):
    error: error reading from server: EOF

  aws:ec2:DefaultSubnet (default-az-2):
    error: connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:45799: connect: connection refused"

  aws:rds:Instance (rds-instance):
    error: connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:45799: connect: connection refused"
can you help me make sense of this pls
when I change to us-west region, it runs fine but us-east gives this error
I am still getting the same old error could not find resource 21 tries
I am doing a workshop on Friday. I considering switching to Ec2
p
sadly I'm out of ideas, it seems more AWS related, maybe googleing those errors for start. But it seems some networking problems