diff --git a/.gitignore b/.gitignore
old mode 100755
new mode 100644
index a0dd221..8c17ca4
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,6 @@
-# Compiled files
+# ignored files
*.tfstate
*.tfstate.backup
-
-# Module directory
.terraform
.idea
-*.iml
+*.iml
\ No newline at end of file
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..aa6e42c
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,13 @@
+repos:
+ - repo: git://github.com/antonbabenko/pre-commit-terraform
+ rev: v1.12.0
+ hooks:
+ - id: terraform_fmt
+
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v2.0.0
+ hooks:
+ - id: check-merge-conflict
+ - id: trailing-whitespace
+ - id: check-yaml
+ - id: check-added-large-files
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..136d77d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Cloud Drove
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d9e69c6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,3 @@
+export GENIE_PATH ?= $(shell 'pwd')/../../../genie
+
+include $(GENIE_PATH)/Makefile
\ No newline at end of file
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
index c4c1c26..3637ddb
--- a/README.md
+++ b/README.md
@@ -1,24 +1,193 @@
-AWS ALB
-==============
+
-This module is for create alb with related resources.
+
-###### main.tf
-contain resource code for alb.
-###### variables.tf
-contain variables declaration. all variables are empty by default. we will define or put value to variables in equls.tf (main file for infrastructure). these are input vars.
+
+ Terraform AWS ALB
+
-###### outputs.tf
-is alse contain variables but we will these variables for output like ec2 instance id.
+
+ This terraform module is used to create ALB on AWS.
+
-## Infrastructure creats by this module
+
-1. Alb
-2. Alb listener
-3. Alb target group
-4. Alb target group attachment.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+We eat, drink, sleep and most importantly love **DevOps**. We are working towards stratergies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy Bigger problems are always solved by breaking them into smaller manageable problems. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller connected yet manageable pieces within the infrastructure.
+
+This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
+
+We have [*fifty plus terraform modules*][terraform_modules]. A few of them are comepleted and are available for open source usage while a few others are in progress.
+
+
+
+
+## Prerequisites
+
+This module has a few dependencies:
+
+- [Terraform 0.12](https://learn.hashicorp.com/terraform/getting-started/install.html)
+- [Go](https://golang.org/doc/install)
+- [github.com/stretchr/testify/assert](https://github.com/stretchr/testify)
+- [github.com/gruntwork-io/terratest/modules/terraform](https://github.com/gruntwork-io/terratest)
+
+
+
+
+
+
+## Examples
+
+**IMPORTANT:** Since the `master` branch used in `source` varies based on new modifications, we suggest that you use the release versions [here](https://github.com/clouddrove/terraform-aws-alb/releases).
+
+
+### Simple Example
+Here is an example of how you can use this module in your inventory structure:
+```hcl
+ module "alb" {
+ source = "git::https://github.com/clouddrove/terraform-aws-alb.git"
+ name = "alb"
+ application = "clouddrove"
+ environment = "test"
+ label_order = ["environment", "name", "application"]
+ internal = false
+ load_balancer_type = "application"
+ instance_count = 2
+ security_groups = ["sg-xxxxxxx"]
+ subnets = "subnet-xxxxxxx"
+ enable_deletion_protection = false
+ target_id = "i-xxxxxxxxxx"
+ vpc_id = "vpc-xxxxxxxxx"
+ target_group_protocol = "HTTP"
+ target_group_port = 80
+ listener_certificate_arn = "arn:aws:acm:eu-west-1:xxxxxxxxxxxx:certificate/xxxxxx-xxxx-xxxxx-xxxx"
+ https_enabled = true
+ http_enabled = true
+}
+```
+
+
+
+## Inputs
+
+| Name | Description | Type | Default | Required |
+|------|-------------|:----:|:-----:|:-----:|
+| access_logs | Access logs Enable or Disable. | bool | `false` | no |
+| alb_environment | A mapping of tags to assign to the resource. | string | `` | no |
+| alb_name | The name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, Terraform will autogenerate a name beginning with tf-lb. | string | `` | no |
+| allocation_id | The allocation ID of the Elastic IP address. | string | `` | no |
+| application | Application (e.g. `cd` or `clouddrove`). | string | `` | no |
+| attributes | Additional attributes (e.g. `1`). | list | `` | no |
+| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | string | `-` | no |
+| deregistration_delay | The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. | number | `300` | no |
+| enable_cross_zone_load_balancing | Indicates whether cross zone load balancing should be enabled in application load balancers. | bool | `false` | no |
+| enable_deletion_protection | If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to false. | string | `` | no |
+| enable_http2 | Indicates whether HTTP/2 is enabled in application load balancers. | bool | `true` | no |
+| environment | Environment (e.g. `prod`, `dev`, `staging`). | string | `` | no |
+| health_check_healthy_threshold | The number of consecutive health checks successes required before considering an unhealthy target healthy. | number | `2` | no |
+| health_check_interval | The duration in seconds in between health checks. | number | `15` | no |
+| health_check_matcher | The HTTP response codes to indicate a healthy check. | string | `200-399` | no |
+| health_check_path | The destination for the health check request. | string | `/` | no |
+| health_check_timeout | The amount of time to wait in seconds before failing a health check request. | number | `10` | no |
+| health_check_unhealthy_threshold | The number of consecutive health check failures required before considering the target unhealthy. | number | `2` | no |
+| http_enabled | A boolean flag to enable/disable HTTP listener. | bool | `true` | no |
+| http_port | The port on which the load balancer is listening. like 80 or 443. | number | `80` | no |
+| https_enabled | A boolean flag to enable/disable HTTPS listener. | bool | `true` | no |
+| https_port | The port on which the load balancer is listening. like 80 or 443. | number | - | yes |
+| idle_timeout | The time in seconds that the connection is allowed to be idle. | number | `60` | no |
+| instance_count | The count of instances. | number | `0` | no |
+| internal | If true, the LB will be internal. | string | `` | no |
+| ip_address_type | The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 and dualstack. | string | `ipv4` | no |
+| label_order | Label order, e.g. `name`,`application`. | list | `` | no |
+| listener_certificate_arn | The ARN of the SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. | string | `` | no |
+| listener_protocol | The protocol for connections from clients to the load balancer. Valid values are TCP, HTTP and HTTPS. Defaults to HTTP. | string | `HTTPS` | no |
+| listener_ssl_policy | The security policy if using HTTPS externally on the load balancer. [See](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html). | string | `ELBSecurityPolicy-2016-08` | no |
+| listener_type | The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc. | string | - | yes |
+| load_balancer_create_timeout | Timeout value when creating the ALB. | string | `10m` | no |
+| load_balancer_delete_timeout | Timeout value when deleting the ALB. | string | `10m` | no |
+| load_balancer_type | The type of load balancer to create. Possible values are application or network. The default value is application. | string | `` | no |
+| load_balancer_update_timeout | Timeout value when updating the ALB. | string | `10m` | no |
+| log_bucket_name | S3 bucket (externally created) for storing load balancer access logs. Required if logging_enabled is true. | string | `` | no |
+| name | Name (e.g. `app` or `cluster`). | string | `` | no |
+| security_groups | A list of security group IDs to assign to the LB. Only valid for Load Balancers of type application. | list | `` | no |
+| subnet_id | The id of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone. | string | `` | no |
+| subnets | A list of subnet IDs to attach to the LB. Subnets cannot be updated for Load Balancers of type network. Changing this value will for load balancers of type network will force a recreation of the resource. | list | `` | no |
+| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). | map | `