### Example Azure Service Principal JSON Output Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md An example JSON structure representing the output of an Azure Service Principal creation, showing the `appId` (client ID), `password` (client secret), and `tenant` (tenant ID) along with other details. ```json { "appId": "WWWWWWWW-WWWW-WWWW-WWWW-WWWWWWWWWWWW", "displayName": "ServicePrincipalName", "name": "http://ServicePrincipalName", "password": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "tenant": "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY" } ``` -------------------------------- ### Installing Azure Classic Provider - Go Source: https://github.com/pulumi/pulumi-azure/blob/master/README.md This command fetches and installs the Pulumi Azure Classic provider SDK for Go. It adds the `github.com/pulumi/pulumi-azure/sdk/v6` package to your Go modules, enabling you to programmatically interact with Azure resources. ```Go go get github.com/pulumi/pulumi-azure/sdk/v6 ``` -------------------------------- ### Installing Pulumi Azure Classic Provider (Go) Source: https://github.com/pulumi/pulumi-azure/blob/master/sdk/python/README.md This command fetches and installs the Pulumi Azure Classic provider SDK for Go. It adds the necessary Go modules to your project, allowing you to interact with Azure resources using the Pulumi Go SDK. ```bash go get github.com/pulumi/pulumi-azure/sdk/v6 ``` -------------------------------- ### Installing Node.js Dependencies (npm) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-vm-provisioners.md This command installs the necessary Node.js packages defined in the `package.json` file for the Pulumi project. It ensures all required dependencies, including `@pulumi/command`, are available before deployment. ```Shell npm install ``` -------------------------------- ### Installing Azure Classic Provider - Python Source: https://github.com/pulumi/pulumi-azure/blob/master/README.md This command installs the Pulumi Azure Classic provider package for Python projects using pip. It makes the `pulumi_azure` module available, allowing you to define and manage Azure resources in Python. ```Python pip install pulumi_azure ``` -------------------------------- ### Listing All Azure Subscriptions using Azure CLI Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md This Azure CLI command lists all available Azure subscriptions associated with the current account, displaying their names and IDs in a tab-separated value (TSV) format. ```bash az account list --query '[].{subscriptionName:name,subscriptionId:id}' -o tsv ``` -------------------------------- ### Checking Required CLI Tool Versions (Azure CLI, npm, tsc) | Bash Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-helm.md This snippet shows how to verify the installed versions of the Azure CLI, Node.js Package Manager (npm), and TypeScript compiler (tsc), which are prerequisites for running the example. ```Bash $ az --version # Azure CLI azure-cli 2.11.1 core 2.11.1 telemetry 1.0.5 ... $ npm --version # Node.js Package Manager 6.14.6 $ tsc --version # TypeScript compiler Version 4.0.2 ``` -------------------------------- ### Installing Azure Classic Provider - Node.js (npm) Source: https://github.com/pulumi/pulumi-azure/blob/master/README.md This command installs the Pulumi Azure Classic provider package for Node.js projects using npm. It adds the `@pulumi/azure` dependency to your project, allowing you to define Azure resources in TypeScript or JavaScript. ```Node.js npm install @pulumi/azure ``` -------------------------------- ### Installing Node.js Dependencies | Bash Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-helm.md This command downloads and installs all required Node.js packages and dependencies specified in the project's package.json file. ```Bash $ npm install ``` -------------------------------- ### Setting VM Username Configuration (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-webserver-component.md This command sets the username for the virtual machine that will be provisioned by the Pulumi program. This is a required input for the example. ```bash $ pulumi config set username myusername ``` -------------------------------- ### Installing Node.js Dependencies (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-webserver-component.md This command installs all necessary Node.js package dependencies defined in the project's `package.json` file. It's a standard step for preparing a Node.js-based Pulumi project for execution. ```Shell $ npm install ``` -------------------------------- ### Installing Azure Classic Provider - Node.js (Yarn) Source: https://github.com/pulumi/pulumi-azure/blob/master/README.md This command installs the Pulumi Azure Classic provider package for Node.js projects using Yarn. It adds the `@pulumi/azure` dependency to your project, enabling you to provision Azure resources with TypeScript or JavaScript. ```Node.js yarn add @pulumi/azure ``` -------------------------------- ### Installing Azure Classic Provider - .NET Source: https://github.com/pulumi/pulumi-azure/blob/master/README.md This command adds the Pulumi Azure Classic provider package to your .NET project. It integrates `Pulumi.Azure` into your project, allowing you to define and manage Azure infrastructure using C# or other .NET languages. ```.NET dotnet add package Pulumi.Azure ``` -------------------------------- ### Running Pulumi Azure Integration Tests with Go Source: https://github.com/pulumi/pulumi-azure/blob/master/CONTRIBUTING.md This command executes all integration tests for the Pulumi Azure provider. These tests create and destroy real Azure cloud resources, requiring the `ARM_ENVIRONMENT` variable to be set and Azure credentials to be configured beforehand. The command is run from the `examples` directory. ```Shell cd examples && go test -v -count=1 -cover -timeout 2h ``` -------------------------------- ### Installing Pulumi Azure Classic Provider (Python) Source: https://github.com/pulumi/pulumi-azure/blob/master/sdk/python/README.md This command installs the Pulumi Azure Classic provider package for Python projects using pip. Once installed, you can import `pulumi_azure` to define and manage Azure resources programmatically in Python. ```bash pip install pulumi_azure ``` -------------------------------- ### Installing Pulumi Azure Classic Provider with npm (Node.js) Source: https://github.com/pulumi/pulumi-azure/blob/master/sdk/python/README.md This command installs the Pulumi Azure Classic provider package for Node.js applications using npm. It adds the `@pulumi/azure` dependency to your project, allowing you to define Azure resources in TypeScript or JavaScript. ```bash npm install @pulumi/azure ``` -------------------------------- ### Installing Node.js Dependencies (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-mean.md This command installs the necessary Node.js package dependencies for the project, typically defined in `package.json`, before running the application. ```sh npm install ``` -------------------------------- ### Installing Node.js Dependencies (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-vm-scaleset.md This command installs all necessary Node.js package dependencies defined in the project's 'package.json' file. This step is crucial for preparing the Pulumi TypeScript program for execution. ```Shell $ npm install ``` -------------------------------- ### Logging in to Azure CLI for Pulumi Authentication Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md This command initiates the Azure CLI login process, typically opening a web browser for authentication. Once logged in, Pulumi automatically uses these credentials to authenticate requests to Azure, simplifying local development workflows. ```bash $ az login A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`. ``` -------------------------------- ### Tidying Go Modules for Pulumi Azure Provider Source: https://github.com/pulumi/pulumi-azure/blob/master/CONTRIBUTING.md This command ensures that the latest dependencies for the Pulumi Azure provider are installed. It is particularly useful if `make build_sdks` produces a large number of seemingly-unrelated diffs, and should be run in the `provider/` directory. ```Shell go mod tidy ``` -------------------------------- ### Installing Node.js Dependencies with NPM Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-dynamicresource.md This command installs all required Node.js package dependencies listed in the `package.json` file. These dependencies are necessary for the Pulumi TypeScript program to compile and run correctly. ```Shell $ npm install ``` -------------------------------- ### Listing Azure Subscriptions via CLI Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md This command lists all Azure subscriptions accessible by the currently logged-in Azure CLI account. It's used to identify the specific subscription ID required for setting the default subscription for Pulumi operations. ```bash az account list ``` -------------------------------- ### Installing Pulumi Azure Classic Provider with yarn (Node.js) Source: https://github.com/pulumi/pulumi-azure/blob/master/sdk/python/README.md This command installs the Pulumi Azure Classic provider package for Node.js applications using yarn. It adds the `@pulumi/azure` dependency to your project, enabling you to provision Azure resources within your TypeScript or JavaScript code. ```bash yarn add @pulumi/azure ``` -------------------------------- ### Installing Dependencies for Pulumi Azure ARM Template (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-arm-template.md This command installs the necessary Node.js dependencies for the Pulumi project, ensuring all required packages are available before deployment. It's a standard step in setting up a TypeScript-based Pulumi application. ```Shell npm install ``` -------------------------------- ### Installing Node.js Dependencies (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-appservice-springboot.md This command installs the necessary Node.js packages and dependencies for the Pulumi project, typically defined in `package.json`. These dependencies are required for the Pulumi program to run correctly. ```shell $ npm install ``` -------------------------------- ### Setting Azure Credentials via Environment Variables (Linux/macOS) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md These `export` commands set the Azure Service Principal credentials as environment variables for Linux and macOS systems. Pulumi can automatically pick up these variables for authentication. ```bash export ARM_CLIENT_ID= export ARM_CLIENT_SECRET= export ARM_TENANT_ID= export ARM_SUBSCRIPTION_ID= ``` -------------------------------- ### Installing Node.js Dependencies (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-cosmosapp-component.md This command installs all required Node.js packages and dependencies specified in the `package.json` file. These dependencies are crucial for the TypeScript Pulumi program to compile, resolve modules, and execute correctly. ```Shell $ npm install ``` -------------------------------- ### Setting Default Azure Subscription via CLI Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md This command sets the default Azure subscription for the Azure CLI, which Pulumi will then use for provisioning resources. Replace `` with the desired subscription ID obtained from `az account list`. ```bash az account set --subscription= ``` -------------------------------- ### Installing Pulumi Azure Classic Provider (.NET) Source: https://github.com/pulumi/pulumi-azure/blob/master/sdk/python/README.md This command adds the Pulumi Azure Classic provider package to your .NET project using the dotnet CLI. This enables you to define and manage Azure infrastructure using C# or other .NET languages with Pulumi. ```bash dotnet add package Pulumi.Azure ``` -------------------------------- ### Restoring NPM Dependencies (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-msi-keyvault-rbac.md This command installs all required Node.js package dependencies defined in the `package.json` file. It's necessary for TypeScript Pulumi projects. ```bash $ npm install ``` -------------------------------- ### Restoring NPM Dependencies - Shell Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-serverless-url-shortener-global.md Installs all required Node.js package dependencies defined in `package.json`. This command ensures all necessary libraries are available for the Pulumi project to compile and run. ```Shell $ npm install ``` -------------------------------- ### Setting Azure Credentials via Environment Variables (Windows PowerShell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md These PowerShell commands set the Azure Service Principal credentials as environment variables for Windows systems. Pulumi can automatically pick up these variables for authentication. ```powershell > $env:ARM_CLIENT_ID = "" > $env:ARM_CLIENT_SECRET = "" > $env:ARM_TENANT_ID = "" > $env:ARM_SUBSCRIPTION_ID = "" ``` -------------------------------- ### Restoring NPM Dependencies (CLI) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-api-management.md Installs the necessary Node Package Manager (NPM) dependencies for the Pulumi TypeScript project. This command ensures all required packages are available before attempting to deploy the infrastructure. ```Shell npm install ``` -------------------------------- ### Restoring NPM Dependencies (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-hdinsight-spark.md This command installs all required Node.js package dependencies for the Pulumi project, as specified in the `package.json` file. It ensures that all necessary libraries and tools are available before deployment. ```Shell $ npm install ``` -------------------------------- ### Setting Azure Credentials with Pulumi Configuration Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md These commands configure the Azure provider credentials directly within a Pulumi project using `pulumi config set`. The client secret is marked as `--secret` for encryption, ensuring sensitive data is protected. ```bash $ pulumi config set azure:clientId $ pulumi config set azure:clientSecret --secret $ pulumi config set azure:tenantId $ pulumi config set azure:subscriptionId ``` -------------------------------- ### Testing Kubernetes Cluster Access (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-aks.md Sets the KUBECONFIG environment variable to point to the exported configuration file and then uses 'kubectl get nodes' to verify connectivity and list the nodes in the AKS cluster. ```bash $ KUBECONFIG=./kubeconfig.yaml kubectl get nodes ``` -------------------------------- ### Importing Pulumi ESC Environment into Stack Settings Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md This YAML snippet demonstrates how to update a Pulumi stack settings file (`Pulumi..yaml`) to import a previously defined Pulumi ESC environment. This enables the stack to utilize the dynamically generated credentials and configurations defined in the ESC environment. ```yaml environment: - ``` -------------------------------- ### Deploying Azure Resources with Pulumi (CLI) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-go-webserver-component.md This command previews and then deploys the infrastructure defined by the Pulumi program to Azure. It shows a summary of planned changes before execution and then reports the outcome of the deployment, including the number of resources created. ```bash pulumi up ``` -------------------------------- ### Initializing Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-webserver-component.md This command initializes a new Pulumi stack, which serves as an isolated environment for your project's resources. It creates necessary configuration files in your project directory. ```bash $ pulumi stack init ``` -------------------------------- ### Previewing and Deploying Pulumi Changes Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-webserver.md Executes the `pulumi up` command to preview and deploy the infrastructure changes defined in the Pulumi program. This step creates or updates the Azure resources. ```bash $ pulumi up ``` -------------------------------- ### Deploying Pulumi Stack and Observing Output Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-webserver.md Runs `pulumi up` to apply infrastructure changes and displays the deployment progress and summary, including the number of resources created. This confirms the successful provisioning of the Azure VM. ```bash $ pulumi up Previewing changes: ... Performing changes: ... 7 resources created ``` -------------------------------- ### Initializing a Pulumi Azure JavaScript Project Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/container-webserver.md This snippet demonstrates how to create a new directory for the project and initialize a new Pulumi project specifically for Azure using JavaScript. It sets up the basic project structure and configuration files. ```Bash $ mkdir webserver && cd webserver $ pulumi new azure-javascript ``` -------------------------------- ### Configuring OIDC Environment Variables in Pulumi ESC Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md This YAML snippet demonstrates how to define Azure OIDC login parameters within a Pulumi ESC environment and project them as environment variables (e.g., `ARM_USE_OIDC`, `ARM_CLIENT_ID`) for dynamic credential generation, centralizing configuration management. ```yaml values: azure: login: fn::open::azure-login: clientId: tenantId: subscriptionId: oidc: true environmentVariables: ARM_USE_OIDC: 'true' ARM_CLIENT_ID: ${azure.login.clientId} ARM_TENANT_ID: ${azure.login.tenantId} ARM_OIDC_TOKEN: ${azure.login.oidc.token} ARM_SUBSCRIPTION_ID: ${azure.login.subscriptionId} ``` -------------------------------- ### Deploying Azure Resources with Pulumi (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-webserver-component.md This command previews and deploys the infrastructure defined in the Pulumi program. It displays a detailed plan of resources to be created, updated, or deleted, and prompts for confirmation before proceeding with the deployment. ```bash $ pulumi up Previewing update (dev): Type Name Plan + pulumi:pulumi:Stack azure-py-webserver-component-dev create + ├─ custom:app:WebServer server create + │ ├─ azure:network:PublicIp server-ip create + │ ├─ azure:network:NetworkInterface server-nic create + │ └─ azure:compute:VirtualMachine server-vm create + └─ azure:core:ResourceGroup server create + └─ azure:network:VirtualNetwork server-network create + └─ azure:network:Subnet server-subnet create Resources: + 8 to create Do you want to perform this update? yes Updating (dev): Type Name Status + pulumi:pulumi:Stack azure-py-webserver-component-dev created + ├─ custom:app:WebServer server created + │ ├─ azure:network:PublicIp server-ip created + │ ├─ azure:network:NetworkInterface server-nic created + │ └─ azure:compute:VirtualMachine server-vm created + └─ azure:core:ResourceGroup server created + └─ azure:network:VirtualNetwork server-network created + └─ azure:network:Subnet server-subnet created Outputs: public_ip: "13.64.196.146" Resources: + 8 created Duration: 2m9s ``` -------------------------------- ### Retrieving Kubeconfig and Verifying Cluster (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-with-diagnostics.md These commands retrieve the generated `kubeconfig` file from the Pulumi stack outputs, saving it to `kubeconfig.yaml`. Subsequently, `kubectl get namespaces` is used to verify connectivity and list namespaces within the newly deployed Kubernetes cluster. ```bash $ pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml $ kubectl get namespaces ``` -------------------------------- ### Initializing Pulumi Stack (CLI) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-go-webserver-component.md This command initializes a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program. It's a prerequisite for deploying resources. ```bash pulumi stack init dev ``` -------------------------------- ### Deploying Pulumi Stack Resources Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-botservice.md This command executes the Pulumi program, previewing and then deploying the defined infrastructure changes to Azure. It shows a summary of resources to be created, updated, or deleted, and then performs the actual deployment. ```bash $ pulumi up Previewing changes: ... Performing changes: ... info: 14 changes performed: + 14 resources created Update duration: 1m22s ``` -------------------------------- ### Deploying Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-vm-scaleset.md Previews and deploys the infrastructure changes defined in the Pulumi program. It shows a summary of resources to be created, updated, or deleted before proceeding with the deployment. ```Bash pulumi up ``` -------------------------------- ### Deploying Azure Resources with Pulumi (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-appservice.md This command previews and deploys the infrastructure defined in the Pulumi program. It shows a summary of changes (creations, updates, deletions) and then performs them, provisioning the cloud resources. ```bash $ pulumi up Previewing changes: ... Performing changes: ... info: 10 changes performed: + 10 resources created Update duration: 1m14.59910109s ``` -------------------------------- ### Building and Publishing ASP.NET Core Project (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-msi-keyvault-rbac.md This command builds and publishes the ASP.NET Core project located in the `webapp` directory. It prepares the application for deployment by compiling it and collecting all necessary files into a publish folder. ```Bash $ dotnet publish webapp ``` -------------------------------- ### Deploying Infrastructure with Pulumi Up (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-webserver-component.md This command previews and then deploys the infrastructure defined by the Pulumi program. It shows a summary of changes before execution and then performs the resource creation, providing real-time updates on the deployment progress and duration. ```Shell $ pulumi up Previewing changes: ... Performing changes: ... info: 15 changes performed: + 15 resources created Update duration: 4m27s ``` -------------------------------- ### Restoring NPM Dependencies (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-stream-analytics.md This command installs all required Node Package Manager (NPM) dependencies for the Pulumi project, ensuring that all necessary libraries and modules are available for execution. ```Shell $ npm install ``` -------------------------------- ### Previewing Pulumi Deployment Changes Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/container-webserver.md This snippet shows the console output when running `pulumi up` to preview the infrastructure changes. It lists the resources that Pulumi plans to create, update, or delete, allowing for review before actual deployment. ```Bash $ pulumi up Previewing update (azurewebserver-dev): Type Name Plan + pulumi:pulumi:Stack azurewebserver-azurewebserver-dev create + ├─ azure:core:ResourceGroup webserver create + └─ azure:containerservice:Group nginx create Resources: + 3 to create ``` -------------------------------- ### Previewing and Deploying Pulumi Changes (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-aci.md This command first previews the infrastructure changes that Pulumi will make, then proceeds to deploy them to Azure. It provides a summary of resources to be created, updated, or deleted before execution. ```bash $ pulumi up Previewing changes: ... Performing changes: ... info: 55 changes performed: + 10 resources created Update duration: 1m56s ``` -------------------------------- ### Verifying Web Server Accessibility (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-webserver-component.md This command uses `curl` to send an HTTP request to the public IP address of the deployed web server. It verifies that the server is running and accessible, expecting to receive 'Hello, World!' as a response. ```bash $ curl http://$(pulumi stack output public_ip) Hello, World! ``` -------------------------------- ### Authenticating with Azure CLI (CLI) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-go-webserver-component.md This command initiates the Azure CLI login process, prompting the user to authenticate with their Azure account. This step is necessary to allow Pulumi to provision resources in Azure on behalf of the user. ```bash az login ``` -------------------------------- ### Deploying Pulumi Stack Changes Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-vm-scaleset.md This command previews and deploys the infrastructure defined in the Pulumi program. It shows a summary of changes before execution and then applies them, creating or updating resources in Azure. The output indicates the number of resources created. ```Bash pulumi up Previewing changes: ... Performing changes: ... 7 resources created ``` -------------------------------- ### Retrieving Current Azure Subscription ID using Azure CLI Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md This Azure CLI command queries the currently active Azure account and extracts its subscription ID, formatted as a tab-separated value (TSV). ```bash az account show --query id -o tsv ``` -------------------------------- ### Executing Pulumi Deployment and Viewing Outputs Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/container-webserver.md This snippet displays the console output after confirming a `pulumi up` deployment. It confirms the successful creation of resources and shows the stack outputs, such as the public IP address of the deployed container. ```Bash Do you want to perform this update? yes Updating (azurewebserver-dev): Type Name Status + pulumi:pulumi:Stack azurewebserver-azurewebserver-dev created + ├─ azure:core:ResourceGroup webserver created + └─ azure:containerservice:Group nginx created Outputs: publicIP: "13.66.202.166" Resources: + 3 created Duration: 10s Permalink: https://app.pulumi.com/lukehoban/azurewebserver-dev/updates/51 ``` -------------------------------- ### Deploying AKS Cluster Natively (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-aks.md Initiates the Pulumi deployment process directly, without using a Makefile. The '--yes' flag automatically confirms any prompts, provisioning the AKS cluster. ```bash $ pulumi up --yes ``` -------------------------------- ### Building and Publishing ASP.NET Core Project (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-msi-keyvault-rbac.md This command builds and publishes the ASP.NET Core web application located in the `webapp` directory. This prepares the application for deployment. ```bash $ dotnet publish webapp ``` -------------------------------- ### Setting Azure Environment Configuration (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-webserver-component.md This command configures the Azure environment for the Pulumi project to 'public', ensuring that resources are deployed to the public Azure cloud. ```bash $ pulumi config set azure:environment public ``` -------------------------------- ### Deploying Pulumi Stack Changes (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-msi-keyvault-rbac.md This command executes the Pulumi program, previewing and then deploying the infrastructure changes defined in the code. It shows a summary of resources to be created, updated, or deleted, and then performs the actual deployment. ```Bash $ pulumi up Previewing changes: ... Performing changes: ... info: 15 changes performed: + 15 resources created Update duration: 4m16s ``` -------------------------------- ### Initializing Pulumi Stack Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-botservice.md This command initializes a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program, used to manage different environments (e.g., dev, staging, prod). ```bash $ pulumi stack init dev ``` -------------------------------- ### Deploying Azure HDInsight Spark Cluster (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-hdinsight-spark.md This command executes the Pulumi program, first previewing and then applying the infrastructure changes to deploy the Spark HDInsight cluster. It reports the creation of resources and the total deployment duration, indicating a successful provisioning process. ```Bash $ pulumi up Previewing changes: ... Performing changes: ... info: 5 changes performed: + 5 resources created Update duration: 15m6s ``` -------------------------------- ### Restoring Node.js Dependencies Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-appservice-devops.md This command installs the necessary Node.js package dependencies defined in `package.json` for the Pulumi program. It's a standard step before running TypeScript-based Pulumi projects. ```Shell npm install ``` -------------------------------- ### Initializing Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-appservice.md This command initializes a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program, used to manage a set of cloud resources. ```bash $ pulumi stack init dev ``` -------------------------------- ### Deploying Infrastructure with Pulumi (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-cosmosapp-component.md This command executes the Pulumi program, previewing and then deploying the defined infrastructure changes to Azure. It shows a summary of resources to be created, updated, or deleted. ```Shell $ pulumi up Previewing changes: + azure-cs-cosmosapp-component-dev create + examples:azure:CosmosApp vms create + azure:network:VirtualNetwork vnet-westeurope create + azure:network:PublicIp pip-westeurope create + azure:trafficmanager:Profile tmvms create + azure:trafficmanager:Endpoint tmvmswesteurope create + azure:cosmosdb:Account cosmos-vms ... ``` -------------------------------- ### Publishing ASP.NET Core Project (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-msi-keyvault-rbac.md Builds and publishes the ASP.NET Core 'webapp' project. This command compiles the application and prepares it for deployment, typically creating a self-contained directory with all necessary binaries. ```Shell $ dotnet publish webapp ``` -------------------------------- ### Initializing Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-go-aks-multicluster.md This command initializes a new Pulumi stack, which serves as an isolated deployment target for the project. It creates a new stack configuration file, preparing the environment for resource deployment. ```bash pulumi stack init ``` -------------------------------- ### Initializing Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-vm-scaleset.md Initializes a new Pulumi stack named 'dev' for managing infrastructure resources. This command creates a new stack configuration file. ```Bash pulumi stack init dev ``` -------------------------------- ### Configuring OIDC Pulumi Config Values in ESC Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/installation-configuration.md This YAML snippet shows how to define Azure OIDC login parameters and other Pulumi configuration values directly under a `pulumiConfig` block within a Pulumi ESC environment. This ensures these values are scoped specifically to Pulumi runs and can be referenced within the Pulumi program code. ```yaml values: azure: login: fn::open::azure-login: clientId: tenantId: subscriptionId: oidc: true pulumiConfig: azure:useOidc: 'true' azure:location: WestUS2 azure:environment: azure:clientId: ${azure.login.clientId} azure:tenantId: ${azure.login.tenantId} azure:subscriptionId: ${azure.login.subscriptionId} azure:oidcToken: ${azure.login.oidc.token} ``` -------------------------------- ### Inspect Pulumi Stack Resources and Outputs Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/container-webserver.md This snippet illustrates the output of the `pulumi stack` command, which provides a summary of the resources currently managed by the active Pulumi stack and lists any defined stack outputs, such as the public IP address of the deployed container. ```Bash $ pulumi stack ... Current stack resources (4): TYPE NAME pulumi:pulumi:Stack azurewebserver-azurewebserver-dev pulumi:providers:azure default azure:core/resourceGroup:ResourceGroup webserver azure:containerservice/group:Group nginx Current stack outputs (1): OUTPUT VALUE publicIP 13.66.202.166 ``` -------------------------------- ### Deploying Azure Resources with Pulumi (CLI) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-api-management.md Executes the Pulumi program to preview and deploy the defined Azure resources. This command shows a summary of changes before applying them and then provisions the resources in Azure, reporting creation status and duration. ```Shell pulumi up Previewing update (dev): ... Updating (dev): ... Resources: + 12 created Duration: 34m54s ``` -------------------------------- ### Building and Publishing ASP.NET Core Project Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-appservice-devops.md This command builds and publishes the ASP.NET Core project located in the `src` directory, preparing it for deployment. It's a prerequisite step before deploying the application to Azure. ```Shell dotnet publish src ``` -------------------------------- ### Initializing Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-msi-keyvault-rbac.md This command initializes a new Pulumi stack named `dev`. A stack is an isolated, independently configurable instance of a Pulumi program. This is the first step in deploying a Pulumi application. ```Bash $ pulumi stack init dev ``` -------------------------------- ### Initializing Pulumi Stack for Development (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-hdinsight-spark.md This command initializes a new Pulumi stack named 'dev'. A stack represents an isolated deployment target for a Pulumi program, allowing for separate environments (e.g., dev, staging, prod) with distinct configurations and resources. ```Bash $ pulumi stack init dev ``` -------------------------------- ### Listing Makefile Targets (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-aks.md Displays a list of all available targets and their descriptions defined within the project's Makefile, providing an overview of automated operations. ```bash $ make help ``` -------------------------------- ### Building Pulumi Azure SDKs with Make Source: https://github.com/pulumi/pulumi-azure/blob/master/CONTRIBUTING.md This command is used to generate and check in the SDKs for the Pulumi Azure provider. It should be run from the root of the repository after any code changes, such as adding a new resource to `resources.go`. ```Shell make build_sdks ``` -------------------------------- ### Authenticating with Azure CLI (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-appservice.md This command initiates the Azure CLI login process, prompting the user to authenticate with their Azure account. It is a prerequisite for Pulumi to provision resources in Azure. ```bash $ az login ``` -------------------------------- ### Configuring Azure VM Deployment Parameters (CLI) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-go-webserver-component.md These commands configure various parameters for the Azure Virtual Machine deployment. `azure:location` sets the Azure region, `username` and `password` define VM login credentials (password is marked as secret for encryption), and `count` specifies the number of web servers to provision. The password must meet Azure VM password requirements. ```bash pulumi config set azure:location westus pulumi config set username webmaster pulumi config set password --secret pulumi config set count 5 ``` -------------------------------- ### Logging into Azure CLI Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-vm-provisioners.md This command initiates the Azure CLI login process, prompting the user to authenticate with their Azure account. It is a prerequisite for Pulumi to provision resources in Azure. ```Shell az login ``` -------------------------------- ### Authenticating to Azure CLI Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-vm-scaleset.md This command initiates the Azure CLI login process, prompting the user to authenticate their Azure account. It is a prerequisite for deploying resources to Azure using Pulumi. ```Bash az login ``` -------------------------------- ### Logging into Azure CLI Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-webserver.md This command authenticates the user with Azure, allowing Pulumi to manage Azure resources. It's a prerequisite for deploying Azure infrastructure. ```bash $ az login ``` -------------------------------- ### Initializing a Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-aci.md This command initializes a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program, allowing for multiple deployments of the same infrastructure. ```bash $ pulumi stack init dev ``` -------------------------------- ### Deploying AKS Cluster using Makefile (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-aks.md Executes the 'deploy' target defined in the project's Makefile. This command typically builds the F# project and runs 'pulumi up -y' to provision the AKS cluster and associated resources. ```bash $ make deploy ``` -------------------------------- ### Initializing a Pulumi Stack for Development (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-cosmosapp-component.md This command initializes a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program. This is the first step in deploying infrastructure. ```Shell $ pulumi stack init dev ``` -------------------------------- ### Setting Pulumi configuration and logging into Azure Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-arm-template.md These commands set the required configuration variables for the Pulumi program, specifying the Azure environment and location for resource deployment. The `az login` command then authenticates your Pulumi CLI with your Azure account. ```bash $ pulumi config set azure:environment public $ pulumi config set azure:location westus2 $ az login ``` -------------------------------- ### Publishing .NET Bot to Publish Folder Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-botservice.md This command publishes the .NET bot application to a subfolder named 'publish'. This step is a prerequisite for deploying the bot with Pulumi, ensuring the compiled bot code is ready for deployment. ```bash $ dotnet publish -o publish ``` -------------------------------- ### Deploying Azure Resources with Pulumi (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-with-diagnostics.md This command initiates the deployment of all defined Azure resources, including the Active Directory service principal, the AKS cluster, and the enabling of diagnostics for the cluster. Pulumi performs a preview and then prompts for confirmation before provisioning. ```bash $ pulumi up ``` -------------------------------- ### Performing the Pulumi deployment Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-arm-template.md This command executes the Pulumi program, performing the actual deployment of resources defined in your project. It displays a summary of changes (resources to be created, updated, or deleted) and then applies them, creating the specified Azure resources. ```sh $ pulumi up Updating stack 'azure-arm-dev' Performing changes: Type Name Status + pulumi:pulumi:Stack azure-arm--azure-arm-dev created + ├─ azure:core:ResourceGroup rg created + └─ azure:core:ResourceGroupTemplateDeployment arm-dep created Outputs: storageAccountName: "abevrwebgje2wstorage" Resources: + 3 created Duration: 1m8s ``` -------------------------------- ### Deploying Infrastructure with Pulumi (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-msi-keyvault-rbac.md Executes the Pulumi program to preview and deploy infrastructure changes. This command shows a detailed plan of operations before applying them, and then performs the actual resource creation, updates, or deletions. ```Shell $ pulumi up Previewing changes: ... Performing changes: ... info: 15 changes performed: + 15 resources created Update duration: 4m16s ``` -------------------------------- ### Logging into Azure CLI (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-msi-keyvault-rbac.md This command initiates the Azure CLI login process, authenticating the user's account with Azure Active Directory. It is a prerequisite for deploying resources to Azure using Pulumi. ```Bash $ az login ``` -------------------------------- ### Initializing Pulumi Stack (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-webserver-component.md This command initializes a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program, allowing for multiple deployments (e.g., dev, staging, prod) of the same infrastructure. ```Shell $ pulumi stack init dev ``` -------------------------------- ### Initializing a Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-multicluster.md This command initializes a new Pulumi stack, which serves as an isolated deployment target for the project. It creates a `Pulumi.yaml` file and a `Pulumi..yaml` file in the project directory. ```Bash $ pulumi stack init ``` -------------------------------- ### Initializing a new Pulumi stack Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-arm-template.md This command initializes a new Pulumi stack, prompting for a stack name. Stacks are isolated environments for your Pulumi project, allowing you to manage different deployments (e.g., dev, staging, prod) of the same project. ```sh $ pulumi stack init Enter a stack name: azure-arm-dev ``` -------------------------------- ### Building and Publishing Azure Functions Project (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-cosmosapp-component.md This command builds and publishes the Azure Functions project located in the 'app' directory. This prepares the function app for deployment by compiling and packaging it. ```Shell $ dotnet publish app ``` -------------------------------- ### Configuring Kubectl and Listing Kubernetes Services | Bash Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-helm.md These commands retrieve the Kubernetes configuration from Pulumi, save it to a file, and then use 'kubectl' to list all services running within the newly provisioned AKS cluster. ```Bash $ pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml $ KUBECONFIG=./kubeconfig.yaml kubectl get service ``` -------------------------------- ### Initializing a New Pulumi Stack - Shell Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-serverless-url-shortener-global.md Initializes a new Pulumi stack named 'dev' for managing infrastructure resources. This command creates a new stack configuration file in the current directory, preparing for deployment. ```Shell $ pulumi stack init dev ``` -------------------------------- ### Deploying Azure Resources with Pulumi (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-multicluster.md This command executes the Pulumi program, provisioning all the necessary Azure resources as defined in the project. This includes creating an Active Directory service principal and the specified Azure Kubernetes Service (AKS) clusters. ```Bash $ pulumi up ``` -------------------------------- ### Deploying Azure Resources with Pulumi Up Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-appservice-devops.md This command previews and then deploys the infrastructure defined in the Pulumi program to Azure. It shows the planned changes before execution and then performs the resource creation and updates. ```Shell pulumi up Previewing changes: ... Performing changes: ... info: 10 changes performed: + 10 resources created Update duration: 1m14.59910109s ``` -------------------------------- ### Deploying Pulumi Changes with `pulumi up` Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-dynamicresource.md This command previews and deploys the infrastructure changes defined in the Pulumi program to Azure. It shows a summary of planned actions (create, update, delete) and then proceeds to apply them, reporting the duration of the update. ```Shell $ pulumi up Previewing changes: ... Performing changes: ... ... Update duration: ... ``` -------------------------------- ### Initializing New Pulumi Stack | Bash Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-helm.md This command creates a new Pulumi stack, which serves as an isolated deployment target for the project's resources. ```Bash $ pulumi stack init ``` -------------------------------- ### Deploying Pulumi Stack Changes (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-msi-keyvault-rbac.md This command previews and deploys the infrastructure changes defined in the Pulumi program to Azure. It shows a summary of resources to be created, updated, or deleted. ```bash $ pulumi up Previewing changes: ... Performing changes: ... info: 15 changes performed: + 15 resources created Update duration: 4m16s ``` -------------------------------- ### Verifying Web Server Accessibility Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-cs-vm-scaleset.md This command uses `curl` to make an HTTP request to the deployed web server's IP address, which is dynamically retrieved using `pulumi stack output IpAddress`. It verifies that the web server is running and accessible, expecting a 'Hello, World' response. ```Bash curl http://$(pulumi stack output IpAddress) Hello, World By ! ``` -------------------------------- ### Initializing a Pulumi Stack (CLI) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-api-management.md Initializes a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program, allowing for multiple deployments of the same project. ```Shell pulumi stack init dev ``` -------------------------------- ### Initializing Pulumi Stack Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-keda.md This command initializes a new Pulumi stack, which serves as an isolated deployment target for the current project. It creates the necessary state file for managing resources. ```bash $ pulumi stack init ``` -------------------------------- ### Initializing a New Pulumi Stack (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-arm-template.md This command initializes a new Pulumi stack, which is an isolated environment for your infrastructure. It prompts the user to enter a name for the new stack, typically used for different deployment environments like 'dev' or 'prod'. ```Shell $ pulumi stack init Enter a stack name: azure-arm-dev ``` -------------------------------- ### Initializing a Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-with-diagnostics.md This command initializes a new, isolated Pulumi stack. A stack represents an independent deployment target for your infrastructure, allowing for separate development, staging, and production environments. ```bash $ pulumi stack init ``` -------------------------------- ### Initializing Helm v2 and Adding KedaCore Repository Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-keda.md This snippet initializes Helm v2 in client-only mode, adds the KedaCore Helm chart repository, and updates the local Helm chart cache. These steps are prerequisites for deploying KEDA-related charts. ```bash $ helm init --client-only $ helm repo add kedacore https://kedacore.github.io/charts $ helm repo update ``` -------------------------------- ### Deploying Azure Resources with Pulumi (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-appservice-springboot.md This command initiates the Pulumi deployment process. It previews the infrastructure changes that will be made (creating a stack, Docker image, resource group, container registry, app service plan, and app service) and then prompts for confirmation to apply them to Azure. ```shell $ pulumi up Previewing changes: + pulumi:pulumi:Stack jenkins-tutorial-dev create + docker:image:Image spring-boot-greeting-app create + azure:core:ResourceGroup jenkins-tutorial-group create + azure:containerservice:Registry myacr create + azure:appservice:Plan appservice-plan create + azure:appservice:AppService spring-boot-greeting-app create + pulumi:pulumi:Stack jenkins-tutorial-dev create ... ``` -------------------------------- ### Initializing a New Pulumi Stack (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-cosmosapp-component.md This command initializes a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program, representing a specific deployment environment. This is the initial step before deploying any resources. ```Shell $ pulumi stack init dev ``` -------------------------------- ### Authenticating with Azure CLI (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-py-hdinsight-spark.md This command prompts the user to log in to their Azure account via the Azure CLI. Successful authentication is a prerequisite for Pulumi to provision and manage resources within the user's Azure subscription. ```Bash $ az login ``` -------------------------------- ### Initializing a Pulumi Stack (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-mean.md This command initializes a new Pulumi stack, which is an isolated environment for your project's resources. It prompts the user to enter a name for the new stack. ```sh $ pulumi stack init Enter a stack name: azure-mean ``` -------------------------------- ### Deploying Azure Resources and Helm Chart with Pulumi | Bash Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-aks-helm.md This command provisions all necessary Azure resources, including an Active Directory service principal and an AKS cluster, and then deploys the Apache Helm Chart in a single operation. ```Bash $ pulumi up ``` -------------------------------- ### Deploying Azure Resources with Pulumi (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-go-aks-multicluster.md This command deploys all the necessary Azure resources, including an Active Directory service principal and multiple AKS clusters, as defined by the Pulumi program. It provisions the infrastructure in the cloud according to the Go code. ```bash pulumi up ``` -------------------------------- ### Deploying Pulumi Stack Changes - Shell Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-serverless-url-shortener-global.md Executes the Pulumi program to preview and deploy infrastructure changes to Azure. It shows a summary of resources to be created, updated, or deleted, and then performs the changes, providing real-time progress. ```Shell $ pulumi up Previewing changes: ... Performing changes: ... info: 23 changes performed: + 23 resources created Update duration: 21m33.3252322s ``` -------------------------------- ### Initializing Pulumi Stack for Azure CDN Custom Domain Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-dynamicresource.md This command initializes a new Pulumi stack named `azure-cdn-custom-domain`. A stack is an isolated, independently configurable instance of a Pulumi program, used here to manage the Azure CDN custom domain resources. ```Shell $ pulumi stack init azure-cdn-custom-domain ``` -------------------------------- ### Authenticating with Azure CLI (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-webserver-component.md This command initiates the Azure CLI login process, which is required for Pulumi to authenticate and provision resources in your Azure account. You will be prompted to complete the authentication flow in your browser. ```Shell $ az login ``` -------------------------------- ### Initializing a Pulumi Stack (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-msi-keyvault-rbac.md This command initializes a new Pulumi stack named `dev`. A stack is an isolated, independently configurable instance of a Pulumi program. ```bash $ pulumi stack init dev ``` -------------------------------- ### Initializing a Pulumi Stack (Shell) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-ts-vm-scaleset.md This command creates a new Pulumi stack named 'dev'. A stack is an isolated, independently configurable instance of a Pulumi program, allowing for multiple deployments of the same infrastructure. ```Shell $ pulumi stack init dev ``` -------------------------------- ### Logging into Azure CLI (Bash) Source: https://github.com/pulumi/pulumi-azure/blob/master/docs/how-to-guides/classic-azure-fs-aci.md This command prompts the user to log in to the Azure CLI. Authentication with Azure is a prerequisite for Pulumi to manage resources within your Azure subscription. ```bash $ az login ```