09/28/2022, 11:36 AM
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 '' file with the above code - added the following line to Pulumi.<stackname>.yaml: aws😛rofile: 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)


09/28/2022, 9:32 PM
Hey Ilian, sometimes pulumi stacks run in a virtual environment, check your pulumi.yaml file to see if it’s been defined in there. maybe you installed the package locally but the package isn’t in the virtual environment leading to this error


09/29/2022, 7:26 AM
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