Hey there, I'm struggling getting pulumi to work o...
# getting-started
i
Hey there, I'm struggling getting pulumi to work on my Apple MacBook Pro M1.. For some reason I keep getting this error when I do
pulumi preview --debug
:
Copy code
pulumi:pulumi:Stack (stayko/monitorize-crud-api/prod)
    Found typescript version 5.6.3 at /Users/staykopersonal/projects/monitorize-api/pulumi/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/typescript.js
    Using vendored ts-node@7.0.1
    Registering resource: t=pulumi:pulumi:Stack, name=monitorize-crud-api-prod, custom=false, remote=false
    RegisterResource RPC prepared: t=pulumi:pulumi:Stack, name=monitorize-crud-api-prod
    RegisterResource RPC finished: resource:monitorize-crud-api-prod[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:prod::monitorize-crud-api::pulumi:pulumi:Stack::monitorize-crud-api-prod,,,,
    Running program '/Users/staykopersonal/projects/monitorize-api/pulumi' in pwd '/Users/staykopersonal/projects/monitorize-api/pulumi' w/ args: 
    Registering resource: t=aws:ec2/vpc:Vpc, name=monitorizeVpc, custom=true, remote=false
    Registering resource: t=aws:ec2/subnet:Subnet, name=monitorizePrivateSubnet, custom=true, remote=false
    Registering resource: t=aws:ec2/securityGroup:SecurityGroup, name=monitorizeRdsSecurityGroup, custom=true, remote=false
    Registering resource: t=aws:rds/subnetGroup:SubnetGroup, name=monitorizeDbSubnetGroup, custom=true, remote=false
    Registering resource: t=aws:rds/instance:Instance, name=crudApiDb, custom=true, remote=false
    Registering resource: t=aws:iam/role:Role, name=CrudApiLambdaExecutionRole, custom=true, remote=false
    Registering resource: t=aws:iam/rolePolicyAttachment:RolePolicyAttachment, name=lambdaExecutionPolicy, custom=true, remote=false
    Registering resource: t=aws:lambda/function:Function, name=crudApiLambda, custom=true, remote=false
    RegisterResource RPC prepared: t=aws:iam/role:Role, name=CrudApiLambdaExecutionRole
    RegisterResource RPC prepared: t=aws:ec2/vpc:Vpc, name=monitorizeVpc
    assertion failed [arm_interval().contains(address)]: code fragment does not contain the given arm address
    (CodeFragmentMetadata.cpp:48 instruction_extents_for_arm_address)
I tried installation with brew and a manual one but still the same thing.. Any ideas why it keeps failing?
c
Can you please run
pulumi about
and share the details here? I suspect you have a non-arm64 version of the CLI installed. (Please go through the output of
pulumi about
and remove any sensitive details from it before posting here.)
q
I've seen this before. This is an error from Apple's x86 binary translator (Rosetta2):
Copy code
assertion failed [arm_interval().contains(address)]: code fragment does not contain the given arm address
    (CodeFragmentMetadata.cpp:48 instruction_extents_for_arm_address)
Can you check whether you've installed an arm64 version of pulumi?
file "$(which pulumi)"
I've seen this caused by homebrew being installed in x86_64 mode. You can check this with
brew config
If that's the case, you can switch to the arm64 version by following those instructions here: https://github.com/orgs/Homebrew/discussions/545#discussioncomment-540891 It's also worth deleting all pulumi plugins
rm -rf ~/.pulumi/plugins
to clear the caches and ensure the correct architecture gets downloaded now.