This repository was archived by the owner on May 20, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
docs: add azuretf provider docs #713
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
292b121
docs: add azuretf provider docs
jyecusch ff118a0
add azuretf to dictionary
jyecusch 4badbdd
update azure cli download links
jyecusch 37dc3c1
Update docs/providers/terraform/azure.mdx
jyecusch 41bced7
Update docs/providers/terraform/azure.mdx
jyecusch 91f2261
Update docs/providers/terraform/azure.mdx
jyecusch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -254,6 +254,7 @@ deployable | |
| VMs | ||
| CDN | ||
| subdirectories | ||
| AzureTF | ||
| [0-9]+px | ||
| ^.+[-:_]\w+$ | ||
| [a-z]+([A-Z0-9]|[A-Z0-9]\w+) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
|
|
||
|  | ||
|
|
||
| ## 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> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.