Procedure
Go to the Pulumi official website and follow the instructions to install Pulumi. Alibaba CloudShell is pre-installed with Pulumi for your convenience. If you use Cloud Shell, start from step 4.
Add Pulumi to your path.
For Windows and macOS systems, the PATH environment variable is automatically set by using the automatic installation commands. In this case, skip this step. For Linux systems, run the following command to add Pulumi to your path:
export PATH=$PATH:$HOME/.pulumi/bin
Verify whether Pulumi is installed.
pulumi version
You can use Pulumi by using your Alibaba Cloud account. However, we recommend that you create and authorize a RAM user to improve the flexibility and security of permission management.
Log on to the RAM console.
Log on to the RAM console.
Create a RAM user named Pulumi and create an AccessKey pair for the RAM user.
Authorize the RAM user.
Configure Alibaba Cloud credentials.
Query the AccessKey ID and AccessKey secret from the User Management page in the Alibaba Cloud console. Set the relevant environment variables as follows:
export ALICLOUD_ACCESS_KEY=xxxxxx export ALICLOUD_SECRET_KEY=xxxxxx
Go to the Pulumi official website to sign up for a Pulumi account.
Create a Pulumi access token.
Log on to the Pulumi console. Click the profile picture and choose Settings from the shortcut menu. Go to the Settings tab as shown in the following figure. In the left-side navigation pane, click Access Tokens. Click New Access Token to create an access token.After the token is created, copy the token generated on the page. The access token is displayed only once.
Set the PULUMI_ACCESS_TOKEN environment variable.
export PULUMI_ACCESS_TOKEN=pul-37****
You have completed the installation and initial setup of Pulumi. For more information about how to use Pulumi to manage cloud resources, see other topics.