Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions content/docs/iac/get-started/aws/begin.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ aliases:
- /docs/clouds/aws/get-started/begin/
---

## Install Pulumi

Download and install Pulumi for your platform:

{{< install-pulumi >}}
{{% notes info %}}
All Windows examples in this tutorial assume you are running in PowerShell.
{{% /notes %}}
{{< /install-pulumi >}}
{{< get-started-install-body >}}

{{< get-started-stepper >}}
52 changes: 51 additions & 1 deletion content/docs/iac/get-started/azure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,56 @@ aliases:
- /docs/clouds/azure/get-started/
---

{{< cloud-intro "Microsoft Azure" >}}
**Infrastructure as code (IaC)** lets you deploy, change, and manage infrastructure safely, consistently,
and repeatably using code rather than a graphical user interface.

Complete this step-by-step tutorial to deploy an Azure Blob Storage-based website using IaC.

## Before you begin

First, choose your language and ensure you've performed any prerequisites:

{{< chooser language "typescript,python,go,csharp,java,yaml" / >}}

{{% choosable language "typescript" %}}

* An <a href="https://azure.microsoft.com/free" target="_blank">Azure account</a>
* <a href="https://nodejs.org/en/download" target="_blank">Node.js</a> and <a href="https://www.npmjs.com/package/npm" target="_blank">npm</a> installed locally

{{% /choosable %}}

{{% choosable language "python" %}}

* An <a href="https://azure.microsoft.com/free" target="_blank">Azure account</a>
* <a href="https://www.python.org/downloads/" target="_blank">Python</a> and <a href="https://pip.pypa.io/en/stable/installation/">pip</a>, <a href="https://python-poetry.org/docs/" target="_blank">Poetry</a> or <a href="https://docs.astral.sh/uv/getting-started/installation/" target="_blank">uv</a> installed locally

{{% /choosable %}}

{{% choosable language "go" %}}

* An <a href="https://azure.microsoft.com/free" target="_blank">Azure account</a>
* <a href="https://go.dev/doc/install" target="_blank">Go</a> installed locally

{{% /choosable %}}

{{% choosable language "csharp" %}}

* An <a href="https://azure.microsoft.com/free" target="_blank">Azure account</a>
* <a href="https://dotnet.microsoft.com/en-us/download/dotnet" target="_blank">.NET</a> installed locally

{{% /choosable %}}

{{% choosable language "java" %}}

* An <a href="https://azure.microsoft.com/free" target="_blank">Azure account</a>
* <a href="https://www.oracle.com/java/technologies/downloads/" target="_blank">Java 11+</a> and <a href="https://maven.apache.org/install.html" target="_blank">Maven 3.6.1+</a> installed locally

{{% /choosable %}}

{{% choosable language "yaml" %}}

* <a href="https://azure.microsoft.com/free" target="_blank">An Azure account</a>

{{% /choosable %}}

{{< get-started-stepper >}}
77 changes: 5 additions & 72 deletions content/docs/iac/get-started/azure/begin.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title_tag: Before You Begin | Azure
title_tag: Install Pulumi | Azure
meta_desc: This page provides an overview on how to get started with Pulumi when starting an Azure project.
title: Before you begin
h1: "Pulumi & Azure: Before you begin"
title: Install Pulumi
h1: "Get started with Pulumi and Azure"
stepper_link: "I'm ready to begin"
weight: 2
menu:
iac:
Expand All @@ -18,74 +19,6 @@ aliases:
- /docs/clouds/azure/get-started/begin/
---

Before you get started using Pulumi, let's run through a few quick steps to ensure your environment is set up correctly.

### Install Pulumi

{{< install-pulumi >}}
{{% notes "info" %}}
All Windows examples in this tutorial assume you are running in PowerShell.
{{% /notes %}}
{{< /install-pulumi >}}

Next, install the required language runtime, if you have not already.

### Install Language Runtime

#### Choose Your Language

{{< chooser language "typescript,python,go,csharp,java,yaml" / >}}

{{% choosable language "typescript" %}}
{{< install-node >}}
{{% /choosable %}}

{{% choosable language python %}}
{{< install-python >}}
{{% /choosable %}}

{{% choosable language go %}}
{{< install-go >}}
{{% /choosable %}}

{{% choosable language "csharp,fsharp,visualbasic" %}}
{{< install-dotnet >}}
{{% /choosable %}}

