Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 6eeee49

Browse files
jyecuschHomelessDinosaurraksiv
authored
docs: add azuretf provider docs (#713)
Co-authored-by: Ryan Cartwright <[email protected]> Co-authored-by: Rak <[email protected]>
1 parent e78545e commit 6eeee49

File tree

6 files changed

+138
-3
lines changed

6 files changed

+138
-3
lines changed

dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ deployable
254254
VMs
255255
CDN
256256
subdirectories
257+
AzureTF
257258
[0-9]+px
258259
^.+[-:_]\w+$
259260
[a-z]+([A-Z0-9]|[A-Z0-9]\w+)

docs/get-started/foundations/deployment/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ All of the IaC providers generate Terraform code for deployment. This allows you
9494

9595
- [AWSTF](/providers/terraform/aws)
9696
- [GCPTF](/providers/terraform/gcp)
97+
- [AzureTF](/providers/terraform/azure)
9798

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

docs/providers/pulumi/azure.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Installing the Azure CLI assists with credentials setup. You can install it usin
5353

5454
<TabItem label="Windows">
5555

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

5858
</TabItem>
5959

docs/providers/terraform/azure.mdx

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
description: 'Terraform - Microsoft Azure provider for Nitric'
3+
---
4+
5+
# Terraform Azure Provider Overview
6+
7+
_The officially supported Nitric Terraform Azure Provider._
8+
9+
```yaml
10+
provider: nitric/azuretf@latest
11+
```
12+
13+
<Note>
14+
The Nitric Terraform Azure Provider is currently in preview, it's not
15+
recommended for production deployments. We recommend using the [Pulumi Azure
16+
Providers](/providers/pulumi/azure) for production deployments until the
17+
Terraform provider is stable.
18+
</Note>
19+
20+
## Prerequisites
21+
22+
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).
23+
24+
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).
25+
26+
## Enabling Nitric Terraform Providers
27+
28+
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:
29+
30+
```yaml title:nitric.yaml
31+
preview:
32+
- beta-providers
33+
```
34+
35+
## Azure Credentials
36+
37+
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.
38+
39+
If you're setting up your credentials for the first time, simply run azure login command and finish the login via your browser.
40+
41+
```bash
42+
az login
43+
```
44+
45+
Verify the Azure CLI install -
46+
47+
```bash
48+
az -v
49+
```
50+
51+
<Note>
52+
See [Azure
53+
documentation](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli)
54+
for full details on credentials and configuration.
55+
</Note>
56+
57+
### Azure CLI Installation
58+
59+
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).
60+
61+
<OSTabs>
62+
63+
<TabItem label="Windows">
64+
65+
Download & install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli).
66+
67+
</TabItem>
68+
69+
<TabItem label="Linux">
70+
71+
```bash
72+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
73+
```
74+
75+
</TabItem>
76+
77+
<TabItem label="macOS">
78+
79+
```bash
80+
brew update && brew install azure-cli
81+
```
82+
83+
</TabItem>
84+
85+
</OSTabs>
86+
87+
## Locating deployed resources
88+
89+
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.
90+
91+
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.
92+
93+
<Note>
94+
Resource groups are conventionally named `<project-name>-<stack-name>-<randomId>`
95+
96+
In this example the project name is `api-testing` and the stack name is `az`.
97+
98+
</Note>
99+
100+
![resource group page screen](/docs/images/docs/az-rg.png)
101+
102+
## Stack Configuration
103+
104+
```yaml title:nitric.[stack ID].yaml
105+
# The provider to use and its published version
106+
# See releases:
107+
# https://github.com/nitrictech/nitric/tags
108+
provider: nitric/azuretf@latest
109+
110+
# The target Azure region to deploy to
111+
# See available regions:
112+
# https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=container-apps
113+
region: my-azure-stack-region
114+
115+
# Org to associate deployed API Management services with
116+
org: example-org
117+
118+
# Admin email to associate deployed API Management services with
119+
adminemail: [email protected]
120+
121+
# Subscription ID to associate deployed services with
122+
subscription-id: example-subscription-id
123+
```
124+
125+
<Note>
126+
Missing something? Let us know by raising an issue in
127+
[GitHub](https://github.com/nitrictech/nitric) or by dropping us a line on
128+
[Discord](https://nitric.io/chat)
129+
</Note>

docs/providers/terraform/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: 'How Nitric integrates with Terraform'
44

55
# Nitric Terraform Providers
66

7-
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.
7+
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).
88

99
<Note>
1010
All pre-built Terraform providers are [IaC generating
@@ -37,7 +37,7 @@ preview:
3737
3838
- [AWS](/providers/terraform/aws)
3939
- [Google Cloud](/providers/terraform/gcp)
40-
- Azure (Coming Soon)
40+
- [Microsoft Azure](/providers/terraform/azure)
4141
4242
## How Nitric integrates with Terraform
4343

src/config/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ export const navigation: NavEntry[] = [
267267
title: 'Google Cloud',
268268
href: '/providers/terraform/gcp',
269269
},
270+
{
271+
title: 'Azure',
272+
href: '/providers/terraform/azure',
273+
},
270274
],
271275
},
272276
{

0 commit comments

Comments
 (0)