Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
Merged
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
1 change: 1 addition & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ deployable
VMs
CDN
subdirectories
AzureTF
[0-9]+px
^.+[-:_]\w+$
[a-z]+([A-Z0-9]|[A-Z0-9]\w+)
Expand Down
1 change: 1 addition & 0 deletions docs/get-started/foundations/deployment/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ All of the IaC providers generate Terraform code for deployment. This allows you

- [AWSTF](/providers/terraform/aws)
- [GCPTF](/providers/terraform/gcp)
- [AzureTF](/providers/terraform/azure)

<Note>An Azure Terraform provider is in development.</Note>

Expand Down
2 changes: 1 addition & 1 deletion docs/providers/pulumi/azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Installing the Azure CLI assists with credentials setup. You can install it usin

<TabItem label="Windows">

Download & install the [latest CLI release](https://aka.ms/installazurecliwindows).
Download & install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli).

</TabItem>

Expand Down
129 changes: 129 additions & 0 deletions docs/providers/terraform/azure.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
description: 'Terraform - Microsoft Azure provider for Nitric'
---

# Terraform Azure Provider Overview

_The officially supported Nitric Terraform Azure Provider._

```yaml
provider: nitric/azuretf@latest
```

<Note>
The Nitric Terraform Azure Provider is currently in preview, it's not
recommended for production deployments. We recommend using the [Pulumi Azure
Providers](/providers/pulumi/azure) for production deployments until the
Terraform provider is stable.
</Note>

## Prerequisites

The **Terraform CLI** is required to deploy the resulting Terraform Stack that Nitric generates. You can find the installation instructions for Terraform in the [Terraform documentation](https://learn.hashicorp.com/tutorials/terraform/install-cli).

The provider is built with the [Cloud Development Kit for Terraform (CDKTF)](https://developer.hashicorp.com/terraform/cdktf). Since CDKTF relies on Node.js, you'll need to have Node.js installed, you can read about the full CDKTF prerequisites in the [CDKTF documentation](https://developer.hashicorp.com/terraform/tutorials/cdktf/cdktf-install#prerequisites).

## Enabling Nitric Terraform Providers

The Nitric Terraform providers are currently in preview, to enable them you'll need to enable `beta-providers` in your Nitric project. You can do this by adding the following to your project's `nitric.yaml` file:

```yaml title:nitric.yaml
preview:
- beta-providers
```

## Azure Credentials

The Terraform CLI typically uses standard Azure credential settings to authenticate with Azure. If you've set credentials for the Azure CLI or an Azure SDK previously, these settings should work without modification.

If you're setting up your credentials for the first time, simply run azure login command and finish the login via your browser.

```bash
az login
```

Verify the Azure CLI install -

```bash
az -v
```

<Note>
See [Azure
documentation](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli)
for full details on credentials and configuration.
</Note>

### Azure CLI Installation

Installing the Azure CLI assists with credentials setup. You can install it using these summarized instructions, for more options see the [Microsoft docs](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli).

<OSTabs>

<TabItem label="Windows">

Download & install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli).

</TabItem>

<TabItem label="Linux">

```bash
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
```

</TabItem>

<TabItem label="macOS">

```bash
brew update && brew install azure-cli
```

</TabItem>

</OSTabs>

## Locating deployed resources

This Nitric Azure provider deploys resources for a stack into a resource group dedicated to that stack. You can either use one that you already have by configuring it in the stack configuration or let Nitric create one for you.

Once a stack has been deployed to Azure it's resource group should be present in the [Resource groups](https://portal.azure.com/#blade/HubsExtension/BrowseResourceGroupBlade/resourceType/Microsoft.Resources%2Fsubscriptions%2FresourceGroups) page of the portal. Assuming it was deployed to a subscription you have access to.

<Note>
Resource groups are conventionally named `<project-name>-<stack-name>-<randomId>`

In this example the project name is `api-testing` and the stack name is `az`.

</Note>

![resource group page screen](/docs/images/docs/az-rg.png)

## Stack Configuration

```yaml title:nitric.[stack ID].yaml
# The provider to use and its published version
# See releases:
# https://github.com/nitrictech/nitric/tags
provider: nitric/azuretf@latest

# The target Azure region to deploy to
# See available regions:
# https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=container-apps
region: my-azure-stack-region

# Org to associate deployed API Management services with
org: example-org

# Admin email to associate deployed API Management services with
adminemail: test@example.com

# Subscription ID to associate deployed services with
subscription-id: example-subscription-id
```

<Note>
Missing something? Let us know by raising an issue in
[GitHub](https://github.com/nitrictech/nitric) or by dropping us a line on
[Discord](https://nitric.io/chat)
</Note>
4 changes: 2 additions & 2 deletions docs/providers/terraform/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 'How Nitric integrates with Terraform'

# Nitric Terraform Providers

Nitric enables application portability and deployments through pluggable modules known as [providers](/get-started/foundations/deployment#providers). This allows applications to be deployed with many different Infrastructure Automation technologies, including [Terraform](https://www.terraform.io/). Nitric has pre-built providers that use Terraform to deploy to [AWS](/providers/terraform/aws) and [Google Cloud](/providers/terraform/gcp), with Azure support planned.
Nitric enables application portability and deployments through pluggable modules known as [providers](/get-started/foundations/deployment#providers). This allows applications to be deployed with many different Infrastructure Automation technologies, including [Terraform](https://www.terraform.io/). Nitric has pre-built providers that use Terraform to deploy to [AWS](/providers/terraform/aws), [Google Cloud](/providers/terraform/gcp) and [Microsoft Azure](/providers/terraform/azure).

<Note>
All pre-built Terraform providers are [IaC generating
Expand Down Expand Up @@ -37,7 +37,7 @@ preview:

- [AWS](/providers/terraform/aws)
- [Google Cloud](/providers/terraform/gcp)
- Azure (Coming Soon)
- [Microsoft Azure](/providers/terraform/azure)

## How Nitric integrates with Terraform

Expand Down
4 changes: 4 additions & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ export const navigation: NavEntry[] = [
title: 'Google Cloud',
href: '/providers/terraform/gcp',
},
{
title: 'Azure',
href: '/providers/terraform/azure',
},
],
},
{
Expand Down
Loading