This Terraform module creates structured labels for GCP resources with specific attributes.
- Use the module by referencing its source and providing the required variables.
module "labels" {
source = "git::https://github.com/opsstation/terraform-gcp-labels.git?ref=v1.0.0"
name = "labels"
environment = "test"
label_order = ["name", "environment"]
attributes = ["private"]
extra_tags = {
}
}
Please ensure you specify the correct 'source' path for the module.
name
: The name of the application or resource.environment
: The environment in which the resource exists.label_order
: The order in which labels should be applied.business_unit
: The business unit associated with the application.attributes
: Additional attributes to add to the labels.extra_tags
: Extra tags to associate with the resource.
- This module currently does not provide any outputs.
For detailed examples on how to use this module, please refer to the example directory within this repository.
Your Name Replace '[License Name]' and '[Your Name]' with the appropriate license and your information. Feel free to expand this README with additional details or usage instructions as needed for your specific use case.
This project is licensed under the MIT License - see the LICENSE file for details.
Name | Version |
---|---|
terraform | >= 0.14, < 2.0 |
>= 3.50, < 5.0 |
No providers.
No modules.
No resources.
Name | Description | Type | Default | Required |
---|---|---|---|---|
attributes | Additional attributes (e.g. 1 ). |
list(string) |
[] |
no |
delimiter | Delimiter to be used between organization , name , environment and attributes . |
string |
"-" |
no |
enabled | Set to false to prevent the module from creating any resources. | bool |
true |
no |
environment | Environment (e.g. prod , dev , staging ). |
string |
"" |
no |
extra_tags | Additional tags (e.g. map(BusinessUnit ,XYZ ). |
map(string) |
{} |
no |
label_order | Label order, e.g. sequence of application name and environment name ,environment ,'attribute' [webserver ,qa ,devops ,public ,] . |
list(any) |
[ |
no |
managedby | ManagedBy,opsstation'. | string |
"opsstation'." |
no |
name | Name (e.g. app or cluster ). |
string |
"" |
no |
repository | Terraform current module repo | string |
"" |
no |
Name | Description |
---|---|
attributes | Normalized attributes. |
environment | Normalized environment |
id | Disambiguated ID. |
label_order | Normalized Tag map. |
name | Normalized name. |
repository | Terraform current module repo |
tags | Normalized Tag map. |