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
12 changes: 6 additions & 6 deletions content/docs/iac/get-started/aws/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,36 @@ First, choose your language and ensure you've performed any prerequisites:

{{% choosable language "typescript" %}}

* An <a href="https://aws.amazon.com/free" target=_blank>AWS 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
* An <a href="https://aws.amazon.com/free" target="_blank">AWS 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://aws.amazon.com/free" target="_blank">AWS 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
* <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://aws.amazon.com/free" target="_blank">AWS account</a>
* <a href="https://go.dev/doc/install" target=_blank>Go</a> installed locally
* <a href="https://go.dev/doc/install" target="_blank">Go</a> installed locally

{{% /choosable %}}

{{% choosable language "csharp" %}}

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

{{% /choosable %}}

{{% choosable language "java" %}}

* An <a href="https://aws.amazon.com/free" target="_blank">AWS 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
* <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 %}}

Expand Down
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 >}}
4 changes: 2 additions & 2 deletions content/docs/iac/get-started/aws/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ menu:
name: Configure access
parent: aws-get-started
weight: 3

identifier: aws-get-started.configure
aliases:
- /docs/iac/get-started/aws/b/configure/
---
Expand Down Expand Up @@ -42,7 +42,7 @@ $ aws sts get-caller-identity

{{% /choosable %}}

If your AWS user ID, account, and ARN are printed, you are good to go. If not, read on:
If your AWS user ID, account, and ARN are printed, your configuration is correct. If not, read on:

```
{
Expand Down
6 changes: 3 additions & 3 deletions content/docs/iac/get-started/aws/create-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Next, make four changes:
3. Generalize the creation of bucket objects by looping over the list of `files`
4. Assign the resulting website URL to the `url` property of the component

The resulting {{< compfile >}} file will look like this; feel free to make each edit one at a time if you'd like
The resulting {{< compfile >}} file will look like this; you can make each edit one at a time if preferred
to get a feel for things, or simply paste the contents of this into {{< compfile >}}:

{{% choosable language typescript %}}
Expand Down Expand Up @@ -552,7 +552,7 @@ public class AwsS3Website : Pulumi.ComponentResource
});

// Create an S3 Bucket object for each file; note the changes to name/source:
foreach (var file in args.Files) {
foreach (var file in args.Files ?? []) {
new BucketObject(file, new()
{
Bucket = bucket.Id,
Expand Down Expand Up @@ -753,7 +753,7 @@ using Pulumi;
using Pulumi.Aws.S3;
using System.Collections.Generic;

return await Deployment.RunAsync(() =>
return await Pulumi.Deployment.RunAsync(() =>
{
// Create an instance of our component with the same files as before:
var website = new AwsS3Website("my-website", new AwsS3WebsiteArgs()
Expand Down
3 changes: 2 additions & 1 deletion content/docs/iac/get-started/aws/create-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ If you list the contents of your directory, you'll see some key files:
{{% choosable language "typescript,python,go,csharp,java" %}}

- <span>{{< langfile >}}</span> contains your project's main code that declares a new S3 bucket

- `Pulumi.yaml` is a [project file](/docs/iac/concepts/projects/project-file) containing metadata about your project like its name

{{% /choosable %}}
Expand Down Expand Up @@ -296,7 +297,7 @@ using Pulumi;
using Pulumi.Aws.S3;
using System.Collections.Generic;

return await Deployment.RunAsync(() =>
return await Pulumi.Deployment.RunAsync(() =>
{
// Create an AWS resource (S3 Bucket)
var bucket = new Bucket("my-bucket");
Expand Down
4 changes: 1 addition & 3 deletions content/docs/iac/get-started/aws/deploy-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ $ aws s3 ls ("s3://" + (pulumi stack output bucket_name))

### View your update on Pulumi Cloud

If you are logged into [Pulumi Cloud](/docs/pulumi-cloud), you'll see "View Live" hyperlinks in the CLI output during your
update. These go to [a page](https://app.pulumi.com) with detailed information about your stack including resources,
configuration, a full history of updates, and more. Click on it to check it out:
If you are logged into [Pulumi Cloud](/docs/pulumi-cloud), you'll see "View Live" hyperlinks in the CLI output during your update. These go to [a page](https://app.pulumi.com) with detailed information about your stack including resources, configuration, a full history of updates, and more. Navigate to it to review the details of your update:

<a href="/images/getting-started/console-update.png" target="_blank">
<img src="/images/getting-started/console-update.png" alt="A stack update with console output, as shown in the Pulumi Service" />
Expand Down
2 changes: 1 addition & 1 deletion content/docs/iac/get-started/aws/modify-program.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,6 @@ This will reveal your new website!

Feel free to experiment, such as changing the contents of `index.html` and redeploying.

Next, let's wrap this website up into an infrastructure abstraction.
Next, wrap the website into an infrastructure abstraction.

{{< get-started-stepper >}}
53 changes: 49 additions & 4 deletions content/docs/iac/get-started/azure/_index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title_tag: Get Started with Azure
meta_desc: This page provides an overview and guide on how to get started with Azure.
title: Azure
h1: Get started with Pulumi & Azure
title_tag: Get started with Pulumi and Azure
h1: Get started with Pulumi and Azure
meta_desc: This page provides an overview and guide on how to get started with Azure.
menu:
iac:
name: Azure
Expand All @@ -19,6 +19,51 @@ 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

Make sure you have the <a href="https://learn.microsoft.com/cli/azure/install-azure-cli" target="_blank">Azure CLI</a> installed and signed in to the Azure subscription you plan to use (for example, `az login`). Then choose your language and ensure you've performed any prerequisites:

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

{{% choosable language "typescript" %}}

* <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" %}}

* <a href="https://www.python.org/downloads/" target="_blank">Python</a> and <a href="https://pip.pypa.io/en/stable/installation/" target="_blank">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" %}}

* <a href="https://go.dev/doc/install" target="_blank">Go</a> installed locally

{{% /choosable %}}

{{% choosable language "csharp" %}}

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

{{% /choosable %}}

{{% choosable language "java" %}}

* <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 text editor

{{% /choosable %}}

{{< get-started-stepper >}}
78 changes: 5 additions & 73 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 @@ -14,78 +15,9 @@ aliases:
- /docs/quickstart/azure/begin/
- /docs/quickstart/azure/install-pulumi/
- /docs/quickstart/azure/install-language-runtime/
- /docs/quickstart/azure/configure/
- /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 and 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
identifier: azure-get-started.configure
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, your configuration is correct. 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