{{% choosable language java %}}
{{< install-java >}}
{{% /choosable %}}

{{% choosable language yaml %}}
{{< install-yaml >}}
{{% /choosable %}}

Finally, configure Pulumi with Microsoft Azure.

### Configure Pulumi to access your Microsoft Azure account

Pulumi requires cloud credentials to manage and provision resources. Pulumi can authenticate to Azure using a user account or service principal that has **Programmatic access** with rights to deploy and manage your Azure resources.

{{% notes type="info" %}}
Pulumi relies on the Azure SDK to authenticate requests from your computer to Azure. Your credentials are never sent to pulumi.com.
{{% /notes %}}

In this guide, you will need a user account with permissions to create and populate Blob storage containers and provide anonymous access to a Blob file.

When developing locally, we recommend that you install the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) and then authorize access with a user account.

```bash
az login
```

After successfully logging in, you are ready to go.

{{% notes type="info" %}}
The Azure CLI, and thus Pulumi, will use the default subscription for the account. You can change the active subscription with the [`az account set`](https://docs.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest#az_account_set) command.
{{% /notes %}}

For additional information on authenticating with Azure, or to login with a service principal, see [Azure Setup](/registry/packages/azure-native/installation-configuration/).

Next, you'll create a new Pulumi project.
{{< get-started-install-body >}}

{{< get-started-stepper >}}
96 changes: 96 additions & 0 deletions content/docs/iac/get-started/azure/configure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title_tag: Configure access | Azure
title: Configure access
h1: "Get started with Pulumi & Azure"
meta_desc: This page provides an overview on how to get started with Pulumi when starting an Azure project.
weight: 3
menu:
iac:
name: Configure access
parent: azure-get-started
weight: 3

aliases:
- /docs/quickstart/azure/configure/
- /docs/clouds/azure/get-started/configure/
---

## Configure access to Azure

Pulumi's CLI needs access to your Azure account to manage cloud resources.

If you've already <a href="https://learn.microsoft.com/en-us/cli/azure/install-azure-cli" target="_blank">installed</a> and <a href="https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli" target="_blank">configured</a> the Azure CLI, Pulumi will respect and use your configuration settings.

You must use an Azure account that has rights to deploy and manage resources, such as storage accounts and blob containers.

### Testing access

To test that your Azure access is configured properly, run:

{{% choosable os "linux,macos" %}}

```bash
$ az account show
```

{{% /choosable %}}

{{% choosable os "windows" %}}

```powershell
> az account show
```

{{% /choosable %}}

If your Azure subscription details are printed, you are good to go. If not, read on:

```json
{
"environmentName": "AzureCloud",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"isDefault": true,
"name": "My Subscription",
"state": "Enabled",
"tenantId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"user": {
"name": "[email protected]",
"type": "user"
}
}
```

### Alternative approaches

If you don't have the Azure CLI installed, or you plan on using Pulumi in a CI/CD pipeline, you can <a href="https://learn.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli" target="_blank">create a service principal</a> and set the following environment variables on your workstation:

{{% choosable os "linux,macos" %}}

```bash
$ export ARM_CLIENT_ID="<YOUR_CLIENT_ID>"
$ export ARM_CLIENT_SECRET="<YOUR_CLIENT_SECRET>"
$ export ARM_TENANT_ID="<YOUR_TENANT_ID>"
$ export ARM_SUBSCRIPTION_ID="<YOUR_SUBSCRIPTION_ID>"
```

{{% /choosable %}}

{{% choosable os windows %}}

```powershell
> $env:ARM_CLIENT_ID = "<YOUR_CLIENT_ID>"
> $env:ARM_CLIENT_SECRET = "<YOUR_CLIENT_SECRET>"
> $env:ARM_TENANT_ID = "<YOUR_TENANT_ID>"
> $env:ARM_SUBSCRIPTION_ID = "<YOUR_SUBSCRIPTION_ID>"
```

{{% /choosable %}}

{{% notes type="info" %}}
Consider using [Pulumi ESC's Azure login support](/docs/esc/integrations/dynamic-login-credentials/azure-login) for dynamic,
short-lived Azure credentials via OpenID Connect (OIDC) instead of long-lived static credentials. This is a security best practice.
{{% /notes %}}

For detailed information on Pulumi's use of Azure credentials, see [Azure Setup](/registry/packages/azure-native/installation-configuration/).

{{< get-started-stepper >}}
Loading
Loading