Skip to content

Commit

Permalink
Merge pull request #4 from SushantJagdale/main
Browse files Browse the repository at this point in the history
updated README.md file with more explanation on variables used in this module.
  • Loading branch information
tonynv authored May 24, 2021
2 parents 1543fe2 + 02ab832 commit 428e14c
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 25 deletions.
87 changes: 64 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,87 @@

# Terraform AWS Label Module
The Terraform Amazon Web Services (AWS) Label module generates consistent label names and tags for Terraform resources.

## Module input variables

* ```region``` - AWS Region used to host Terraform resources.

* ```namespace``` - Namespace, generally your organization or department name (for example, ```AWS```).

* ```env``` - Environment name (for example, ```sit```, ```uat```, or ```prod```).

* ```account``` - AWS account name or number.

* ```name``` - Stack name.

* ```delimiter``` - Character such as a slash (/) used between ```name```, ```namespace```, and ```env``` to form the resource name.

* ```attributes``` - Additional attributes.

* ```tags``` - Additional tags.
---

## Inputs

* ```region```
* description: AWS Region used to host Terraform resources.
* type: ``` string ```
* default: ``` us-west-1 ```
<br />

* ```namespace```
* description: Namespace, generally your organization or department name (for example, ```AWS```)
* type: ``` string ```
* default: ``` testenv ```
<br />

* ```env```
* description: Environment name (for example, ```sit```, ```uat```, or ```prod```)
* type: ``` string ```
* default: ``` testns ```
<br />

* ```account```
* description: AWS account name or number.
* type: ``` string ```
* default: ``` testacc ```
<br />

* ```name```
* description: Stack name
* type: ``` string ```
* default: ``` testname ```
<br />


* ```delimiter```
* description: Character such as a slash (/) used between ```name```, ```namespace```, and ```env``` to form the resource name.
* type: ``` string ```
* default: ``` - ```
<br />

* ```attributes```
* description: Additional attributes.
* type: ``` list ```
* default: ``` [] ```
<br />

* ```tags```
* description: Additional tags.
* type: ``` map ```
* default: ``` {} ```
<br />

---

## Usage

module "label" {

source = "aws-quickstart/label/aws"
source = "aws-quickstart/label/aws"

version = "0.0.1"
version = "0.0.1"

region = "us-east-1"
region = "us-east-1"

namespace = "my org"

env = "sit"
env = "sit"

account = "aws-account-name"
account = "aws-account-name"

name = "deployment name"
name = "deployment name"

delimiter = "-"

tags = tomap({ propogate_at_launch = "true", "terraform" = "true" })

}

---

## Outputs

Expand All @@ -59,3 +98,5 @@ module "label" {
* ```env``` - Environment name.

* ```attributes``` - List of additional attributes.

---
2 changes: 0 additions & 2 deletions variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ variable "delimiter" {
default = "-"
}
variable "attributes" {
#type = list(string)
default = []
description = "atttributes, which could be used for additional attributes"
}

variable "tags" {
#type = map(string)
default = {}
description = "tags, which could be used for additional tags"
}
Expand Down

0 comments on commit 428e14c

Please sign in to comment.