This Terraform module is designed to help in using the AzureRM terraform provider.
It provides for an Azure region given in standard format, CLI format or slug format and returns Azure standard format, a short format used for resource naming, the CLI format, a slug format and a fixed 4 character name.
This work is widely based on [Claranet terraform_azurerm_regions] (https://github.com/claranet/terraform-azurerm-regions).
Please refer to the regions.tf file for available regions. Complete regions mapping is also available in REGIONS.md documentation.
Name | Version |
---|---|
terraform | >= 1.5.0 |
azurerm | >= 3.66.0 |
Name | Version |
---|---|
azurerm | >= 3.66.0 |
Name | Source | Version |
---|---|---|
azurerm_resourcegroup_type1 | github.com/rmsmatos/terraform_azurerm_resourcegroup_type1 | v1.0.0 |
Name | Type |
---|---|
azurerm_management_lock.lock | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
location | (Required) The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. | string |
n/a | yes |
name | (Required) The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created | string |
n/a | yes |
lock_level | (Required) Specifies the Level to be used for this RG Lock. Possible values are Empty (no lock), CanNotDelete and ReadOnly. | string |
"CanNotDelete" |
no |
lock_name | (Optional) Specifies a named for this Resource Group Lock. | string |
"Locked by Terraform module on creation" |
no |
lock_notes | Sets a description on the Resource Group Lock. | string |
"Resource Group was locked by Terraform module" |
no |
managed_by | (Optional) The ID of the resource or application that manages this Resource Group. | string |
null |
no |
tags | (Optional) A map of strings for tagging the resource. Changing this updates the resource. | map(string) |
null |
no |
Name | Description |
---|---|
id | Returns Resource Group ID. |
location | Returns Resource Group Location. |
lock_id | Returns Resource Group Lock ID. |
lock_level | Returns Resource Group Lock Level |
lock_name | Returns Resource Group Lock Name. |
lock_notes | Returns Resource Group Lock Note. |
lock_scope | Returns Resource Group Lock scope |
name | Returns Resource Group Name. |
tags | Returns Resource Group Tags. |
terraform {
required_version = ">= 1.5.3"
}
module "terraform_azurerm_resourcegroups_lock_type1" {
source = "github.com/rmsmatos/terraform_azurerm_resourcegroups_lock_type1"
name = "just-a-test"
location = "westeurope"
tags = {
environment = "production"
costcentre = "cost center"
}
lock_name = "Lockek by Terraform"
lock_level = "CanNotDelete"
lock_notes = "We don't want people to delete this"
}
output "id" {
value = module.terraform_azurerm_resourcegroups_lock_type1.location
}
output "name" {
value = module.terraform_azurerm_resourcegroups_lock_type1.name
}
output "tags" {
value = module.terraform_azurerm_resourcegroups_lock_type1.tags
}
output "managed_by" {
value = module.terraform_azurerm_resourcegroups_lock_type1.managed_by
}
output "lock_id" {
value = module.terraform_azurerm_resourcegroups_lock_type1.lock_id
}
output "lock_name" {
value = module.terraform_azurerm_resourcegroups_lock_type1.lock_name
}
output "lock_scope" {
value = module.terraform_azurerm_resourcegroups_lock_type1.lock_scope
}
output "lock_level" {
value = module.terraform_azurerm_resourcegroups_lock_type1.lock_level
}
output "lock_notes" {
value = module.terraform_azurerm_resourcegroups_lock_type1.lock_notes
}
Azure regions: azure.microsoft.com/en-us/global-infrastructure/regions/
Created and maintained by Rui Matos.
©Rui Matos 2023
This source code is licensed under the Apache-2.0 license found in the LICENSE file in the root directory of this source tree license (./LICENSE.md).