diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-cs-assume-role.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-cs-assume-role.md index 2924864b5e..28ec548f90 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-cs-assume-role.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-cs-assume-role.md @@ -76,7 +76,7 @@ directory, replacing `{YOUR_STACK_PATH/assume-role-create}` with the full name o ```bash $ cd assume-role -$ npm install +$ pulumi install $ export AWS_ACCESS_KEY_ID="$(pulumi stack output --stack {YOUR_STACK_PATH/assume-role-create} accessKeyId)" $ export AWS_SECRET_ACCESS_KEY="$(pulumi stack output --stack {YOUR_STACK_PATH/assume-role-create} --show-secrets secretAccessKey)" ``` diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-cs-s3-folder.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-cs-s3-folder.md index de3df38421..3b2d5022f7 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-cs-s3-folder.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-cs-s3-folder.md @@ -47,7 +47,7 @@ A static website that uses [S3's website support](https://docs.aws.amazon.com/Am Previewing update (dev): Type Name Plan + pulumi:pulumi:Stack aws-cs-s3-folder-dev create - + └─ aws:s3:Bucket my-bucket create + + └─ aws:s3:BucketV2 my-bucket create + ├─ aws:s3:BucketObject index.html create + └─ aws:s3:BucketObject favicon.png create @@ -58,7 +58,7 @@ A static website that uses [S3's website support](https://docs.aws.amazon.com/Am Updating (dev): Type Name Status + pulumi:pulumi:Stack aws-cs-s3-folder-dev created - + └─ aws:s3:Bucket my-bucket created + + └─ aws:s3:BucketV2 my-bucket created + ├─ aws:s3:BucketObject index.html created + └─ aws:s3:BucketObject favicon.png created diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-fs-s3-folder.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-fs-s3-folder.md index afed9eaed1..b51aea7679 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-fs-s3-folder.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-fs-s3-folder.md @@ -47,7 +47,7 @@ A static website that uses [S3's website support](https://docs.aws.amazon.com/Am Previewing update (dev): Type Name Plan + pulumi:pulumi:Stack aws-cs-s3-folder-dev create - + └─ aws:s3:Bucket my-bucket create + + └─ aws:s3:BucketV2 my-bucket create + ├─ aws:s3:BucketObject index.html create + └─ aws:s3:BucketObject favicon.png create @@ -58,7 +58,7 @@ A static website that uses [S3's website support](https://docs.aws.amazon.com/Am Updating (dev): Type Name Status + pulumi:pulumi:Stack aws-cs-s3-folder-dev created - + └─ aws:s3:Bucket my-bucket created + + └─ aws:s3:BucketV2 my-bucket created + ├─ aws:s3:BucketObject index.html created + └─ aws:s3:BucketObject favicon.png created diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-go-s3-folder-component.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-go-s3-folder-component.md index f48bf3c62f..7f825754c6 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-go-s3-folder-component.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-go-s3-folder-component.md @@ -59,7 +59,7 @@ with `***`. Type Name Status + pulumi:pulumi:Stack aws-go-s3-folder-component-website-component-testing created + └─ pulumi:example:S3Folder pulumi-static-site created - + ├─ aws:s3:Bucket pulumi-static-site created + + ├─ aws:s3:BucketV2 pulumi-static-site created + ├─ aws:s3:BucketPolicy bucketPolicy created + ├─ aws:s3:BucketObject index.html created + └─ aws:s3:BucketObject favicon.png created diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-go-s3-folder.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-go-s3-folder.md index 1f0bd77951..9c41a65dde 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-go-s3-folder.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-go-s3-folder.md @@ -54,7 +54,7 @@ For a detailed walkthrough of this example, see the tutorial [Static Website on #: Resource Type Name Status Extra Inf 1: pulumi:pulumi:Stack website-testing + created - 2: aws:s3:Bucket s3-website-bucket + created + 2: aws:s3:BucketV2 s3-website-bucket + created 3: aws:s3:BucketPolicy bucketPolicy + created 4: aws:s3:BucketObject favicon.png + created 5: aws:s3:BucketObject index.html + created diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-js-s3-folder-component.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-js-s3-folder-component.md index e278153f74..38b1bcd31b 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-js-s3-folder-component.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-js-s3-folder-component.md @@ -61,7 +61,7 @@ with `***`. Type Name Status Info + pulumi:pulumi:Stack aws-js-s3-folder-component-website-component-testing created + └─ examples:S3Folder pulumi-static-site created - + ├─ aws:s3:Bucket pulumi-static-site created + + ├─ aws:s3:BucketV2 pulumi-static-site created + ├─ aws:s3:BucketPolicy bucketPolicy created + ├─ aws:s3:BucketObject favicon.png created + └─ aws:s3:BucketObject index.html created diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-js-s3-folder.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-js-s3-folder.md index 151ce95534..5fee93349a 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-js-s3-folder.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-js-s3-folder.md @@ -60,8 +60,8 @@ with `***`. Performing changes: Type Name Status Info - + pulumi:pulumi:Stack aws-js-s3-folder-website-testing created - + ├─ aws:s3:Bucket s3-website-bucket created + + pulumi:pulumi:Stack aws-js-s3-folder-website-testing. created + + ├─ aws:s3:BucketV2 s3-website-bucket created + ├─ aws:s3:BucketPolicy bucketPolicy created + ├─ aws:s3:BucketObject favicon.png created + └─ aws:s3:BucketObject index.html created diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-py-s3-folder.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-py-s3-folder.md index 954fb04c7d..109ee01f2a 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-py-s3-folder.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-py-s3-folder.md @@ -54,7 +54,7 @@ with `***`. Type Name Plan + pulumi:pulumi:Stack aws-py-s3-folder-dev create - + ├─ aws:s3:Bucket s3-website-bucket create + + ├─ aws:s3:BucketV2 s3-website-bucket create + ├─ aws:s3:BucketObject index.html create + ├─ aws:s3:BucketObject python.png create + ├─ aws:s3:BucketObject favicon.png create diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-py-static-website.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-py-static-website.md index eeceaa45a6..c844cbf194 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-py-static-website.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-py-static-website.md @@ -70,8 +70,8 @@ with `***`. Type Name Plan + pulumi:pulumi:Stack static-website-example create + ├─ pulumi:providers:aws east create - + ├─ aws:s3:Bucket requestLogs create - + ├─ aws:s3:Bucket contentBucket create + + ├─ aws:s3:BucketV2 requestLogs create + + ├─ aws:s3:BucketV2 contentBucket create + │ ├─ aws:s3:BucketObject 404.html create + │ └─ aws:s3:BucketObject index.html create + ├─ aws:acm:Certificate certificate create diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-lambda-slack.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-lambda-slack.md new file mode 100644 index 0000000000..f91a16dbd1 --- /dev/null +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-lambda-slack.md @@ -0,0 +1,74 @@ +--- +title: "AWS Lambda for Slack Notification | TypeScript" +h1: "AWS Lambda for Slack Notification" +linktitle: "AWS Lambda for Slack Notification" +meta_desc: "AWS Lambda for Slack Notification How-to Guide using TypeScript" +no_edit_this_page: true +cloud: aws +language: ts +layout: package +--- + + + + +

+ + + + View Code + + +

+ + +A Pulumi example to: + +- Creates an AWS Lambda function to post a message on Slack via a Webhook URL. +- Adds an AWS API Gateway so the Lambda can be invoked externally, e.g, via GitHub Webhooks. +- Uses a Pulumi ESC Environment to dynamically retrieve AWS OIDC Credentials and the Slack URL from AWS Secrets Manager. + +Last update: September 2024 + +## 📋 Pre-requisites + +- AWS OIDC configured in an Pulumi ESC Environment +- AWS Secrets Manager with a Slack Webhook URL secret +- A properly configured Slack Webhook URL +- [Pulumi CLI](https://www.pulumi.com/docs/get-started/install/) +- [Pulumi Cloud account](https://app.pulumi.com/signup) +- [npm](https://www.npmjs.com/get-npm) + +## 👩‍🏫 Get started + +This Pulumi example is written as a template. It is meant to be copied via `pulumi new` + +```bash +# login to your Pulumi Cloud if you haven't already +$ pulumi login + +# create a new dir and cd to it +$ mkdir my-slack-demo +$ cd my-slack-demo + +# start your pulumi project +$ pulumi new https://github.com/pulumi/examples/aws-ts-lambda-slack +``` + +```bash +# Add your Pulumi ESC Environment +$ pulumi config env add YOUR_ESC_ENV --yes --non-interactive +$ pulumi up +# select 'yes' to confirm the expected changes +# 🎉 Ta-Da! +``` + +## 🧹 Clean up + +To clean up your infrastructure, run: + +```bash +$ pulumi destroy +# select 'yes' to confirm the expected changes +``` + diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-oidc-provider-pulumi-cloud.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-oidc-provider-pulumi-cloud.md index e0a49bfe3a..ae5f626c18 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-oidc-provider-pulumi-cloud.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-oidc-provider-pulumi-cloud.md @@ -25,9 +25,9 @@ layout: package A Pulumi template to: - Create AWS resources for AWS OIDC (IdP + Role) -- Create a new Pulumi Cloud ESC Environment (optional) +- Create a new Pulumi Cloud ESC Environment -Last update: June 2024 +Last update: September 2024 ## 📋 Pre-requisites @@ -54,7 +54,7 @@ Once copied to your machine, feel free to edit as needed. ## 🎬 How to run -Note that this templates contains a default value which contains a valid AWS OIDC thumbprint as of June 2024. If this thumbprint becomes invalid, obtain a new OIDC thumbprint. For more information, see [Obtain the thumbprint for an OpenID Connect identity provider](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc_verify-thumbprint.html) in the AWS docs. +This template will pick up the thumbprint from the URL that you set in the stack configuration. By default it will use the OIDC IDP URL for Pulumi Cloud. To deploy your infrastructure, run: diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-s3-folder.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-s3-folder.md index 1a925dc6a8..4a547758ea 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-s3-folder.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-ts-s3-folder.md @@ -60,8 +60,8 @@ with `***`. Performing changes: Type Name Status Info - + pulumi:pulumi:Stack aws-js-s3-folder-website-testing created - + ├─ aws:s3:Bucket s3-website-bucket created + + pulumi:pulumi:Stack aws-js-s3-folder-website-testing created + + ├─ aws:s3:BucketV2 s3-website-bucket created + ├─ aws:s3:BucketPolicy bucketPolicy created + ├─ aws:s3:BucketObject favicon.png created + └─ aws:s3:BucketObject index.html created diff --git a/themes/default/content/registry/packages/aws/how-to-guides/aws-yaml-static-website.md b/themes/default/content/registry/packages/aws/how-to-guides/aws-yaml-static-website.md index 612547c422..7db9fa16d4 100644 --- a/themes/default/content/registry/packages/aws/how-to-guides/aws-yaml-static-website.md +++ b/themes/default/content/registry/packages/aws/how-to-guides/aws-yaml-static-website.md @@ -1,8 +1,8 @@ --- -title: "Host a Static Website on Amazon S3 with the AWS Cloud Control Provider | YAML" -h1: "Host a Static Website on Amazon S3 with the AWS Cloud Control Provider" -linktitle: "Host a Static Website on Amazon S3 with the AWS Cloud Control Provider" -meta_desc: "Host a Static Website on Amazon S3 with the AWS Cloud Control Provider How-to Guide using YAML" +title: "Host a Static Website on Amazon S3 with the AWS Native Provider | YAML" +h1: "Host a Static Website on Amazon S3 with the AWS Native Provider" +linktitle: "Host a Static Website on Amazon S3 with the AWS Native Provider" +meta_desc: "Host a Static Website on Amazon S3 with the AWS Native Provider How-to Guide using YAML" no_edit_this_page: true cloud: aws language: yaml @@ -28,8 +28,9 @@ layout: package A static website that uses [S3's website support](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). For a detailed walkthrough of this example, see the tutorial [Static Website on AWS S3](https://www.pulumi.com/docs/tutorials/aws/s3-website/). -Note: Some resources are not yet supported by the AWS Cloud Control provider, so we are also using -the standard AWS provider for additional resources in this example. +Note: Some resources are not yet supported by the Native AWS provider, so we are using both the Native +and Classic provider in this example. The resources will be updated to use native resources as they are +available in AWS's Cloud Control API. ## Deploying and running the program diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-botservice.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-botservice.md index 0c843d5ddd..96dd9b083d 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-botservice.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-botservice.md @@ -43,41 +43,42 @@ To deploy your infrastructure, follow the below steps. ### Publish Bot Steps -1. Within the **/bot** subfolder, publish the bot to subfolder called publish: +1. Within the **/bot** subfolder, publish the bot to subfolder called publish: ```bash - $ dotnet publish -o publish + dotnet publish -o publish ``` ### Pulumi Steps -1. Within the **azure-cs-botservice** folder, create a new stack: +1. Within the **azure-cs-botservice** folder, create a new stack: ```bash - $ pulumi stack init dev + pulumi stack init dev ``` -2. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): ```bash - $ az login + az login ``` -3. Configure the location to deploy the resources to: +1. Configure the location to deploy the resources to: ```bash - $ pulumi config set azure:location "North Europe" + pulumi config set azure:location "North Europe" + pulumi config set azure:subscriptionId ``` -4. Configure the Bot Name: +1. Configure the Bot Name: ```bash - $ pulumi config set botName PulumiBot1 + pulumi config set botName PulumiBot1 ``` -5. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ```bash + ```console $ pulumi up Previewing changes: ... @@ -89,21 +90,21 @@ To deploy your infrastructure, follow the below steps. Update duration: 1m22s ``` -6. Check the deployed bot using either: +1. Check the deployed bot using either: - * Azure Portal Azure Bot Service - [Test in Webchat feature](https://docs.microsoft.com/en-us/azure/bot-service/abs-quickstart?view=azure-bot-service-4.0#test-the-bot) - * [Bot Framework Emulator](https://github.com/Microsoft/BotFramework-Emulator) pointing to the output bot endpoint and Microsoft Application Id and the secret you supplied: + * Azure Portal Azure Bot Service - [Test in Webchat feature](https://docs.microsoft.com/en-us/azure/bot-service/abs-quickstart?view=azure-bot-service-4.0#test-the-bot) + * [Bot Framework Emulator](https://github.com/Microsoft/BotFramework-Emulator) pointing to the output bot endpoint and Microsoft Application Id and the secret you supplied: - ```bash - $ BotEndpoint: "https://app8asdf.azurewebsites.net/api/messages" - $ MicrosoftAppId: "b5e65403-923c-4568-z2f6-a6f41b258azz" - $ MicrosoftAppPassword: "" - ``` + ```yaml + BotEndpoint: "https://app8asdf.azurewebsites.net/api/messages" + MicrosoftAppId: "b5e65403-923c-4568-z2f6-a6f41b258azz" + MicrosoftAppPassword: "" + ``` -7. Once you've finished, you can tear down your stack's resources by destroying and removing it: +1. Once you've finished, you can tear down your stack's resources by destroying and removing it: ```bash - $ pulumi destroy -y - $ pulumi stack rm -y + pulumi destroy -y + pulumi stack rm -y ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-msi-keyvault-rbac.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-msi-keyvault-rbac.md index 5e0f16f4d1..7845c11c8d 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-msi-keyvault-rbac.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-msi-keyvault-rbac.md @@ -48,33 +48,34 @@ To deploy your infrastructure, follow the below steps. ### Steps -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Build and publish the ASP.NET Core project: +1. Build and publish the ASP.NET Core project: - ``` - $ dotnet publish webapp + ```bash + dotnet publish webapp ``` 1. Set an appropriate Azure location like: - ``` - $ pulumi config set azure:location westus + ```bash + pulumi config set azure:location westus + pulumi config set azure:subscriptionId ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -86,9 +87,9 @@ To deploy your infrastructure, follow the below steps. Update duration: 4m16s ``` -1. Check the deployed website endpoint: +1. Check the deployed website endpoint: - ``` + ```console $ pulumi stack output Endpoint https://app129968b8.azurewebsites.net/ $ curl "$(pulumi stack output Endpoint)" @@ -100,7 +101,7 @@ To deploy your infrastructure, follow the below steps. 1. Once you've finished experimenting, tear down your stack's resources by destroying and removing it: ```bash - $ pulumi destroy --yes - $ pulumi stack rm --yes + pulumi destroy --yes + pulumi stack rm --yes ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-vm-scaleset.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-vm-scaleset.md index 84905d4b43..4e15aba0ad 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-vm-scaleset.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-vm-scaleset.md @@ -39,23 +39,22 @@ To deploy your infrastructure, follow the below steps. ### Steps -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` 1. Set an appropriate Azure location like: - ``` - $ pulumi config set azure:location westus + ```bash + pulumi config set azure:location westus + pulumi config set azure:subscriptionId ``` -1. Run `pulumi up` to preview and deploy the changes: +1. Run `pulumi up` to preview and deploy changes: -1. Run `pulumi up` to preview and deploy changes: - - ``` + ```console $ pulumi up Previewing changes: ... @@ -68,16 +67,16 @@ To deploy your infrastructure, follow the below steps. 1. Get the IP address of the newly-created instance from the stack's outputs: - ``` + ```console $ pulumi stack output IpAddress 137.117.15.111 ``` 1. Check to see that your server is now running: - ``` + ```console $ curl http://$(pulumi stack output IpAddress) - Hello, World By ! + Hello, World By ! ``` 1. From there, feel free to experiment. Simply making edits and running `pulumi up` will incrementally update your stack. @@ -85,7 +84,7 @@ To deploy your infrastructure, follow the below steps. 1. Once you've finished experimenting, tear down your stack's resources by destroying and removing it: ```bash - $ pulumi destroy --yes - $ pulumi stack rm --yes + pulumi destroy --yes + pulumi stack rm --yes ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-webserver.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-webserver.md index b5f40dbed2..0787ff4b8b 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-webserver.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-cs-webserver.md @@ -38,23 +38,24 @@ To deploy your infrastructure, follow the below steps. ### Steps -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` 1. Set an appropriate Azure location like: - ``` - $ pulumi config set azure:location westus + ```bash + pulumi config set azure:location westus + pulumi config set azure:subscriptionId ``` 1. Run `pulumi up` to preview and deploy the changes: -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -67,14 +68,14 @@ To deploy your infrastructure, follow the below steps. 1. Get the IP address of the newly-created instance from the stack's outputs: - ``` + ```console $ pulumi stack output IpAddress 137.117.15.111 ``` 1. Check to see that your server is now running: - ``` + ```console $ curl http://$(pulumi stack output IpAddress) Hello, World! ``` @@ -84,7 +85,7 @@ To deploy your infrastructure, follow the below steps. 1. Once you've finished experimenting, tear down your stack's resources by destroying and removing it: ```bash - $ pulumi destroy --yes - $ pulumi stack rm --yes + pulumi destroy --yes + pulumi stack rm --yes ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-aci.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-aci.md index 2b0975705d..b768c75fb0 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-aci.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-aci.md @@ -38,27 +38,28 @@ To deploy your infrastructure, follow the below steps. ### Steps -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Configure the location to deploy the resources to: +1. Configure the location to deploy the resources to: - ``` - $ pulumi config set azure:location + ```bash + pulumi config set azure:location + pulumi config set azure:subscriptionId ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -70,9 +71,9 @@ To deploy your infrastructure, follow the below steps. Update duration: 1m56s ``` -1. Check the deployed container endpoint: +1. Check the deployed container endpoint: - ``` + ```console $ pulumi stack output endpoint https://acifsharp.westeurope.azurecontainer.io $ curl "$(pulumi stack output endpoint)" @@ -85,12 +86,12 @@ To deploy your infrastructure, follow the below steps. ``` -6. From there, feel free to experiment. Simply making edits and running `pulumi up` will incrementally update your stack. +1. From there, feel free to experiment. Simply making edits and running `pulumi up` will incrementally update your stack. -7. Once you've finished experimenting, tear down your stack's resources by destroying and removing it: +1. Once you've finished experimenting, tear down your stack's resources by destroying and removing it: ```bash - $ pulumi destroy --yes - $ pulumi stack rm --yes + pulumi destroy --yes + pulumi stack rm --yes ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-aks.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-aks.md index 2520557f89..bead0c10ec 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-aks.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-aks.md @@ -36,8 +36,9 @@ Stands up an [Azure Kubernetes Service](https://azure.microsoft.com/en-us/servic Configure the environment: ```bash -$ pulumi config set azure:location westeurope -$ az login +pulumi config set azure:location westeurope +pulumi config set azure:subscriptionId +az login ``` ## Deploying the App (short version) @@ -45,35 +46,34 @@ $ az login To make it easier to try out you can use the available [Makefile](https://github.com/pulumi/examples/blob/master/classic-azure-fs-aks/Makefile), like: ```bash -$ make deploy +make deploy ``` This will build the project and run `pulumi up -y`. If you haven't created a stack you will be prompted to do so. - When the deploy is finished you can export the kubernetes config by running ```bash -$ make exportconfig +make exportconfig ``` With the config exported you can now test to access the kubernetes cluster ```bash -$ KUBECONFIG=./kubeconfig.yaml kubectl get nodes +KUBECONFIG=./kubeconfig.yaml kubectl get nodes ``` If you want to cleanup when you are done you can run ```bash -$ make destroy -$ make rmstack +make destroy +make rmstack ``` To list all make targets run ```bash -$ make help +make help ``` The [Makefile](https://github.com/pulumi/examples/blob/master/classic-azure-fs-aks/Makefile) also works as documentation on what commands you need to run to deploy the application. @@ -83,25 +83,25 @@ The [Makefile](https://github.com/pulumi/examples/blob/master/classic-azure-fs-a If you don't have make installed you will have to run the "native" commands. To deploy you run ```bash -$ pulumi up --yes +pulumi up --yes ``` This will prompt you to create a stack if you haven't done so already. When the deploy is ready you can export the kubernetes config with ```bash -$ pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml +pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml ``` and then test the deployment with ```bash -$ KUBECONFIG=./kubeconfig.yaml kubectl get nodes +KUBECONFIG=./kubeconfig.yaml kubectl get nodes ``` If you want to cleanup the cloud resources when you are done you can run ```bash -$ pulumi destroy -y -$ pulumi stack rm -y +pulumi destroy -y +pulumi stack rm -y ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-appservice.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-appservice.md index abb16eb8a5..afe70b0b05 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-appservice.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-fs-appservice.md @@ -41,33 +41,34 @@ To deploy your infrastructure, follow the below steps. ### Steps -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Configure the location to deploy the resources to: +1. Configure the location to deploy the resources to: - ``` - $ pulumi config set azure:location + ```bash + pulumi config set azure:location + pulumi config set azure:subscriptionId ``` 1. Define SQL Server password (make it complex enough to satisfy Azure policy): - ``` + ```bash pulumi config set --secret sqlPassword ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -79,9 +80,9 @@ To deploy your infrastructure, follow the below steps. Update duration: 1m14.59910109s ``` -1. Check the deployed website endpoint: +1. Check the deployed website endpoint: - ``` + ```console $ pulumi stack output endpoint https://azpulumi-as0ef47193.azurewebsites.net $ curl "$(pulumi stack output endpoint)" @@ -92,12 +93,12 @@ To deploy your infrastructure, follow the below steps. ``` -6. From there, feel free to experiment. Simply making edits and running `pulumi up` will incrementally update your stack. +1. From there, feel free to experiment. Simply making edits and running `pulumi up` will incrementally update your stack. -7. Once you've finished experimenting, tear down your stack's resources by destroying and removing it: +1. Once you've finished experimenting, tear down your stack's resources by destroying and removing it: ```bash - $ pulumi destroy --yes - $ pulumi stack rm --yes + pulumi destroy --yes + pulumi stack rm --yes ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-go-aks-multicluster.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-go-aks-multicluster.md index 5136903016..dbcf841b5d 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-go-aks-multicluster.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-go-aks-multicluster.md @@ -26,7 +26,7 @@ layout: package This example demonstrates creating multiple Azure Kubernetes Service (AKS) clusters in different regions and with -different node counts. Please see https://docs.microsoft.com/en-us/azure/aks/ for more information about AKS. +different node counts. Please see for more information about AKS. ## Prerequisites @@ -38,7 +38,7 @@ We will be deploying to Azure, so you will need an Azure account. If you don't h ## Running the Example -> **Note**: Due to an issue in the Azure Terraform Provider (https://github.com/terraform-providers/terraform-provider-azurerm/issues/1635) the +> **Note**: Due to an issue in the Azure Terraform Provider () the > creation of an Azure Service Principal, which is needed to create the Kubernetes cluster (see main.go), is delayed and may not > be available when the cluster is created. If you get a Service Principal not found error, as a work around, you should be able to run `pulumi up` > again, at which time the Service Principal should have been created. @@ -48,29 +48,29 @@ After cloning this repo, `cd` into it and run these commands. 1. Create a new stack, which is an isolated deployment target for this example: ```bash - $ pulumi stack init + pulumi stack init ``` 2. Set the required configuration variables for this program: ```bash - $ pulumi config set azure:environment public - $ pulumi config set password --secret [your-cluster-password-here] - $ ssh-keygen -t rsa -f key.rsa - $ pulumi config set sshPublicKey < key.rsa.pub + pulumi config set azure:environment public + pulumi config set azure:subscriptionId + ssh-keygen -t rsa -f key.rsa + pulumi config set sshPublicKey < key.rsa.pub ``` 3. Deploy everything with the `pulumi up` command. This provisions all the Azure resources necessary, including an Active Directory service principal and AKS clusters: ```bash - $ pulumi up + pulumi up ``` 4. After a couple minutes, your AKS clusters will be ready. The AKS cluster names will be printed as output variables once `pulumi up` completes. - ```bash + ```console $ pulumi up ... @@ -89,7 +89,7 @@ After cloning this repo, `cd` into it and run these commands. 6. Once you are done, you can destroy all of the resources, and the stack: ```bash - $ pulumi destroy - $ pulumi stack rm + pulumi destroy + pulumi stack rm ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-go-webserver-component.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-go-webserver-component.md index 91db3dea42..8a91e58262 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-go-webserver-component.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-go-webserver-component.md @@ -38,34 +38,35 @@ defining a `WebServer` class, we can hide many details (see [here](https://githu ## Running the App -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Configure the deployment. The username and password here will be used to configure the Virtual Machine. The +1. Configure the deployment. The username and password here will be used to configure the Virtual Machine. The password must adhere to the [Azure restrictions on VM passwords]( https://docs.microsoft.com/en-us/azure/virtual-machines/windows/faq#what-are-the-password-requirements-when-creating-a-vm). - ``` - $ pulumi config set azure:location westus # any valid Azure region will do - $ pulumi config set username webmaster - $ pulumi config set password --secret - $ pulumi config set count 5 # optional -- will default to 2 if left out + ```bash + pulumi config set azure:location westus # any valid Azure region will do + pulumi config set azure:subscriptionId + pulumi config set username webmaster + pulumi config set password --secret + pulumi config set count 5 # optional -- will default to 2 if left out ``` Note that `--secret` ensures your password is encrypted safely. -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -77,9 +78,9 @@ defining a `WebServer` class, we can hide many details (see [here](https://githu Update duration: 4m27s ``` -1. Check the resulting IP addresses: +1. Check the resulting IP addresses: - ``` + ```console $ pulumi stack output ipAddresses [ 40.112.181.239, ..., 40.112.181.240 ] ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-aks-multicluster.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-aks-multicluster.md index 9801a6dab6..fbaaadbcde 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-aks-multicluster.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-aks-multicluster.md @@ -26,7 +26,7 @@ layout: package This example demonstrates creating multiple Azure Kubernetes Service (AKS) clusters in different regions and with -different node counts. Please see https://docs.microsoft.com/en-us/azure/aks/ for more information about AKS. +different node counts. Please see for more information about AKS. # Prerequisites @@ -38,7 +38,7 @@ We will be deploying to Azure, so you will need an Azure account. If you don't h # Running the Example -> **Note**: Due to an issue in the Azure Terraform Provider (https://github.com/terraform-providers/terraform-provider-azurerm/issues/1635) the +> **Note**: Due to an issue in the Azure Terraform Provider () the > creation of an Azure Service Principal, which is needed to create the Kubernetes cluster (see index.ts), is delayed and may not > be available when the cluster is created. If you get a Service Principal not found error, as a work around, you should be able to run `pulumi up` > again, at which time the Service Principal should have been created. @@ -48,29 +48,30 @@ After cloning this repo, `cd` into it and run these commands. 1. Create a new stack, which is an isolated deployment target for this example: ```bash - $ pulumi stack init dev + pulumi stack init dev ``` 1. Set the required configuration variables for this program: ```bash - $ pulumi config set azure:environment public - $ pulumi config set password --secret [your-cluster-password-here] - $ ssh-keygen -t rsa -f key.rsa - $ pulumi config set sshPublicKey < key.rsa.pub + pulumi config set azure:environment public + pulumi config set azure:subscriptionId + pulumi config set password --secret [your-cluster-password-here] + ssh-keygen -t rsa -f key.rsa + pulumi config set sshPublicKey < key.rsa.pub ``` 1. Deploy everything with the `pulumi up` command. This provisions all the Azure resources necessary, including an Active Directory service principal and AKS clusters: ```bash - $ pulumi up + pulumi up ``` 1. After a couple minutes, your AKS clusters will be ready. The AKS cluster names will be printed as output variables once `pulumi up` completes. - ```bash + ```console $ pulumi up ... @@ -89,7 +90,7 @@ After cloning this repo, `cd` into it and run these commands. 1. Once you are done, you can destroy all of the resources, and the stack: ```bash - $ pulumi destroy - $ pulumi stack rm + pulumi destroy + pulumi stack rm ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-arm-template.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-arm-template.md index f2f83a54ad..7dd10ae740 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-arm-template.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-arm-template.md @@ -45,7 +45,7 @@ here](https://www.pulumi.com/docs/intro/cloud-providers/azure/setup/) to connect 1. Create a new stack: - ```sh + ```console $ pulumi stack init Enter a stack name: azure-arm-dev ``` @@ -53,14 +53,15 @@ here](https://www.pulumi.com/docs/intro/cloud-providers/azure/setup/) to connect 2. Set the required configuration variables for this program, and log into Azure: ```bash - $ pulumi config set azure:environment public - $ pulumi config set azure:location westus2 - $ az login + pulumi config set azure:environment public + pulumi config set azure:location westus2 + pulumi config set azure:subscriptionId + az login ``` 3. Perform the deployment: - ```sh + ```console $ pulumi up Updating stack 'azure-arm-dev' Performing changes: @@ -84,8 +85,8 @@ here](https://www.pulumi.com/docs/intro/cloud-providers/azure/setup/) to connect 4. Tidy up and delete all resources allocated by your deployment: ```bash - $ pulumi destroy -y --skip-preview - $ pulumi stack rm -y + pulumi destroy -y --skip-preview + pulumi stack rm -y ``` ## Next Steps diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-hdinsight-spark.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-hdinsight-spark.md index 136da9e51c..2d375af54a 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-hdinsight-spark.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-hdinsight-spark.md @@ -32,31 +32,32 @@ An example Pulumi component that deploys a Spark cluster on Azure HDInsight. 1. Create a new stack: ```bash - $ pulumi stack init dev + pulumi stack init dev ``` 1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): ```bash - $ az login + az login ``` -1. Specify the Azure location to use: +1. Specify the Azure location and subscription to use: ```bash - $ pulumi config set azure:location WestUS + pulumi config set azure:location WestUS + pulumi config set azure:subscriptionId ``` 1. Define Spark username and password (make it complex enough to satisfy Azure policy): ```bash - $ pulumi config set username - $ pulumi config set --secret password + pulumi config set username + pulumi config set --secret password ``` 1. Run `pulumi up` to preview and deploy changes: - ``` bash + ``` console $ pulumi up Previewing changes: ... @@ -70,7 +71,7 @@ An example Pulumi component that deploys a Spark cluster on Azure HDInsight. 1. Check the deployed Spark endpoint: - ```bash + ```console $ pulumi stack output endpoint https://myspark1234abcd.azurehdinsight.net/ diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-msi-keyvault-rbac.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-msi-keyvault-rbac.md index 197bf164c5..0809b514a9 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-msi-keyvault-rbac.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-msi-keyvault-rbac.md @@ -42,30 +42,31 @@ The application consists of several parts: 1. Create a new stack: ```bash - $ pulumi stack init dev + pulumi stack init dev ``` 1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): ```bash - $ az login + az login ``` 1. Build and publish the ASP.NET Core project: ```bash - $ dotnet publish webapp + dotnet publish webapp ``` -1. Set an appropriate Azure location like: +1. Set an appropriate Azure location and subscription like: ```bash - $ pulumi config set azure:location westus + pulumi config set azure:location westus + pulumi config set azure:subscriptionId ``` 1. Run `pulumi up` to preview and deploy changes: - ```bash + ```console $ pulumi up Previewing changes: ... @@ -79,7 +80,7 @@ The application consists of several parts: 1. Check the deployed website endpoint: - ```bash + ```console $ pulumi stack output endpoint https://app129968b8.azurewebsites.net/ $ curl "$(pulumi stack output endpoint)" diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-vm-scaleset.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-vm-scaleset.md index aedfb15f86..1be65da15c 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-vm-scaleset.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-vm-scaleset.md @@ -38,20 +38,21 @@ This example provisions a Scale Set of Linux web servers with nginx deployed, co 1. Create a new stack: ```bash - $ pulumi stack init dev + pulumi stack init dev ``` 1. Configure the app deployment. ```bash - $ pulumi config set azure:location westus # any valid Azure region will do + pulumi config set azure:location westus # any valid Azure region will do + pulumi config set azure:subscriptionId ``` Optionally, configure the username and password for the admin user. Otherwise, they will be auto-generated. ```bash - $ pulumi config set adminUser webmaster - $ pulumi config set adminPassword --secret + pulumi config set adminUser webmaster + pulumi config set adminPassword --secret ``` Note that `--secret` ensures your password is encrypted safely. @@ -59,12 +60,12 @@ This example provisions a Scale Set of Linux web servers with nginx deployed, co 1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): ```bash - $ az login + az login ``` 1. Run `pulumi up` to preview and deploy changes: - ```bash + ```console $ pulumi up Previewing update: ... @@ -78,7 +79,7 @@ This example provisions a Scale Set of Linux web servers with nginx deployed, co 1. Check the domain name of the PIP: - ```bash + ```console $ pulumi stack output publicAddress dsuv3vqbgi.westeurope.cloudapp.azure.com $ curl http://$(pulumi stack output publicAddress) diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-webserver-component.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-webserver-component.md index 1315ffef4e..7263ade062 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-webserver-component.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-py-webserver-component.md @@ -42,31 +42,32 @@ can be composed into a higher-level, reusable abstraction. 1. Create a new stack: ```bash - $ pulumi stack init + pulumi stack init ``` 1. Set the Azure environment: ```bash - $ pulumi config set azure:environment public + pulumi config set azure:environment public + pulumi config set azure:subscriptionId ``` 1. Set the required configuration for this example. This example requires you to supply a username and password to the virtual machine that we are going to create. ```bash - $ pulumi config set username myusername + pulumi config set username myusername ``` The password is a secret, so we can ask Pulumi to encrypt the configuration: ```bash - $ pulumi config set --secret password Hunter2hunter2 + pulumi config set --secret password Hunter2hunter2 ``` 1. Run `pulumi up` to preview and deploy the changes: - ```bash + ```console $ pulumi up Previewing update (dev): @@ -107,21 +108,21 @@ the virtual machine that we are going to create. 1. Get the IP address of the newly-created instance from the stack's outputs: - ```bash + ```console $ pulumi stack output public_ip 13.64.196.146 ``` 1. Check to see that your server is now running: - ```bash + ```console $ curl http://$(pulumi stack output public_ip) Hello, World! ``` 1. Destroy the stack: - ```bash + ```console $ pulumi destroy -y Previewing destroy (dev): diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-aks-keda.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-aks-keda.md index ff11a2ba48..870124371c 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-aks-keda.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-aks-keda.md @@ -25,7 +25,7 @@ layout: package

-This example demonstrates creating an Azure Kubernetes Service (AKS) Cluster, and deploying an Azure Function App with Kubernetes-based Event Driven Autoscaling (KEDA) into it, all in one Pulumi program. Please see https://docs.microsoft.com/en-us/azure/aks/ for more information about AKS and https://docs.microsoft.com/en-us/azure/azure-functions/functions-kubernetes-keda for more information about KEDA. +This example demonstrates creating an Azure Kubernetes Service (AKS) Cluster, and deploying an Azure Function App with Kubernetes-based Event Driven Autoscaling (KEDA) into it, all in one Pulumi program. Please see for more information about AKS and for more information about KEDA. ## Prerequisites @@ -38,16 +38,18 @@ We will be deploying to Azure, so you will need an Azure account. If you don't h This example deploys a Helm Chart from Kedacore Helm chart repository. If you are using Helm v2: + ```bash -$ helm init --client-only -$ helm repo add kedacore https://kedacore.github.io/charts -$ helm repo update +helm init --client-only +helm repo add kedacore https://kedacore.github.io/charts +helm repo update ``` If you are using Helm v3: -``` -$ helm repo add kedacore https://kedacore.github.io/charts -$ helm repo update + +```bash +helm repo add kedacore https://kedacore.github.io/charts +helm repo update ``` ## Running the Example @@ -57,13 +59,14 @@ After cloning this repo, `cd` into it and run these commands. 1. Create a new stack, which is an isolated deployment target for this example: ```bash - $ pulumi stack init + pulumi stack init ``` 2. Set the Azure region to deploy to: ```bash - $ pulumi config set azure:location + pulumi config set azure:location + pulumi config set azure:subscriptionId ``` 3. Deploy everything with the `pulumi up` command. This provisions all the Azure resources necessary, including an Active Directory service principal, AKS cluster, and then deploys the Apache Helm Chart, and an Azure Function managed by KEDA, all in a single gesture: @@ -76,14 +79,14 @@ After cloning this repo, `cd` into it and run these commands. > for further details. ```bash - $ pulumi up + pulumi up ``` 4. After a couple minutes, your cluster and Azure Function app will be ready. Four output variables will be printed, reflecting your cluster name (`clusterName`), Kubernetes config (`kubeConfig`), Storage Account name (`storageAccountName`), and storage queue name (`queueName`). Using these output variables, you may configure your `kubectl` client using the `kubeConfig` configuration: - ```bash + ```console $ pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml $ KUBECONFIG=./kubeconfig.yaml kubectl get deployment NAME READY UP-TO-DATE AVAILABLE AGE @@ -95,7 +98,7 @@ After cloning this repo, `cd` into it and run these commands. Wait for a minute and then query the deployments again: - ```bash + ```console $ KUBECONFIG=./kubeconfig.yaml kubectl get deployment NAME READY UP-TO-DATE AVAILABLE AGE keda-edge 1/1 1 1 14m @@ -104,7 +107,7 @@ After cloning this repo, `cd` into it and run these commands. Note that the `queue-handler` deployment got 1 instance ready. Looking at the pods: - ```bash + ```console $ KUBECONFIG=./kubeconfig.yaml kubectl get pod NAME READY STATUS RESTARTS AGE keda-edge-97664558c-q2mkd 1/1 Running 0 15m queue-handler-c496dcfc-mb6tx 1/1 Running 0 2m3s @@ -112,7 +115,7 @@ After cloning this repo, `cd` into it and run these commands. There's now a pod processing queue messages. The message should be gone from the storage queue at this point. Query the logs of the pod: - ```bash + ```console $ KUBECONFIG=./kubeconfig.yaml kubectl logs queue-handler-c496dcfc-mb6tx ... C# Queue trigger function processed: Test Message @@ -125,7 +128,7 @@ After cloning this repo, `cd` into it and run these commands. 6. Once you are done, you can destroy all of the resources, and the stack: ```bash - $ pulumi destroy - $ pulumi stack rm + pulumi destroy + pulumi stack rm ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-aks-mean.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-aks-mean.md index 681bb8afba..b3160fbd69 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-aks-mean.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-aks-mean.md @@ -50,7 +50,7 @@ npm install 1. Create a new stack: - ```sh + ```console $ pulumi stack init Enter a stack name: azure-mean ``` @@ -58,16 +58,17 @@ npm install 1. Set the required configuration variables for this program: ```bash - $ pulumi config set azure:environment public - $ pulumi config set password --secret [your-cluster-password-here] - $ ssh-keygen -t rsa -f key.rsa - $ pulumi config set sshPublicKey < key.rsa.pub - $ az login + pulumi config set azure:environment public + pulumi config set password --secret + pulumi config set azure:subscriptionId + ssh-keygen -t rsa -f key.rsa + pulumi config set sshPublicKey < key.rsa.pub + az login ``` 1. Perform the deployment: - ```sh + ```console $ pulumi up Updating stack 'azure-mean' Performing changes: @@ -101,7 +102,7 @@ npm install in this case `40.76.25.71`. It is exported with a stack output variable, `frontendAddress`. We can use `curl` and `grep` to retrieve the `` of the site the proxy points at. - ```sh + ```console $ curl -sL $(pulumi stack output frontendAddress) | grep "<title>" <title>Node/Angular Todo App> ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-api-management.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-api-management.md index 6c21cb165e..9f5c44be02 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-api-management.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-api-management.md @@ -33,33 +33,34 @@ An example Pulumi program that deploys an instance of Azure API Management with ## Running the App -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Restore NPM dependencies: +1. Restore NPM dependencies: - ``` - $ npm install + ```bash + npm install ``` -1. Configure Azure location: +1. Configure Azure environment: - ``` - $ pulumi config set azure:location + ```bash + pulumi config set azure:location + pulumi config set azure:subscriptionId ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing update (dev): ... @@ -71,9 +72,9 @@ An example Pulumi program that deploys an instance of Azure API Management with Duration: 34m54s ``` -1. Check the deployed function endpoint: +1. Check the deployed function endpoint: - ``` + ```console $ pulumi stack output endpoint https://greeting-service12345678.azure-api.net/hello/Pulumi $ curl --header "Ocp-Apim-Subscription-Key: $(pulumi stack output key)" $(pulumi stack output endpoint) @@ -81,9 +82,9 @@ An example Pulumi program that deploys an instance of Azure API Management with ... ``` -1. Verify that API caches the response for 30 seconds - the same time should be returned for subsequent queries: +1. Verify that API caches the response for 30 seconds - the same time should be returned for subsequent queries: - ``` + ```console $ curl --header "Ocp-Apim-Subscription-Key: $(pulumi stack output key)" $(pulumi stack output endpoint) {"time":"2019-06-17T15:16:08.227Z","greeting":"Hello Pulumi!"} ... diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-appservice-devops.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-appservice-devops.md index 0c89562539..edb92e89ea 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-appservice-devops.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-appservice-devops.md @@ -31,51 +31,58 @@ Provisions Azure SQL Database and Azure Application Insights to be used in combi ## Running the App manually with Pulumi CLI -1. Build and publish the ASP.NET Core project: +1. Build and publish the ASP.NET Core project: - ``` - $ dotnet publish src + ```bash + dotnet publish src ``` -1. Navigate to `infra`: +1. Navigate to `infra`: - ``` - $ cd infra + ```bash + cd infra ``` -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Restore NPM dependencies: +1. Restore NPM dependencies: + ```bash + npm install ``` - $ npm install + +1. Configure target Azure environment: + + ```bash + pulumi config set azure:location + pulumi config set azure:subscriptionId ``` 1. Define SQL Server username: - ``` + ```bash pulumi config set sqlUsername ``` 1. Define SQL Server password (make it complex enough to satisfy Azure policy): - ``` + ```bash pulumi config set --secret sqlPassword ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -87,9 +94,9 @@ Provisions Azure SQL Database and Azure Application Insights to be used in combi Update duration: 1m14.59910109s ``` -1. Check the deployed website endpoint: +1. Check the deployed website endpoint: - ``` + ```console $ pulumi stack output endpoint https://dev-as10d706a2.azurewebsites.net $ curl "$(pulumi stack output endpoint)" diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-cosmosapp-component.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-cosmosapp-component.md index 5eee4a816a..cbe5060162 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-cosmosapp-component.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-cosmosapp-component.md @@ -47,36 +47,43 @@ The application has three example of using this component with the following com ## Prerequisites -1. [Install Pulumi](https://www.pulumi.com/docs/get-started/install/) -1. [Configure Azure credentials](https://www.pulumi.com/docs/intro/cloud-providers/azure/setup/) +1. [Install Pulumi](https://www.pulumi.com/docs/get-started/install/) +1. [Configure Azure credentials](https://www.pulumi.com/docs/intro/cloud-providers/azure/setup/) ## Steps ### Step 1: Create a new stack -``` -$ pulumi stack init dev +```bash +pulumi stack init dev ``` ### Step 2: Log in to the Azure CLI You will be prompted to do this during deployment if you forget this step. -``` -$ az login +```bash +az login ``` ### Step 3: Install NPM dependencies +```bash +npm install ``` -$ npm install + +### Step 4: Configure target Azure environment + +```bash +pulumi config set azure:location +pulumi config set azure:subscriptionId ``` -### Step 4: Deploy your changes +### Step 5: Deploy your changes Run `pulumi up` to preview and deploy changes: -``` +```console $ pulumi up Previewing changes: + azure-ts-cosmosapp-component-dev create @@ -89,11 +96,11 @@ Previewing changes: ... ``` -### Step 5: Check the deployed website endpoints +### Step 6: Check the deployed website endpoints Three endpoints are now available. For example, -``` +```console $ pulumi stack output functionsEndpoint http://functionscosmosfunc-rgcc15ea50.trafficmanager.net/api/cosmos @@ -107,7 +114,7 @@ Go to the Azure portal and add a document with the ID "cosmos" to receive a non- The `unittests.ts` file contains two sample unit tests that can be run with Mocha: -``` +```bash mocha -r ts-node/register unittests.ts ``` @@ -115,7 +122,7 @@ mocha -r ts-node/register unittests.ts The `policy` folder contains two sample policies that can be applied with the `policy-pack` argument: -``` +```bash pulumi up --policy-pack policy ``` diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-hdinsight-spark.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-hdinsight-spark.md index 9146190f6a..885b3d5176 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-hdinsight-spark.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-hdinsight-spark.md @@ -29,27 +29,36 @@ An example Pulumi component that deploys a Spark cluster on Azure HDInsight. ## Running the App -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Restore NPM dependencies: +1. Restore NPM dependencies: - ``` - $ npm install + ```bash + npm install ``` -1. Run `pulumi up` to preview and deploy changes: +1. Configure target Azure environment: + ```bash + pulumi config set azure:location + pulumi config set azure:subscriptionId + pulumi config set username + pulumi config set password --secret ``` + +1. Run `pulumi up` to preview and deploy changes: + + ```console $ pulumi up Previewing changes: ... @@ -61,9 +70,9 @@ An example Pulumi component that deploys a Spark cluster on Azure HDInsight. Update duration: 15m6s ``` -1. Check the deployed Spark endpoint: +1. Check the deployed Spark endpoint: - ``` + ```console $ pulumi stack output endpoint https://myspark1234abcd.azurehdinsight.net/ diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-msi-keyvault-rbac.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-msi-keyvault-rbac.md index dc874c5244..da21696a45 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-msi-keyvault-rbac.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-msi-keyvault-rbac.md @@ -39,39 +39,40 @@ The application consists of several parts: ## Running the App -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Restore NPM dependencies: +1. Restore NPM dependencies: - ``` - $ npm install + ```bash + npm install ``` -1. Build and publish the ASP.NET Core project: +1. Build and publish the ASP.NET Core project: - ``` - $ dotnet publish webapp + ```bash + dotnet publish webapp ``` -1. Set an appropriate Azure location like: +1. Configure target Azure environment: - ``` - $ pulumi config set azure:location westus + ```bash + pulumi config set azure:location + pulumi config set azure:subscriptionId ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -83,9 +84,9 @@ The application consists of several parts: Update duration: 4m16s ``` -1. Check the deployed website endpoint: +1. Check the deployed website endpoint: - ``` + ```console $ pulumi stack output endpoint https://app129968b8.azurewebsites.net/ $ curl "$(pulumi stack output endpoint)" diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-serverless-url-shortener-global.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-serverless-url-shortener-global.md index 3186b0acd7..038240f096 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-serverless-url-shortener-global.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-serverless-url-shortener-global.md @@ -29,33 +29,34 @@ Multi-region deployment of Azure Functions and Cosmos DB with Traffic Manager ## Running the App -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Restore NPM dependencies: +1. Restore NPM dependencies: - ``` - $ npm install + ```bash + npm install ``` -1. Specify the Azure regions to deploy the application: +1. Specify the Azure subscription and regions to deploy the application: - ``` - $ pulumi config set locations westus,westeurope + ```bash + pulumi config set locations westus,westeurope + pulumi config set azure:subscriptionId ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -67,9 +68,9 @@ Multi-region deployment of Azure Functions and Cosmos DB with Traffic Manager Update duration: 21m33.3252322s ``` -1. Add a short URL: +1. Add a short URL: - ``` + ```console $ pulumi stack output addEndpoint https://urlshort-add94ac80f8.azurewebsites.net/api/urlshort-add $ curl -H "Content-Type: application/json" \ @@ -79,9 +80,9 @@ Multi-region deployment of Azure Functions and Cosmos DB with Traffic Manager Short URL saved ``` -1. Query a short URL: +1. Query a short URL: - ``` + ```console $ pulumi stack output endpoint http://urlshort-tm.trafficmanager.net/api/ $ curl -L $(pulumi stack output endpoint)pulumi diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-stream-analytics.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-stream-analytics.md index 5375c94fb9..23142789ab 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-stream-analytics.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-stream-analytics.md @@ -29,33 +29,34 @@ An example Pulumi program that deploys an Azure Stream Analytics job to transfor ## Running the App -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Restore NPM dependencies: +1. Restore NPM dependencies: - ``` - $ npm install + ```bash + npm install ``` -1. Configure the location to deploy the example to: +1. Configure the Azure location and subscription to deploy the example to: - ``` - $ pulumi config set azure:location + ```bash + pulumi config set azure:location + pulumi config set azure:subscriptionId ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing update (dev): ... @@ -67,9 +68,9 @@ An example Pulumi program that deploys an Azure Stream Analytics job to transfor Update duration: 2m43s ``` -1. Use the following sample messages for testing: +1. Use the following sample messages for testing: - ``` + ```jsonc // Inputs (1 line - 1 event): {"Make":"Kia","Sales":2,"Time":"2019-06-26T10:22:36Z"} {"Make":"Kia","Sales":1,"Time":"2019-06-26T10:22:37Z"} @@ -82,9 +83,9 @@ An example Pulumi program that deploys an Azure Stream Analytics job to transfor You can send a message with a `curl` command: - ``` + ```bash curl -X POST '$(pulumi stack output inputEndpoint)' -H 'Authorization: $(pulumi stack output sasToken)' -H 'Content-Type: application/atom+xml;type=entry;charset=utf-8' -d '{"Make":"Kia","Sales":2,"Time":"2019-06-26T10:22:36Z"}' ``` -1. [Start the Stream Analytics job](https://docs.microsoft.com/en-us/azure/stream-analytics/start-job). The job will start emitting messages to the output Event Hub once per minute. The Azure Function `analytics-output` will start printing those events into the console (you'd have to open the function console in the Azure portal to see them). +1. [Start the Stream Analytics job](https://docs.microsoft.com/en-us/azure/stream-analytics/start-job). The job will start emitting messages to the output Event Hub once per minute. The Azure Function `analytics-output` will start printing those events into the console (you'd have to open the function console in the Azure portal to see them). diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-vm-provisioners.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-vm-provisioners.md index 6d78807a40..3b2cdb200b 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-vm-provisioners.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-vm-provisioners.md @@ -35,30 +35,29 @@ First, create a stack, using `pulumi stack init`. Now, we need to ensure that our dependencies are installed: +```bash +npm install ``` -$ npm install -``` - You'll need to log in to the azure cli. You will be prompted to do this during deployment if you forget this step. -``` -$ az login +```bash +az login ``` We'll need to set some config for login credentials, and location information. -``` +```bash pulumi config set azure:location westus +pulumi config set azure:subscriptionId pulumi config set username pulumi config set password --secret - ``` Next, generate an OpenSSH keypair for use with your server - as per the Azure [Requirements][1] -``` -$ ssh-keygen -t rsa -f rsa -m PEM +```bash +ssh-keygen -t rsa -f rsa -m PEM ``` This will output two files, `rsa` and `rsa.pub`, in the current directory. Be sure not to commit these files! @@ -66,9 +65,9 @@ This will output two files, `rsa` and `rsa.pub`, in the current directory. Be su We then need to configure our stack so that the public key is used by our VM, and the private key used for subsequent SCP and SSH steps to configure our server after it is stood up. -``` -$ cat rsa.pub | pulumi config set publicKey -- -$ cat rsa | pulumi config set privateKey --secret -- +```bash +cat rsa.pub | pulumi config set publicKey -- +cat rsa | pulumi config set privateKey --secret -- ``` Notice that we've used `--secret` for `privateKey`. This ensures the private key is stored as an encrypted [Pulumi secret](https://www.pulumi.com/docs/intro/concepts/secrets/). diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-vm-scaleset.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-vm-scaleset.md index c39e721561..cf7e9fd4e5 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-vm-scaleset.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-vm-scaleset.md @@ -35,42 +35,43 @@ This example provisions a Scale Set of Linux web servers with nginx deployed, co ## Running the App -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Configure the app deployment. +1. Configure the app deployment. - ``` - $ pulumi config set azure:location westus # any valid Azure region will do + ```bash + pulumi config set azure:location westus # any valid Azure region will do + pulumi config set azure:subscriptionId ``` Optionally, configure the username and password for the admin user. Otherwise, they will be auto-generated. - ``` - $ pulumi config set adminUser webmaster - $ pulumi config set adminPassword --secret + ```bash + pulumi config set adminUser webmaster + pulumi config set adminPassword --secret ``` Note that `--secret` ensures your password is encrypted safely. -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Restore NPM dependencies: +1. Restore NPM dependencies: - ``` - $ npm install + ```bash + npm install ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing update: ... @@ -82,9 +83,9 @@ This example provisions a Scale Set of Linux web servers with nginx deployed, co Update duration: 2m19s ``` -1. Check the domain name of the PIP: +1. Check the domain name of the PIP: - ``` + ```console $ pulumi stack output publicAddress dsuv3vqbgi.westeurope.cloudapp.azure.com $ curl http://$(pulumi stack output publicAddress) diff --git a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-webserver-component.md b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-webserver-component.md index f6860b831a..5eeb109d38 100644 --- a/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-webserver-component.md +++ b/themes/default/content/registry/packages/azure/how-to-guides/classic-azure-ts-webserver-component.md @@ -38,40 +38,41 @@ defining a `WebServer` class, we can hide many details (see [here](https://githu ## Running the App -1. Create a new stack: +1. Create a new stack: - ``` - $ pulumi stack init dev + ```bash + pulumi stack init dev ``` -1. Configure the deployment. The username and password here will be used to configure the Virtual Machine. The +1. Configure the deployment. The username and password here will be used to configure the Virtual Machine. The password must adhere to the [Azure restrictions on VM passwords]( https://docs.microsoft.com/en-us/azure/virtual-machines/windows/faq#what-are-the-password-requirements-when-creating-a-vm). - ``` - $ pulumi config set azure:location westus # any valid Azure region will do - $ pulumi config set username webmaster - $ pulumi config set password --secret - $ pulumi config set count 5 # optional -- will default to 2 if left out + ```bash + pulumi config set azure:location westus # any valid Azure region will do + pulumi config set azure:subscriptionId + pulumi config set username webmaster + pulumi config set password --secret + pulumi config set count 5 # optional -- will default to 2 if left out ``` Note that `--secret` ensures your password is encrypted safely. -1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): - ``` - $ az login + ```bash + az login ``` -1. Restore NPM dependencies: +1. Restore NPM dependencies: - ``` - $ npm install + ```bash + npm install ``` -1. Run `pulumi up` to preview and deploy changes: +1. Run `pulumi up` to preview and deploy changes: - ``` + ```console $ pulumi up Previewing changes: ... @@ -83,9 +84,9 @@ defining a `WebServer` class, we can hide many details (see [here](https://githu Update duration: 4m27s ``` -1. Check the resulting IP addresses: +1. Check the resulting IP addresses: - ``` + ```console $ pulumi stack output ipAddresses [ 40.112.181.239, ..., 40.112.181.240 ] ```