+
+
{{< console-note >}}
-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..c3f9acd2e517 100644
--- a/content/docs/iac/get-started/azure/destroy-stack.md
+++ b/content/docs/iac/get-started/azure/destroy-stack.md
@@ -6,7 +6,7 @@ h1: "Pulumi & Azure: Destroy stack"
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
-To destroy resources, run the following:
+Our final step is to clean up all of the resources we've provisioned. This is as simple as running `pulumi destroy`:
+
+{{% choosable os "linux,macos" %}}
```bash
-pulumi destroy
+$ 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 %}}
+
+{{% choosable os "windows" %}}
+
+```powershell
+> pulumi destroy
+```
+
+{{% /choosable %}}
+
+Just like `pulumi up`, `pulumi destroy` shows you a preview before performing any changes:
```
Previewing destroy (dev):
@@ -42,7 +54,15 @@ Outputs:
Resources:
- 5 to delete
-Do you want to perform this destroy? yes
+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
@@ -62,17 +82,29 @@ Resources:
Duration: 53s
```
-To delete the stack itself, run [`pulumi stack rm`](/docs/cli/commands/pulumi_stack_rm). Note that this removes the stack
-entirely from 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 Azure storage account and container.
-- Added an `index.html` file to your container.
-- Served the `index.html` 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/azure/modify-program.md b/content/docs/iac/get-started/azure/modify-program.md
index 9d951c669d08..6ea7df6c86e4 100644
--- a/content/docs/iac/get-started/azure/modify-program.md
+++ b/content/docs/iac/get-started/azure/modify-program.md
@@ -13,9 +13,30 @@ menu:
aliases:
- /docs/quickstart/azure/modify-program/
- /docs/clouds/azure/get-started/modify-program/
+ - /docs/quickstart/azure/deploy-changes/
+ - /docs/clouds/azure/get-started/deploy-changes/
---
-Now that your storage account 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 Azure storage account. 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 storage account into a static website, you will add two new Azure resources:
+
+1. [`StorageAccountStaticWebsite`](/registry/packages/azure-native/api-docs/storage/storageaccountstaticwebsite/):
+ enables static website support on your storage account
+2. [`Blob`](/registry/packages/azure-native/api-docs/storage/blob/):
+ uploads your website content to the storage container
+
+### 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" / >}}
@@ -61,15 +82,13 @@ EOT
{{% /choosable %}}
-Now that you have your new `index.html` with some content, you can enable static website support, upload `index.html` to a storage container, and retrieve a public URL through the use of resource properties. These properties can be used to define dependencies between related resources or to retrieve property values for further processing.
-
-{{< chooser language "typescript,python,go,csharp,java,yaml" / >}}
+Now open {{< langfile >}} in your editor and enable static website support by adding a [`StorageAccountStaticWebsite`](/registry/packages/azure-native/api-docs/storage/storageaccountstaticwebsite/) resource right after the storage account creation:
{{% choosable language typescript %}}
-To start, open `index.ts` and add the following right after the storage account creation:
-
```typescript
+// Storage account...
+
// Enable static website support
const staticWebsite = new storage.StorageAccountStaticWebsite("staticWebsite", {
accountName: storageAccount.name,
@@ -81,9 +100,9 @@ const staticWebsite = new storage.StorageAccountStaticWebsite("staticWebsite", {
{{% /choosable %}}
{{% choosable language python %}}
-To start, open `__main__.py` and add the following right after the storage account creation:
-
```python
+# Storage account...
+
# Enable static website support
static_website = storage.StorageAccountStaticWebsite(
"staticWebsite",
@@ -96,9 +115,9 @@ static_website = storage.StorageAccountStaticWebsite(
{{% /choosable %}}
{{% choosable language go %}}
-To start, open `main.go` and add the following right after the storage account creation:
-
```go
+// Storage account...
+
// Enable static website support
staticWebsite, err := storage.NewStorageAccountStaticWebsite(ctx, "staticWebsite", &storage.StorageAccountStaticWebsiteArgs{
AccountName: account.Name,
@@ -113,9 +132,9 @@ if err != nil {
{{% /choosable %}}
{{% choosable language csharp %}}
-To start, open `Program.cs` and add the following right after the storage account creation:
-
```csharp
+// Storage account...
+
// Enable static website support
var staticWebsite = new StorageAccountStaticWebsite("staticWebsite", new StorageAccountStaticWebsiteArgs
{
@@ -129,7 +148,7 @@ var staticWebsite = new StorageAccountStaticWebsite("staticWebsite", new Storage
{{% choosable language java %}}
-To start, open `App.java` and add the following imports:
+First, add the following imports at the top of `App.java`:
```java
import com.pulumi.azurenative.storage.StorageAccountStaticWebsite;
@@ -140,9 +159,11 @@ import com.pulumi.azurenative.storage.outputs.EndpointsResponse;
import com.pulumi.asset.FileAsset;
```
-Next, add the following right after the storage account creation:
+Then add the following right after the storage account creation:
```java
+// Storage account...
+
var staticWebsite = new StorageAccountStaticWebsite("staticWebsite",
StorageAccountStaticWebsiteArgs.builder()
.accountName(storageAccount.name())
@@ -155,8 +176,6 @@ var staticWebsite = new StorageAccountStaticWebsite("staticWebsite",
{{% choosable language yaml %}}
-To start, open `Pulumi.yaml` and add the following right after the storage account creation:
-
```yaml
resources:
# ...
@@ -170,9 +189,10 @@ resources:
{{% /choosable %}}
-The static website resource leverages the storage account and resource group names defined previously in your program.
+Notice that resources can reference each other, which forms automatic dependencies between them.
+Pulumi uses this information to parallelize deployments safely.
-Now use all of these cloud resources and a local `FileAsset` resource to upload `index.html` into your storage container by adding the following at the end of the file (after enabling the static website support):
+Now use all of these cloud resources and a local `FileAsset` resource to upload `index.html` into your storage container by adding a [`Blob`](/registry/packages/azure-native/api-docs/storage/blob/) at the end of the file (after enabling the static website support):
{{% choosable language typescript %}}
```typescript
@@ -272,9 +292,13 @@ resources:
{{% /choosable %}}
-{{% choosable language typescript %}}
+This uploads the `index.html` file to your storage container using a Pulumi concept called an [asset](/docs/iac/concepts/assets-archives/#assets).
+
+### Export the website URL
-Finally, at the end of `index.ts`, export the resulting storage container's endpoint URL to stdout for easy access:
+Now to export the website's URL for easy access add this to the end of your program:
+
+{{% choosable language typescript %}}
```typescript
// Web endpoint to the website
@@ -285,8 +309,6 @@ export const staticEndpoint = storageAccount.primaryEndpoints.web;
{{% choosable language python %}}
-Finally, at the end of `__main__.py`, export the resulting storage container's endpoint URL to stdout for easy access:
-
```python
# Web endpoint to the website
pulumi.export("staticEndpoint", account.primary_endpoints.web)
@@ -296,8 +318,6 @@ pulumi.export("staticEndpoint", account.primary_endpoints.web)
{{% choosable language go %}}
-Finally, at the end of `main.go`, export the resulting storage container's endpoint URL to stdout for easy access:
-
```go
// Web endpoint to the website
ctx.Export("staticEndpoint", account.PrimaryEndpoints.Web())
@@ -307,8 +327,6 @@ ctx.Export("staticEndpoint", account.PrimaryEndpoints.Web())
{{% choosable language csharp %}}
-Finally, at the end of `Program.cs`, export the resulting storage container's endpoint URL to stdout for easy access:
-
```csharp
// Web endpoint to the website
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 >}}" }}