Instance Using Alicloud ECS
Basic example of an ecs instance
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set alicloud-ts-ecscd pulumi-examples/alicloud-ts-ecsThis example deploys a simple Alicloud ECS Instance
Deploying the App#
To deploy your infrastructure, follow the below steps.
Prerequisites#
Steps#
After cloning this repo, from this working directory, run these commands:
-
Create a new stack, which is an isolated deployment target for this example:
Terminal window pulumi stack init -
Set the required configuration variables for this program:
Terminal window pulumi config set alicloud:region us-east-1 -
Stand up the VM, which will also boot up your Python web server on port 80:
Terminal window pulumi up -
After a couple of minutes, your VM will be ready, and one stack output is printed:
Terminal window pulumi stack outputCurrent stack outputs (1):OUTPUT VALUEpublicIp 47.90.136.113 -
From there, feel free to experiment. Simply making edits and running
pulumi upwill incrementally update your VM. -
Afterward, destroy your stack and remove it:
Terminal window pulumi destroy --yespulumi stack rm --yes