Skip to content

A module used to create a resource group with a management lock in Azure 🔐

License

Notifications You must be signed in to change notification settings

libre-devops/terraform-azurerm-rg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Usage

module "rg" {
  source = "registry.terraform.io/libre-devops/rg/azurerm"

  rg_name  = "rg-${var.short}-${var.loc}-${terraform.workspace}-build" // rg-ldo-euw-dev-build
  location = local.location                                            // compares var.loc with the var.regions var to match a long-hand name, in this case, "euw", so "westeurope"
  tags     = local.tags

  #  lock_level = "CanNotDelete" // Do not set this value to skip lock
}

For a full example build, check out the Libre DevOps Website

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Modules

No modules.

Resources

Name Type
azurerm_management_lock.rg_lock resource
azurerm_resource_group.main_rg resource

Inputs

Name Description Type Default Required
location The location for this resource to be put in string n/a yes
lock_level Specifies the Level to be used for this RG Lock. Possible values are Empty (no lock), CanNotDelete and ReadOnly. string "" no
rg_name The name of the resource group, this module does not create a resource group, it is expecting the value of a resource group already exists string n/a yes
tags The tags to associate with your network and subnets. map(string) n/a yes

Outputs

Name Description
rg_id Resource group generated id
rg_location Resource group location (region)
rg_lock_id The id of the resource group lock
rg_lock_level The lock-level of the resource group lock
rg_name Resource group name
rg_tags The tags of the resource group