An example application showing how to use Pulumi, Docker, and Github Actions
make verify
- Run
make start-local
- Launch the application via Rider/Visual Studio/VS Code
- Run
make verify
- Run
make stop-service
when complete - Launch the application via Rider/Visual Studio/VS Code
Full set of CLI commands are available on the Pulumi website
- Login:
pulumi login
- Logout:
pulumi logout
- Preview Changes:
pulumi preview
- Create Infrastructure:
pulumi up -y
- Destroy Infrastructure:
pulumi destroy
- Delete stack:
pulumi stack rm <STACK NAME>
GitHub requires a personal access token to pull images from its package registry.
- Visit GitHub Tokens page
- Click
Generate new token
- Select
read:packages
and give it a meaningful name - Click
Generate token
- Copy the value (this will not be available again)
- Go to your repository settings and create a new secret called
LIBRARY_PAT
and paste the value of the token created
- Ensure you have Pulumi installed via the dependencies list above
- Create a new account on Pulumi
- Select or create an organization from the dropdown
- Go to
Settings
tab - Go to
Access Tokens
page - Create a new access token
- Copy the generated access token
- Create a new Github secret called
PULUMI_ACCESS_TOKEN
with the copied value - Add the Pulumi Bot to your Github org: https://www.pulumi.com/docs/guides/continuous-delivery/github-actions/
- Ensure you have Azure CLI installed via the dependencies list above
- Run
az login --tenant <TENANT_ID>
- Get this value from Azure AD Portal
- Create Service Principal
az ad sp create-for-rbac -n "InfraCreator" --sdk-auth --role "Contributor"
- Example output should look like:
{ "clientId": "<ARM_CLIENT_ID>", "clientSecret": "<ARM_CLIENT_SECRET>", "subscriptionId": "<ARM_SUBSCRIPTION_ID>", "tenantId": "<ARM_TENANT_ID>", "activeDirectoryEndpointUrl": "https://login.microsoftonline.com", "resourceManagerEndpointUrl": "https://management.azure.com/", "activeDirectoryGraphResourceId": "https://graph.windows.net/", "sqlManagementEndpointUrl": "https://management.core.windows.net:8443/", "galleryEndpointUrl": "https://gallery.azure.com/", "managementEndpointUrl": "https://management.core.windows.net/" }
- Copy output to Github as a secret called
AZURE_CREDENTIALS