hi, I'm a complete pulumi noob. my initial goal is...
# aws
b
hi, I'm a complete pulumi noob. my initial goal is to create just a vpc using a specific aws profile from my aws credentials file. I have so far: - created a new directory - run 'pulumi new' , and chosen aws-python - taken the following code from the 'setting up a new vpc' part of the pulumi getting started section of their website: import pulumi import pulumi_awsx as awsx vpc = awsx.ec2.Vpc("custom") pulumi.export("vpcId", vpc.vpc_id) pulumi.export("publicSubnetIds", vpc.public_subnet_ids) pulumi.export("privateSubnetIds", vpc.private_subnet_ids) - replaced the default code in the '__main__.py' file with the above code - added the following line to Pulumi.<stackname>.yaml: awsprofile dev-account When I try to run: 'pulumi up' I'm getting the error: ModuleNotFoundError: No module named 'pulumi_awsx' I then executed: 'pip install pulumi_awsx' This installed the module. When I tried to run 'pulumi up' again I experienced the same error What am I missing? (doing this on a windows machine btw)
s
From your Pulumi directory, do:
Copy code
source venv/bin/activate
pip list
And post the output.
Err not
source
, maybe. Whatever the Windows equivalent is for venv on Windows.
Also, please don't copy/paste your question in multiple channels. It's ok to share for reach, but this can lead to multiple folks responding to the same question and not seeing each others' responses. Thanks! If you want to share for reach, please paste a link instead of reposting the question's text in full.
Like this:
b
yes, in the end I found an article recommending to add it to the requirements.txt file and run: - python -m venv venv - venv\Scripts\pip install -r requirements.txt
will share message next time... this is the first time I've used this slack workspace and I wasn't sure which channel was most appropriate for the question....
thanks
s
No worries, and glad you got unstuck!