hashicorp/terraform-provider-azurerm
GitHub: hashicorp/terraform-provider-azurerm
HashiCorp官方维护的Terraform Azure资源管理提供程序,用于以基础设施即代码的方式声明式管理Azure云资源。
Stars: 4924 | Forks: 4984
# Azure (Resource Manager) 的 Terraform Provider
AzureRM Terraform Provider 允许管理 Azure Resource Manager 中的资源。
在使用 4.0 版本的 AzureRM Provider 时,我们推荐使用最新版本的 Terraform Core([最新版本可在此处找到](https://developer.hashicorp.com/terraform/install))。
* [Terraform 官网](https://www.terraform.io)
* [AzureRM Provider 文档](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs)
* [AzureRM Provider 使用示例](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples)
* [贡献者 Slack 工作区](https://terraform-azure.slack.com)([申请邀请](https://join.slack.com/t/terraform-azure/shared_invite/zt-3qcv2dj6v-aKas6O6FSBZaxSSZph~Uvg))
## 使用示例
```
# 指定要使用的 AzureRM Provider 版本
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=4.0.0"
}
}
}
# 配置 AzureRM Provider
provider "azurerm" {
# The AzureRM Provider supports authenticating using via the Azure CLI, a Managed Identity
# and a Service Principal. More information on the authentication methods supported by
# the AzureRM Provider can be found here:
# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#authenticating-to-azure
# The features block allows changing the behaviour of the Azure Provider, more
# information can be found here:
# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/features-block
features {}
}
# 创建 resource group
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
# 在 resource group 内创建虚拟网络
resource "azurerm_virtual_network" "example" {
name = "example-network"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
address_space = ["10.0.0.0/16"]
}
```
* [AzureRM Provider 的使用文档可在 Terraform Registry 中找到](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs)。
* [在 HashiCorp Learn 上了解更多关于 Terraform 和 AzureRM Provider 的信息](https://learn.hashicorp.com/collections/terraform/azure-get-started)。
* [更多示例可在本仓库的 `./examples` 目录中找到](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples)。
## 开发与贡献 Provider
[DEVELOPER.md](DEVELOPER.md) 文件是一个基本大纲,介绍了如何构建和开发该 provider,而针对贡献者的更详细指南可以在本仓库的 [`/contributing`](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/contributing) 目录中找到。标签:Azure, Azure Resource Manager, AzureRM, DNS解析, EC2, ECS, EVTX分析, Go语言, HashiCorp, IaC, Provider, Terraform, 云基础设施, 云平台配置, 云资源管理, 云资源编排, 多云管理, 开源项目, 插件, 日志审计, 特权提升, 程序破解, 自动化运维, 自动化部署, 虚拟网络, 资源组, 资源编排