This message was deleted.
# aws
s
This message was deleted.
b
@sparse-state-34229 just to be clear, you have a Pulumi program with the Pulumi SDK and you're also using the
aws-sdk-go
inside the program?
can you share your code?
s
i’m running the pulumi command
it’s run in a container
let me see what i can paste
this is from running
pdm run pulumi preview -C <project_dir> -s <stack> --diff
in github actions
b
i need the actual code in your Pulumi program
try setting the config value:
Copy code
pulumi config set aws:skipMetadataApiCheck false
in your pulumi program
s
its uhh almost 5k loc haha
i’ll try that
b
or set the env var:
AWS_EC2_METADATA_DISABLED=false
s
that seems to have worked
👍 1
thank you!
what confuses me is that this isn’t an issue with terraform and it wasn’t with pulumi in the past
hmm still doesn’t work in a container, tho
can curl IMDS
b
@sparse-state-34229 you're using the aws SDK there, and need to make sure you have creds for it
s
It's on an ec2 instance with an attached role
Permissions are not an issue; the same host runs terraform with no issues
running Pulumi on the host works, then it doesn’t: https://gist.github.com/ohlol/9c8d0484c2403ea8afcab71c92bcd4bc
the gists previous to this are from it erroring on the same stack as the first
preview
run in this output just linked
[urn=urn:pulumi:main::account::pulumi:pulumi:Stack::account-main]
that one
EC2RoleRequestError: no EC2 instance role found
but, as previously shown, there is a role attached to the instance
and I am able to query it