Skip to content

opsstation/terraform-gcp-labels

Repository files navigation

Terraform-Gcp-Labels

Terraform Google Cloud Labels Module

Table of Contents

Introduction

This Terraform module creates structured labels for GCP resources with specific attributes.

Usage

  • Use the module by referencing its source and providing the required variables.

Example: Labels

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.

Module Inputs

  • 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.

Module Outputs

  • This module currently does not provide any outputs.

Examples

For detailed examples on how to use this module, please refer to the example directory within this repository.

Authors

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Requirements

Name Version
terraform >= 0.14, < 2.0
google >= 3.50, < 5.0

Providers

No providers.

Modules

No modules.

Resources

No resources.

Inputs

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)
[
"name",
"environment"
]
no
managedby ManagedBy,opsstation'. string "opsstation'." no
name Name (e.g. app or cluster). string "" no
repository Terraform current module repo string "" no

Outputs

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages