diff --git a/README.yaml b/README.yaml index 1261dcd..2d6a935 100644 --- a/README.yaml +++ b/README.yaml @@ -52,4 +52,4 @@ usage: |- Application = "CloudDrove" } } - ``` + ``` diff --git a/_example/example.tf b/_example/example.tf index cfb848f..2cdc376 100644 --- a/_example/example.tf +++ b/_example/example.tf @@ -3,9 +3,11 @@ provider "azurerm" { features {} } +##----------------------------------------------------------------------------- +## Labels module call. +##----------------------------------------------------------------------------- module "labels" { - source = "./../" - + source = "./../" name = "labels" environment = "test" label_order = ["name", "environment"] diff --git a/main.tf b/main.tf index cd6d0bf..5894aab 100644 --- a/main.tf +++ b/main.tf @@ -1,12 +1,9 @@ -## Managed By : CloudDrove -## Copyright @ CloudDrove. All Right Reserved. - -#Module : locals -#Description : This terraform module is designed to generate consistent label names and tags for resources. You can use terraform-labels to implement a strict naming convention. - +##----------------------------------------------------------------------------- +## This terraform module is designed to generate consistent label names and tags for resources. You can use terraform-labels to implement a strict naming convention. +##----------------------------------------------------------------------------- locals { label_order_defaults = { - label_order = ["environment", "name"] + label_order = ["name", "environment"] } id_context = { @@ -38,6 +35,5 @@ locals { } generated_tags = { for l in keys(local.tags_context) : title(l) => local.tags_context[l] if length(local.tags_context[l]) > 0 } - - tags = merge(local.generated_tags, var.extra_tags) + tags = merge(local.generated_tags, var.extra_tags) }