diff --git a/content/docs/iac/get-started/azure/_index.md b/content/docs/iac/get-started/azure/_index.md
index 6bacb90e76b3..e4083c44b469 100644
--- a/content/docs/iac/get-started/azure/_index.md
+++ b/content/docs/iac/get-started/azure/_index.md
@@ -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
@@ -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 Azure CLI 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" %}}
+
+* Node.js and npm installed locally
+
+{{% /choosable %}}
+
+{{% choosable language "python" %}}
+
+* Python and pip, Poetry or uv installed locally
+
+{{% /choosable %}}
+
+{{% choosable language "go" %}}
+
+* Go installed locally
+
+{{% /choosable %}}
+
+{{% choosable language "csharp" %}}
+
+* .NET installed locally
+
+{{% /choosable %}}
+
+{{% choosable language "java" %}}
+
+* Java 11+ and Maven 3.6.1+ installed locally
+
+{{% /choosable %}}
+
+{{% choosable language "yaml" %}}
+
+* A text editor
+
+{{% /choosable %}}
{{< get-started-stepper >}}
diff --git a/content/docs/iac/get-started/azure/begin.md b/content/docs/iac/get-started/azure/begin.md
index 2c502f059cef..a72a8c4cb63a 100644
--- a/content/docs/iac/get-started/azure/begin.md
+++ b/content/docs/iac/get-started/azure/begin.md
@@ -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:
@@ -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 >}}
diff --git a/content/docs/iac/get-started/azure/configure.md b/content/docs/iac/get-started/azure/configure.md
new file mode 100644
index 000000000000..4232ad2065ba
--- /dev/null
+++ b/content/docs/iac/get-started/azure/configure.md
@@ -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
+
+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 installed and configured 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": "user@example.com",
+ "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 create a service principal and set the following environment variables on your workstation:
+
+{{% choosable os "linux,macos" %}}
+
+```bash
+$ export ARM_CLIENT_ID="
+
-Now that your storage account has been provisioned, let's modify it to host a static website.
+Now that the storage account has been provisioned, you'll update it to host a static website.
{{< get-started-stepper >}}
diff --git a/content/docs/iac/get-started/azure/destroy-stack.md b/content/docs/iac/get-started/azure/destroy-stack.md
index 96b30537d228..fbbbd54d4a6f 100644
--- a/content/docs/iac/get-started/azure/destroy-stack.md
+++ b/content/docs/iac/get-started/azure/destroy-stack.md
@@ -1,12 +1,12 @@
---
title_tag: Destroy the Stack | Azure
-meta_desc: This page provides an overview of how to destroy a Pulumi stack of an Azure project.
title: Destroy stack
-h1: "Pulumi & Azure: Destroy stack"
+h1: "Get started with Pulumi and Azure"
+meta_desc: This page provides an overview of how to destroy a Pulumi stack of an Azure project.
weight: 8
menu:
iac:
- name: Destroy stack
+ name: Cleanup & destroy
identifier: azure-get-started.destroy-stack
parent: azure-get-started
weight: 8
@@ -15,15 +15,27 @@ aliases:
- /docs/clouds/azure/get-started/destroy-stack/
---
-Now that you've seen how to deploy changes to our program, let's clean up and tear down the resources that are part of your stack.
+## Cleanup & destroy the stack
+
+Our final step is to clean up all of the resources we've provisioned. This is as simple as running `pulumi destroy`:
-To destroy resources, run the following:
+{{% choosable os "linux,macos" %}}
```bash
-pulumi destroy
+$ pulumi destroy
+```
+
+{{% /choosable %}}
+
+{{% choosable os "windows" %}}
+
+```powershell
+> pulumi destroy
```
-You'll be prompted to make sure you really want to delete these resources. This can take a minute or two; Pulumi waits until all resources are shut down and deleted before it considers the destroy operation to be complete.
+{{% /choosable %}}
+
+Just like `pulumi up`, `pulumi destroy` shows you a preview before performing any changes:
```
Previewing destroy (dev):
@@ -36,13 +48,20 @@ Previewing destroy (dev):
- └─ azure-native:resources:ResourceGroup resourceGroup delete
Outputs:
- - primaryStorageKey: "
+
-Now that your bucket has been provisioned, let's modify the bucket to host a static website.
+Now that the storage bucket has been provisioned, you'll update it to host a static website.
{{< get-started-stepper >}}
diff --git a/content/docs/iac/get-started/gcp/destroy-stack.md b/content/docs/iac/get-started/gcp/destroy-stack.md
index 86fd709b9680..af9b009a9cb5 100644
--- a/content/docs/iac/get-started/gcp/destroy-stack.md
+++ b/content/docs/iac/get-started/gcp/destroy-stack.md
@@ -1,33 +1,47 @@
---
title_tag: Destroy the Stack | Google Cloud
-meta_desc: This page provides an overview of how to destroy a Pulumi stack of a Google Cloud (GCP) project.
title: Destroy stack
-h1: "Pulumi & Google Cloud: Destroy stack"
+h1: "Get started with Pulumi and Google Cloud"
+meta_desc: This page provides an overview of how to destroy a Pulumi stack of a Google Cloud project.
weight: 8
menu:
- iac:
- name: Destroy stack
- identifier: gcp-get-started.destroy-stack
- parent: gcp-get-started
- weight: 8
+ iac:
+ name: Cleanup & destroy
+ identifier: gcp-get-started.destroy-stack
+ parent: gcp-get-started
+ weight: 8
aliases:
- /docs/quickstart/gcp/destroy-stack/
- /docs/clouds/gcp/get-started/destroy-stack/
---
-Now that you've seen how to deploy and manage cloud resources with Pulumi, let's clean up by tearing down all of the resources that belong to this stack.
+## Cleanup & destroy the stack
-To do so, run the following:
+Our final step is to clean up all of the resources we've allocated in this tutorial.
+
+Run the `pulumi destroy` command to delete all cloud resources in this project/stack:
+
+{{% choosable os "linux,macos" %}}
```bash
$ pulumi destroy
```
-Again you'll be presented with a preview of the changes to be made. Choose `yes`. The destroy operation may take few moments, as Pulumi waits for all resources are to be deleted before considering the operation complete:
+{{% /choosable %}}
+
+{{% choosable os "windows" %}}
+
+```powershell
+> pulumi destroy
+```
+
+{{% /choosable %}}
+
+Just like `pulumi up`, you'll be shown a preview to ensure that you want to proceed:
```
-Previewing destroy (dev)
+Previewing destroy (dev):
Type Name Plan
- pulumi:pulumi:Stack quickstart-dev delete
@@ -36,24 +50,32 @@ Previewing destroy (dev)
- └─ gcp:storage:Bucket my-bucket delete
Outputs:
- - bucketEndpoint: "http://storage.googleapis.com/my-bucket-daa12be/index.html-a52debd"
- - bucketName : "gs://my-bucket-daa12be"
+ - bucketName: "gs://my-bucket-daa12be"
+ - url : "http://storage.googleapis.com/my-bucket-daa12be/index.html"
Resources:
- 4 to delete
-Do you want to perform this destroy? yes
-Destroying (dev)
+Do you want to perform this destroy?
+> yes
+ no
+ details
+```
+
+As with an update, we can choose `no` or `details`; select `yes` to proceed:
+
+```
+Destroying (dev):
Type Name Status
- - pulumi:pulumi:Stack quickstart-dev deleted
+ - pulumi:pulumi:Stack quickstart-dev deleted (0.31s)
- ├─ gcp:storage:BucketIAMBinding my-bucket-binding deleted (6s)
- ├─ gcp:storage:BucketObject index.html deleted (0.78s)
- └─ gcp:storage:Bucket my-bucket deleted (1s)
Outputs:
- - bucketEndpoint: "http://storage.googleapis.com/my-bucket-daa12be/index.html-a52debd"
- - bucketName : "gs://my-bucket-daa12be"
+ - bucketName: "gs://my-bucket-daa12be"
+ - url : "http://storage.googleapis.com/my-bucket-daa12be/index.html"
Resources:
- 4 deleted
@@ -61,16 +83,29 @@ Resources:
Duration: 9s
```
-Optionally, to delete the stack itself, you can also run [`pulumi stack rm`](/docs/cli/commands/pulumi_stack_rm). Doing so removes the stack entirely from the Pulumi Cloud, along with all of its update history.
+At this stage, your stack still exists, but all cloud resources have been deleted from it.
+
+## Remove the stack
+
+The final step is to remove the stack itself. Destroy keeps the stack around so that you still have the full
+history of what happened to the stack. Running [`pulumi stack rm`](/docs/cli/commands/pulumi_stack_rm) will
+delete it entirely, including all history and state snapshots. Be careful, this step cannot be undone!
-Congratulations! You've successfully provisioned some cloud resources using Pulumi. By completing this guide you have successfully:
+{{% choosable "os" "macos,linux" %}}
+
+```bash
+$ pulumi stack rm
+```
+
+{{% /choosable %}}
+{{% choosable "os" "windows" %}}
+
+```powershell
+> pulumi stack rm
+```
-- Created a Pulumi new project.
-- Provisioned a new storage bucket.
-- Added an `index.html` file to your bucket.
-- Served the file as a static website.
-- Destroyed the resources you've provisioned.
+{{% /choosable %}}
-On the next page, we have a collection of examples and tutorials that you can deploy as they are or use them as a foundation for your own applications and infrastructure projects.
+You'll be prompted to confirm the removal. Confirm it to successfully complete this tutorial.
{{< get-started-stepper >}}
diff --git a/content/docs/iac/get-started/gcp/modify-program.md b/content/docs/iac/get-started/gcp/modify-program.md
index d4df8165d842..9b00e026d535 100644
--- a/content/docs/iac/get-started/gcp/modify-program.md
+++ b/content/docs/iac/get-started/gcp/modify-program.md
@@ -1,12 +1,12 @@
---
-title_tag: Modify the Program | Google Cloud
-meta_desc: This page provides an overview on how to update Google Cloud (GCP) project from a Pulumi program.
-title: Modify program
-h1: "Pulumi & Google Cloud: Modify program"
+title_tag: Make an Update | Google Cloud
+title: Make an update
+h1: "Get started with Pulumi and Google Cloud"
+meta_desc: This page provides an overview on how to update a Google Cloud project from a Pulumi program.
weight: 6
menu:
iac:
- name: Modify program
+ name: Make an update
identifier: gcp-get-started.modify-program
parent: gcp-get-started
weight: 6
@@ -14,9 +14,30 @@ menu:
aliases:
- /docs/quickstart/gcp/modify-program/
- /docs/clouds/gcp/get-started/modify-program/
+ - /docs/quickstart/gcp/deploy-changes/
+ - /docs/clouds/gcp/get-started/deploy-changes/
---
-Now that your storage bucket is provisioned, let's add an object to it. First, from within your project directory, create a new `index.html` file with some content in it.
+## Make an update
+
+Now you will update your project to serve a static website out of your Google Cloud Storage bucket. You will change
+your code and then re-run `pulumi up` which will update your infrastructure.
+
+### Add new resources
+
+Pulumi knows how to evolve your current infrastructure to your project's new desired state, both for
+the first deployment as well as subsequent updates.
+
+To turn your bucket into a static website, you will add two new Google Cloud Storage resources:
+
+1. [`BucketObject`](/registry/packages/gcp/api-docs/storage/bucketobject/):
+ uploads your website content to the bucket
+2. [`BucketIAMBinding`](/registry/packages/gcp/api-docs/storage/bucketiambinding/):
+ makes the bucket publicly accessible
+
+### Add an index.html
+
+First, from within your project directory, create a new `index.html` file with some content in it.
{{< chooser os "macos,linux,windows" / >}}
@@ -73,6 +94,12 @@ For this, you'll use Pulumi's `FileAsset` class to assign the content of the fil
In `index.ts`, create the `BucketObject` right after creating the bucket itself:
```typescript
+// Create a Google Cloud resource (Storage Bucket)
+const bucket = new gcp.storage.Bucket("my-bucket", {
+ /* existing bucket configuration */
+});
+
+// Upload the file
const bucketObject = new gcp.storage.BucketObject("index.html", {
bucket: bucket.name,
source: new pulumi.asset.FileAsset("index.html")
@@ -86,6 +113,13 @@ const bucketObject = new gcp.storage.BucketObject("index.html", {
In `__main__.py`, create a new bucket object by adding the following right after creating the bucket itself:
```python
+# Create a Google Cloud resource (Storage Bucket)
+bucket = storage.Bucket(
+ "my-bucket",
+ # existing bucket configuration
+)
+
+# Upload the file
bucket_object = storage.BucketObject(
"index.html", bucket=bucket.name, source=pulumi.FileAsset("index.html")
)
@@ -98,6 +132,15 @@ bucket_object = storage.BucketObject(
In `main.go`, create the `BucketObject` right after creating the bucket itself:
```go
+// Create a Google Cloud resource (Storage Bucket)
+bucket, err := storage.NewBucket(ctx, "my-bucket", &storage.BucketArgs{
+ // existing bucket configuration
+})
+if err != nil {
+ return err
+}
+
+// Upload the file
_, err = storage.NewBucketObject(ctx, "index.html", &storage.BucketObjectArgs{
Bucket: bucket.Name,
Source: pulumi.NewFileAsset("index.html"),
@@ -114,6 +157,13 @@ if err != nil {
In `Program.cs`, create the `BucketObject` right after creating the bucket itself:
```csharp
+// Create a Google Cloud resource (Storage Bucket)
+var bucket = new Bucket("my-bucket", new BucketArgs
+{
+ /* existing bucket configuration */
+});
+
+// Upload the file
var bucketObject = new BucketObject("index.html", new BucketObjectArgs
{
Bucket = bucket.Name,
@@ -138,9 +188,12 @@ import com.pulumi.gcp.storage.BucketObjectArgs;
public class App {
public static void main(String[] args) {
Pulumi.run(ctx -> {
- // ...
+ // Create a Google Cloud resource (Storage Bucket)
+ var bucket = new Bucket("my-bucket", BucketArgs.builder()
+ // existing bucket configuration
+ .build());
- // Create a Bucket object
+ // Upload the file
var bucketObject = new BucketObject("index.html", BucketObjectArgs.builder()
.bucket(bucket.name())
.source(new FileAsset("index.html"))
@@ -161,7 +214,12 @@ In {{< langfile >}}, create the `BucketObject` right below the bucket itself.
```yaml
resources:
- # ...
+ # Create a Google Cloud resource (Storage Bucket)
+ my-bucket:
+ type: gcp:storage:Bucket
+ # existing bucket configuration
+
+ # Upload the file
index-html:
type: gcp:storage:BucketObject
properties:
@@ -260,6 +318,235 @@ my-bucket-binding:
{{% /choosable %}}
-Next, you'll deploy your changes.
+Now that `index.html` exists in the bucket, modify the bucket to serve the file as a static website.
+
+To do that, update the bucket definition to configure its website property. Then, to align with Google Cloud Storage recommendations, set its uniform bucket-level access property to `true`:
+
+{{% choosable language typescript %}}
+
+```typescript
+const bucket = new gcp.storage.Bucket("my-bucket", {
+ location: "US",
+ website: {
+ mainPageSuffix: "index.html"
+ },
+ uniformBucketLevelAccess: true
+});
+```
+
+### Export the website URL
+
+Now to export the website's public URL for easy access, add the `url` export to your return statement as shown in this example:
+
+```typescript
+// Export the DNS name of the bucket
+export const bucketName = bucket.url;
+
+// Export the bucket's public URL
+export const url = pulumi.concat("http://storage.googleapis.com/", bucket.name, "/", bucketObject.name);
+```
+
+{{% /choosable %}}
+
+{{% choosable language python %}}
+
+```python
+bucket = storage.Bucket(
+ "my-bucket",
+ location="US",
+ website={
+ "main_page_suffix": "index.html"
+ },
+ uniform_bucket_level_access=True,
+)
+
+# Export the DNS name of the bucket
+pulumi.export("bucket_name", bucket.url)
+
+# Export the bucket's public URL
+pulumi.export(
+ "url",
+ pulumi.Output.concat(
+ "http://storage.googleapis.com/", bucket.id, "/", bucket_object.name
+ ),
+)
+```
+
+{{% /choosable %}}
+
+{{% choosable language go %}}
+
+```go
+bucket, err := storage.NewBucket(ctx, "my-bucket", &storage.BucketArgs{
+ Location: pulumi.String("US"),
+ Website: storage.BucketWebsiteArgs{
+ MainPageSuffix: pulumi.String("index.html"),
+ },
+ UniformBucketLevelAccess: pulumi.Bool(true),
+})
+if err != nil {
+ return err
+}
+
+// Export the DNS name of the bucket
+ctx.Export("bucketName", bucket.Url)
+
+// Export the bucket's public URL
+ctx.Export("url", pulumi.Sprintf("http://storage.googleapis.com/%s/%s", bucket.Name, bucketObject.Name))
+```
+
+{{% /choosable %}}
+
+{{% choosable language csharp %}}
+
+```csharp
+var bucket = new Bucket("my-bucket", new BucketArgs
+{
+ Location = "US",
+ Website = new BucketWebsiteArgs
+ {
+ MainPageSuffix = "index.html"
+ },
+ UniformBucketLevelAccess = true
+});
+
+return new DictionaryDownload and install Pulumi for your platform:
+ +{{ .Page.RenderString "{{< install-pulumi >}}\n{{% notes info %}}\nAll Windows examples in this tutorial assume you are running in PowerShell.\n{{% /notes %}}\n{{< /install-pulumi >}}" }}