The very last instruction to run on the "Understanding Stack Outputs" page is pulumi up, in order to see the difference between the dev and the staging stacks.
Now, if you run pulumi up while in the staging stack, we should see that the frontend port is now set to 3002:
However, at this point, the dev stack is "up". When running pulumi up on the staging stack, I get this plan:
Applying it result in an error when creating the mongoContainer since the port 27017 is already allocated.
Diagnostics:
docker:index:Container (mongoContainer):
error: 1 error occurred:
* creating urn:pulumi:staging::my_first_app::docker:index/container:Container::mongoContainer: 1 error occurred:
* Unable to start container: Error response from daemon: driver failed programming external connectivity on endpoint mongo-staging (148d4ec22fc40525a0bbcd2ebd54b27d7f09d6ec678280dbf9ced6c05e1417ff): Bind for 0.0.0.0:27017 failed: port is already allocated
pulumi:pulumi:Stack (my_first_app-staging):
error: update failed
I am just starting with Pulumi, maybe I have not fully grasped all the concepts.
However, I think that there is a missing instruction pulumi stack select dev && pulumi destroy && pulumi stack select staging before running pulumi up to remove resources of the dev stack before creating those of the staging stack.
This method is a little bit annoying since the docker images are removed to be pulled again in the pulumi up, but a least I'm able to "up" the staging stack.
The very last instruction to run on the "Understanding Stack Outputs" page is
pulumi up
, in order to see the difference between thedev
and thestaging
stacks.However, at this point, the
dev
stack is "up". When runningpulumi up
on thestaging
stack, I get this plan:Applying it result in an error when creating the
mongoContainer
since the port27017
is already allocated.I am just starting with Pulumi, maybe I have not fully grasped all the concepts.
However, I think that there is a missing instruction
pulumi stack select dev && pulumi destroy && pulumi stack select staging
before runningpulumi up
to remove resources of thedev
stack before creating those of thestaging
stack.This method is a little bit annoying since the docker images are removed to be pulled again in the
pulumi up
, but a least I'm able to "up" thestaging
stack.